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.
This commit is contained in:
Eelco Dolstra 2013-09-24 10:58:01 +02:00
parent 3a17c2b30b
commit b933b15d72
3 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ in
/bin/sh /bin/sh
''; '';
environment.etc."environment".text = system.build.setEnvironment = pkgs.writeText "set-environment"
'' ''
${concatStringsSep "\n" ( ${concatStringsSep "\n" (
(mapAttrsToList (n: v: ''export ${n}="${concatStringsSep ":" v}"'') (mapAttrsToList (n: v: ''export ${n}="${concatStringsSep ":" v}"'')

View File

@ -119,7 +119,7 @@ in
programs.bash = { programs.bash = {
shellInit = '' shellInit = ''
. /etc/environment . ${config.system.build.setEnvironment}
${cfge.shellInit} ${cfge.shellInit}
''; '';

View File

@ -87,7 +87,7 @@ in
programs.zsh = { programs.zsh = {
shellInit = '' shellInit = ''
. /etc/environment . ${config.system.build.setEnvironment}
${cfge.shellInit} ${cfge.shellInit}
''; '';