summary refs log tree commit diff
path: root/nixos/modules/config/shells-environment.nix
diff options
context:
space:
mode:
authorMitsuhiro Nakamura <m.nacamura@gmail.com>2018-10-12 22:58:35 +0900
committerMitsuhiro Nakamura <m.nacamura@gmail.com>2018-10-14 00:14:49 +0900
commitc941577dcb68ad413853ae744a458555b3209c21 (patch)
treeb40c4d3991e2b9d36ac2c550b2cc410dd9505129 /nixos/modules/config/shells-environment.nix
parent3b5449b80c1840aeb07322fbd3c37f8a80d11958 (diff)
downloadnixlib-c941577dcb68ad413853ae744a458555b3209c21.tar
nixlib-c941577dcb68ad413853ae744a458555b3209c21.tar.gz
nixlib-c941577dcb68ad413853ae744a458555b3209c21.tar.bz2
nixlib-c941577dcb68ad413853ae744a458555b3209c21.tar.lz
nixlib-c941577dcb68ad413853ae744a458555b3209c21.tar.xz
nixlib-c941577dcb68ad413853ae744a458555b3209c21.tar.zst
nixlib-c941577dcb68ad413853ae744a458555b3209c21.zip
nixos/shells: enable to nullify already defined aliases
Diffstat (limited to 'nixos/modules/config/shells-environment.nix')
-rw-r--r--nixos/modules/config/shells-environment.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix
index a279120e125d..6379b52870ea 100644
--- a/nixos/modules/config/shells-environment.nix
+++ b/nixos/modules/config/shells-environment.nix
@@ -108,13 +108,14 @@ in
     };
 
     environment.shellAliases = mkOption {
-      example = { ll = "ls -l"; };
+      example = { l = null; ll = "ls -l"; };
       description = ''
         An attribute set that maps aliases (the top level attribute names in
         this option) to command strings or directly to build outputs. The
         aliases are added to all users' shells.
+        Aliases mapped to <code>null</code> are ignored.
       '';
-      type = with types; attrsOf (either str path);
+      type = with types; attrsOf (nullOr (either str path));
     };
 
     environment.binsh = mkOption {