diff options
author | Mitsuhiro Nakamura <m.nacamura@gmail.com> | 2018-10-12 22:58:35 +0900 |
---|---|---|
committer | Mitsuhiro Nakamura <m.nacamura@gmail.com> | 2018-10-14 00:14:49 +0900 |
commit | c941577dcb68ad413853ae744a458555b3209c21 (patch) | |
tree | b40c4d3991e2b9d36ac2c550b2cc410dd9505129 /nixos/modules/programs/bash | |
parent | 3b5449b80c1840aeb07322fbd3c37f8a80d11958 (diff) | |
download | nixpkgs-c941577dcb68ad413853ae744a458555b3209c21.tar nixpkgs-c941577dcb68ad413853ae744a458555b3209c21.tar.gz nixpkgs-c941577dcb68ad413853ae744a458555b3209c21.tar.bz2 nixpkgs-c941577dcb68ad413853ae744a458555b3209c21.tar.lz nixpkgs-c941577dcb68ad413853ae744a458555b3209c21.tar.xz nixpkgs-c941577dcb68ad413853ae744a458555b3209c21.tar.zst nixpkgs-c941577dcb68ad413853ae744a458555b3209c21.zip |
nixos/shells: enable to nullify already defined aliases
Diffstat (limited to 'nixos/modules/programs/bash')
-rw-r--r-- | nixos/modules/programs/bash/bash.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index aa524a333ee..0fbc77ea44c 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -33,7 +33,8 @@ let ''; bashAliases = 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 @@ -64,7 +65,7 @@ in Set of aliases for bash 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 { |