diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-24 10:58:01 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-24 11:01:55 +0200 |
commit | b933b15d728b9fcde45ebe40da9bbe22c4e0cf68 (patch) | |
tree | feef2d986e3e3dbef7598c09656113f4229fa769 | |
parent | 3a17c2b30b72f48ed8ccc294ad94e6233d77402b (diff) | |
download | nixlib-b933b15d728b9fcde45ebe40da9bbe22c4e0cf68.tar nixlib-b933b15d728b9fcde45ebe40da9bbe22c4e0cf68.tar.gz nixlib-b933b15d728b9fcde45ebe40da9bbe22c4e0cf68.tar.bz2 nixlib-b933b15d728b9fcde45ebe40da9bbe22c4e0cf68.tar.lz nixlib-b933b15d728b9fcde45ebe40da9bbe22c4e0cf68.tar.xz nixlib-b933b15d728b9fcde45ebe40da9bbe22c4e0cf68.tar.zst nixlib-b933b15d728b9fcde45ebe40da9bbe22c4e0cf68.zip |
Don't generate /etc/environment
/etc/environment, if it exists, should be a list of NAME=VALUE pairs, not a shell script. See the pam_env manpage.
-rw-r--r-- | modules/config/shells-environment.nix | 2 | ||||
-rw-r--r-- | modules/programs/bash/bash.nix | 2 | ||||
-rw-r--r-- | modules/programs/zsh/zsh.nix | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/config/shells-environment.nix b/modules/config/shells-environment.nix index 4ee80b39fa30..fe72194a1ab3 100644 --- a/modules/config/shells-environment.nix +++ b/modules/config/shells-environment.nix @@ -144,7 +144,7 @@ in /bin/sh ''; - environment.etc."environment".text = + system.build.setEnvironment = pkgs.writeText "set-environment" '' ${concatStringsSep "\n" ( (mapAttrsToList (n: v: ''export ${n}="${concatStringsSep ":" v}"'') diff --git a/modules/programs/bash/bash.nix b/modules/programs/bash/bash.nix index 2324164316df..443c6f570c17 100644 --- a/modules/programs/bash/bash.nix +++ b/modules/programs/bash/bash.nix @@ -119,7 +119,7 @@ in programs.bash = { shellInit = '' - . /etc/environment + . ${config.system.build.setEnvironment} ${cfge.shellInit} ''; diff --git a/modules/programs/zsh/zsh.nix b/modules/programs/zsh/zsh.nix index 97e7a49e5765..cff751934d7d 100644 --- a/modules/programs/zsh/zsh.nix +++ b/modules/programs/zsh/zsh.nix @@ -87,7 +87,7 @@ in programs.zsh = { shellInit = '' - . /etc/environment + . ${config.system.build.setEnvironment} ${cfge.shellInit} ''; |