forked from pub-solar/os
feat: add flake-friendly nix-index overlay
See: https://github.com/nix-community/nix-index/pull/227
This commit is contained in:
parent
1da6ee9126
commit
53f007f48a
|
@ -24,7 +24,7 @@ in {
|
||||||
PROMPT_COMMAND='echo -e -n "\e]2;$(basename "$PWD" | sed "s/${psCfg.user.name}/~/")\e\\"'
|
PROMPT_COMMAND='echo -e -n "\e]2;$(basename "$PWD" | sed "s/${psCfg.user.name}/~/")\e\\"'
|
||||||
|
|
||||||
# If a command is not found, show me where it is
|
# If a command is not found, show me where it is
|
||||||
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
source ${pkgs.nix-index}/etc/profile.d/command-not-found.bash
|
||||||
|
|
||||||
# Helps you navigate directories faster
|
# Helps you navigate directories faster
|
||||||
# https://github.com/gsamokovarov/jump
|
# https://github.com/gsamokovarov/jump
|
||||||
|
|
|
@ -21,6 +21,10 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
programs.command-not-found.enable = false;
|
programs.command-not-found.enable = false;
|
||||||
|
programs.nix-index.enable = true;
|
||||||
|
# We do this manually in modules/terminal-life/bash/default.nix
|
||||||
|
# until https://github.com/nix-community/nix-index/pull/227 is merged
|
||||||
|
programs.nix-index.enableBashIntegration = false;
|
||||||
|
|
||||||
users.users."${psCfg.user.name}".packages = with pkgs; [
|
users.users."${psCfg.user.name}".packages = with pkgs; [
|
||||||
ack
|
ack
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
(import ../pkgs)
|
(import ../pkgs)
|
||||||
(import ./blesh.nix)
|
(import ./blesh.nix)
|
||||||
(import ./mdbook-multilang.nix inputs)
|
(import ./mdbook-multilang.nix inputs)
|
||||||
|
(import ./nix-index.nix)
|
||||||
(import ./prr.nix)
|
(import ./prr.nix)
|
||||||
(import ./neovim-plugins.nix)
|
(import ./neovim-plugins.nix)
|
||||||
(import ./element-desktop.nix)
|
(import ./element-desktop.nix)
|
||||||
|
|
24
overlays/nix-index.nix
Normal file
24
overlays/nix-index.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
final: prev: {
|
||||||
|
nix-index-unwrapped = prev.nix-index-unwrapped.overrideAttrs (oldAttrs: rec {
|
||||||
|
inherit (oldAttrs) pname;
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
owner = "teutat3s";
|
||||||
|
repo = "nix-index";
|
||||||
|
rev = "e2d1917f474083f6d5a2c3368a6073f6427c19e4";
|
||||||
|
hash = "sha256-3nTphxyqI6Hci7yJ2bKLcgdRl2qOY3BzUqoIl1YmmsA=";
|
||||||
|
};
|
||||||
|
version = "unstable-2023-11-25";
|
||||||
|
|
||||||
|
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (prev.lib.const {
|
||||||
|
name = "${pname}-vendor.tar.gz";
|
||||||
|
inherit src;
|
||||||
|
outputHash = "sha256-x4oejbS1/L3WkN2S6PzvJni9UasRTP3TVVp3Ur9ge8U=";
|
||||||
|
});
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
substituteInPlace etc/command-not-found.* \
|
||||||
|
--subst-var out
|
||||||
|
install -Dm444 etc/command-not-found.* -t $out/etc/profile.d
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in a new issue