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
'';
environment.etc."environment".text =
system.build.setEnvironment = pkgs.writeText "set-environment"
''
${concatStringsSep "\n" (
(mapAttrsToList (n: v: ''export ${n}="${concatStringsSep ":" v}"'')

View file

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

View file

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