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

This commit is contained in:
Mitsuhiro Nakamura
2018-10-14 00:14:09 +09:00
parent e4e160cc39
commit 3b5449b80c
3 changed files with 17 additions and 12 deletions
+6 -4
View File
@@ -53,12 +53,12 @@ in
};
shellAliases = mkOption {
default = config.environment.shellAliases;
default = {};
description = ''
Set of aliases for fish shell. See <option>environment.shellAliases</option>
for an option format description.
Set of aliases for fish shell, which overrides <option>environment.shellAliases</option>.
See <option>environment.shellAliases</option> for an option format description.
'';
type = types.attrs;
type = with types; attrsOf (either str path);
};
shellInit = mkOption {
@@ -99,6 +99,8 @@ in
config = mkIf cfg.enable {
programs.fish.shellAliases = mapAttrs (name: mkDefault) cfge.shellAliases;
environment.etc."fish/foreign-env/shellInit".text = cfge.shellInit;
environment.etc."fish/foreign-env/loginShellInit".text = cfge.loginShellInit;
environment.etc."fish/foreign-env/interactiveShellInit".text = cfge.interactiveShellInit;