fish cleanup

This commit is contained in:
Nikodem Rabuliński 2024-01-19 21:37:50 +01:00
parent b8a3586a4e
commit ccc0994dfd
2 changed files with 10 additions and 12 deletions

View file

@ -1,10 +1,4 @@
# Set up path
fish_add_path --path --prepend '@bat@/bin'
fish_add_path --path --prepend '@eza@/bin'
# Abbreviations # Abbreviations
## misc
abbr --add --global -- vim hx
## nix ## nix
abbr --add --global -- ns 'nix shell' abbr --add --global -- ns 'nix shell'
abbr --add --global -- nss 'nix search' abbr --add --global -- nss 'nix search'

View file

@ -4,18 +4,22 @@
... ...
}: { }: {
# TODO: Fix once https://github.com/viperML/wrapper-manager/issues/14 is resolved # TODO: Fix once https://github.com/viperML/wrapper-manager/issues/14 is resolved
wrappers.fish = let wrappers.fish = {
inherit (pkgs) runCommandNoCC; basePackage = pkgs.runCommandNoCC "fish-binary" {} ''
in {
basePackage = runCommandNoCC "fish-binary" {} ''
install -D -m555 ${lib.getExe pkgs.fish} "$out/bin/fish" install -D -m555 ${lib.getExe pkgs.fish} "$out/bin/fish"
''; '';
extraWrapperFlags = "--inherit-argv0"; extraWrapperFlags = "--inherit-argv0";
prependFlags = let prependFlags = let
extraPkgs = with pkgs; [eza bat];
# Can't use 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
config-fish = runCommandNoCC "config.fish" { inherit (pkgs) bat eza; } '' path-add-lines =
substituteAll ${./config.fish} "$out" lib.concatMapStringsSep "\n"
(pkg: "fish_add_path --path --prepend '${lib.getExe' pkg ""}'")
extraPkgs;
config-fish = pkgs.writeText "config.fish" ''
${path-add-lines}
source ${./config.fish}
''; '';
in [ in [
"-C" "-C"