Merge pull request #311197 from endocrimes/dani/fish-boogaloo

nixos/fish: Fix more lib references
This commit is contained in:
Martin Weinelt 2024-05-13 01:22:34 +02:00 committed by GitHub
commit 5a9b28e88b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,14 +6,14 @@ let
cfg = config.programs.fish;
fishAbbrs = builtins.concatStringsSep "\n" (
lib.mapAttrsFlatten (k: v: "abbr -ag ${k} ${builtins.escapeShellArg v}")
fishAbbrs = lib.concatStringsSep "\n" (
lib.mapAttrsFlatten (k: v: "abbr -ag ${k} ${lib.escapeShellArg v}")
cfg.shellAbbrs
);
fishAliases = builtins.concatStringsSep "\n" (
lib.mapAttrsFlatten (k: v: "alias ${k} ${builtins.escapeShellArg v}")
(builtins.filterAttrs (k: v: v != null) cfg.shellAliases)
fishAliases = lib.concatStringsSep "\n" (
lib.mapAttrsFlatten (k: v: "alias ${k} ${lib.escapeShellArg v}")
(lib.filterAttrs (k: v: v != null) cfg.shellAliases)
);
envShellInit = pkgs.writeText "shellInit" cfge.shellInit;
@ -147,7 +147,7 @@ in
config = lib.mkIf cfg.enable {
programs.fish.shellAliases = builtins.mapAttrs (name: lib.mkDefault) cfge.shellAliases;
programs.fish.shellAliases = lib.mapAttrs (name: lib.mkDefault) cfge.shellAliases;
# Required for man completions
documentation.man.generateCaches = lib.mkDefault true;