wrappers/fish: use pathAdd
This commit is contained in:
parent
57fae4f820
commit
b0d423b36f
1 changed files with 5 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
|
@ -11,12 +12,11 @@
|
||||||
extraWrapperFlags = "--inherit-argv0";
|
extraWrapperFlags = "--inherit-argv0";
|
||||||
|
|
||||||
prependFlags = let
|
prependFlags = let
|
||||||
extraPkgs = with pkgs; [eza bat];
|
# Can't rely on pathAdd because fish used as login shell will ignore the variables the wrapper sets up
|
||||||
# Can't use pathAdd because fish used as login shell will ignore the variables the wrapper sets up
|
|
||||||
path-add-lines =
|
path-add-lines =
|
||||||
lib.concatMapStringsSep "\n"
|
lib.concatMapStringsSep "\n"
|
||||||
(pkg: "fish_add_path --path --prepend '${lib.getExe' pkg ""}'")
|
(pkg: "fish_add_path --path --prepend '${lib.getExe' pkg ""}'")
|
||||||
extraPkgs;
|
config.wrappers.fish.pathAdd;
|
||||||
config-fish = pkgs.writeText "config.fish" ''
|
config-fish = pkgs.writeText "config.fish" ''
|
||||||
${path-add-lines}
|
${path-add-lines}
|
||||||
source ${./config.fish}
|
source ${./config.fish}
|
||||||
|
@ -25,5 +25,7 @@
|
||||||
"-C"
|
"-C"
|
||||||
"source ${config-fish}"
|
"source ${config-fish}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
pathAdd = with pkgs; [eza bat fzf];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue