wrapeprs/fish: cleanup
This commit is contained in:
parent
fc4185d65e
commit
742e18c376
4 changed files with 35 additions and 46 deletions
|
@ -1,33 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# TODO: Fix once https://github.com/viperML/wrapper-manager/issues/14 is resolved
|
||||
wrappers.fish = {
|
||||
basePackage = pkgs.runCommandNoCC "fish-binary" {} ''
|
||||
install -D -m555 ${lib.getExe pkgs.fish} "$out/bin/fish"
|
||||
'';
|
||||
extraWrapperFlags = "--inherit-argv0";
|
||||
basePackage = pkgs.fish;
|
||||
wrapByDefault = false;
|
||||
|
||||
prependFlags = let
|
||||
# Can't rely on pathAdd because fish used as login shell will ignore the variables the wrapper sets up
|
||||
path-add-lines =
|
||||
lib.concatMapStringsSep "\n"
|
||||
(pkg: "fish_add_path --path --prepend '${lib.getExe' pkg ""}'")
|
||||
config.wrappers.fish.pathAdd;
|
||||
config-fish = pkgs.writeText "config.fish" ''
|
||||
${path-add-lines}
|
||||
programs.fish = {config, ...}: {
|
||||
extraWrapperFlags = "--inherit-argv0";
|
||||
|
||||
source ${./prompt.fish}
|
||||
source ${./config.fish}
|
||||
'';
|
||||
in [
|
||||
"-C"
|
||||
"source ${config-fish}"
|
||||
];
|
||||
prependFlags = let
|
||||
# Can't rely on pathAdd because fish used as login shell will ignore the variables the wrapper sets up
|
||||
path-add-lines =
|
||||
lib.concatMapStringsSep "\n"
|
||||
(pkg: "fish_add_path --path --prepend '${lib.getExe' pkg ""}'")
|
||||
config.pathAdd;
|
||||
config-fish = pkgs.writeText "config.fish" ''
|
||||
${path-add-lines}
|
||||
|
||||
pathAdd = with pkgs; [eza bat fzf ripgrep zoxide direnv];
|
||||
source ${./prompt.fish}
|
||||
source ${./config.fish}
|
||||
'';
|
||||
in [
|
||||
"-C"
|
||||
"source ${config-fish}"
|
||||
];
|
||||
|
||||
pathAdd = with pkgs; [eza bat fzf ripgrep zoxide direnv];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue