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:
parent
3a17c2b30b
commit
b933b15d72
@ -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}"'')
|
||||||
|
@ -119,7 +119,7 @@ in
|
|||||||
programs.bash = {
|
programs.bash = {
|
||||||
|
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
. /etc/environment
|
. ${config.system.build.setEnvironment}
|
||||||
|
|
||||||
${cfge.shellInit}
|
${cfge.shellInit}
|
||||||
'';
|
'';
|
||||||
|
@ -87,7 +87,7 @@ in
|
|||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
. /etc/environment
|
. ${config.system.build.setEnvironment}
|
||||||
|
|
||||||
${cfge.shellInit}
|
${cfge.shellInit}
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user