summaryrefslogtreecommitdiffstats
path: root/nixos/modules/programs/bash
diff options
context:
space:
mode:
authorMitsuhiro Nakamura <m.nacamura@gmail.com>2018-08-04 12:32:30 +0900
committerMitsuhiro Nakamura <m.nacamura@gmail.com>2018-10-14 00:14:09 +0900
commit3b5449b80c1840aeb07322fbd3c37f8a80d11958 (patch)
tree5fa12bf230cbd21f830e0b5d030a8b85dbdff3cf /nixos/modules/programs/bash
parente4e160cc3990584bf3472d8df76d6cb3deb38b47 (diff)
nixos/shells: programs.*sh.shellAliases override environment.shellAliases
Diffstat (limited to 'nixos/modules/programs/bash')
-rw-r--r--nixos/modules/programs/bash/bash.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix
index f664e2225550..aa524a333ee6 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}