1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-31 04:04:45 +00:00

Merge pull request #1019 from qowoz/flatten

`mapAttrsFlatten` -> `mapAttrsToList`
This commit is contained in:
Emily 2024-07-27 12:38:35 +01:00 committed by GitHub
commit 980c7066fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ let
mapAttrsToList (n: v: ''export ${n}="${v}"'') cfg.variables; mapAttrsToList (n: v: ''export ${n}="${v}"'') cfg.variables;
aliasCommands = aliasCommands =
mapAttrsFlatten (n: v: ''alias ${n}=${escapeShellArg v}'') mapAttrsToList (n: v: ''alias ${n}=${escapeShellArg v}'')
(filterAttrs (k: v: v != null) cfg.shellAliases); (filterAttrs (k: v: v != null) cfg.shellAliases);
makeDrvBinPath = concatMapStringsSep ":" (p: if isDerivation p then "${p}/bin" else p); makeDrvBinPath = concatMapStringsSep ":" (p: if isDerivation p then "${p}/bin" else p);

View file

@ -9,7 +9,7 @@ let
cfg = config.programs.fish; cfg = config.programs.fish;
fishAliases = concatStringsSep "\n" ( fishAliases = concatStringsSep "\n" (
mapAttrsFlatten (k: v: "alias ${k} ${escapeShellArg v}") mapAttrsToList (k: v: "alias ${k} ${escapeShellArg v}")
(filterAttrs (k: v: v != null) cfg.shellAliases) (filterAttrs (k: v: v != null) cfg.shellAliases)
); );