diff options
author | Mitsuhiro Nakamura <m.nacamura@gmail.com> | 2018-08-04 12:32:30 +0900 |
---|---|---|
committer | Mitsuhiro Nakamura <m.nacamura@gmail.com> | 2018-10-14 00:14:09 +0900 |
commit | 3b5449b80c1840aeb07322fbd3c37f8a80d11958 (patch) | |
tree | 5fa12bf230cbd21f830e0b5d030a8b85dbdff3cf /nixos/modules/programs/bash/bash.nix | |
parent | e4e160cc3990584bf3472d8df76d6cb3deb38b47 (diff) | |
download | nixpkgs-3b5449b80c1840aeb07322fbd3c37f8a80d11958.tar nixpkgs-3b5449b80c1840aeb07322fbd3c37f8a80d11958.tar.gz nixpkgs-3b5449b80c1840aeb07322fbd3c37f8a80d11958.tar.bz2 nixpkgs-3b5449b80c1840aeb07322fbd3c37f8a80d11958.tar.lz nixpkgs-3b5449b80c1840aeb07322fbd3c37f8a80d11958.tar.xz nixpkgs-3b5449b80c1840aeb07322fbd3c37f8a80d11958.tar.zst nixpkgs-3b5449b80c1840aeb07322fbd3c37f8a80d11958.zip |
nixos/shells: programs.*sh.shellAliases override environment.shellAliases
Diffstat (limited to 'nixos/modules/programs/bash/bash.nix')
-rw-r--r-- | nixos/modules/programs/bash/bash.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index f664e222555..aa524a333ee 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -59,12 +59,12 @@ in */ shellAliases = mkOption { - default = config.environment.shellAliases; + default = {}; description = '' - Set of aliases for bash shell. See <option>environment.shellAliases</option> - for an option format description. + Set of aliases for bash shell, which overrides <option>environment.shellAliases</option>. + See <option>environment.shellAliases</option> for an option format description. ''; - type = types.attrs; # types.attrsOf types.stringOrPath; + type = with types; attrsOf (either str path); }; shellInit = mkOption { @@ -125,6 +125,8 @@ in programs.bash = { + shellAliases = mapAttrs (name: mkDefault) cfge.shellAliases; + shellInit = '' if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]; then . ${config.system.build.setEnvironment} |