nixos/shells: programs.*sh.shellAliases override environment.shellAliases

This commit is contained in:
Mitsuhiro Nakamura
2018-08-04 12:32:30 +09:00
parent e4e160cc39
commit 3b5449b80c
3 changed files with 17 additions and 12 deletions

View File

@@ -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}