nixos/modules: use mapAttrsToList instead of mapAttrsFlatten
This commit is contained in:
parent
a13e0a12b7
commit
7919709a23
@ -10,7 +10,7 @@ let
|
||||
cfg = config.programs.bash;
|
||||
|
||||
bashAliases = builtins.concatStringsSep "\n" (
|
||||
lib.mapAttrsFlatten (k: v: "alias -- ${k}=${lib.escapeShellArg v}")
|
||||
lib.mapAttrsToList (k: v: "alias -- ${k}=${lib.escapeShellArg v}")
|
||||
(lib.filterAttrs (k: v: v != null) cfg.shellAliases)
|
||||
);
|
||||
|
||||
|
@ -7,12 +7,12 @@ let
|
||||
cfg = config.programs.fish;
|
||||
|
||||
fishAbbrs = lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsFlatten (k: v: "abbr -ag ${k} ${lib.escapeShellArg v}")
|
||||
lib.mapAttrsToList (k: v: "abbr -ag ${k} ${lib.escapeShellArg v}")
|
||||
cfg.shellAbbrs
|
||||
);
|
||||
|
||||
fishAliases = lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsFlatten (k: v: "alias ${k} ${lib.escapeShellArg v}")
|
||||
lib.mapAttrsToList (k: v: "alias ${k} ${lib.escapeShellArg v}")
|
||||
(lib.filterAttrs (k: v: v != null) cfg.shellAliases)
|
||||
);
|
||||
|
||||
|
@ -10,7 +10,7 @@ let
|
||||
opt = options.programs.zsh;
|
||||
|
||||
zshAliases = builtins.concatStringsSep "\n" (
|
||||
lib.mapAttrsFlatten (k: v: "alias -- ${k}=${lib.escapeShellArg v}")
|
||||
lib.mapAttrsToList (k: v: "alias -- ${k}=${lib.escapeShellArg v}")
|
||||
(lib.filterAttrs (k: v: v != null) cfg.shellAliases)
|
||||
);
|
||||
|
||||
|
@ -223,7 +223,7 @@ in
|
||||
|
||||
config = mkIf (cfg.servers != { }) {
|
||||
|
||||
systemd.services = (listToAttrs (mapAttrsFlatten (name: value: nameValuePair "openvpn-${name}" (makeOpenVPNJob value name)) cfg.servers))
|
||||
systemd.services = (listToAttrs (mapAttrsToList (name: value: nameValuePair "openvpn-${name}" (makeOpenVPNJob value name)) cfg.servers))
|
||||
// restartService;
|
||||
|
||||
environment.systemPackages = [ openvpn ];
|
||||
|
Loading…
Reference in New Issue
Block a user