nixos/shells: enable to nullify already defined aliases

This commit is contained in:
Mitsuhiro Nakamura
2018-10-14 00:14:49 +09:00
parent 3b5449b80c
commit c941577dcb
4 changed files with 12 additions and 8 deletions
+3 -2
View File
@@ -9,7 +9,8 @@ let
cfg = config.programs.fish;
fishAliases = concatStringsSep "\n" (
mapAttrsFlatten (k: v: "alias ${k} ${escapeShellArg v}") cfg.shellAliases
mapAttrsFlatten (k: v: "alias ${k} ${escapeShellArg v}")
(filterAttrs (k: v: !isNull v) cfg.shellAliases)
);
in
@@ -58,7 +59,7 @@ in
Set of aliases for fish shell, which overrides <option>environment.shellAliases</option>.
See <option>environment.shellAliases</option> for an option format description.
'';
type = with types; attrsOf (either str path);
type = with types; attrsOf (nullOr (either str path));
};
shellInit = mkOption {