mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 05:37:40 +03:00
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
|
||||
'';
|
||||
|
||||
environment.etc."environment".text =
|
||||
system.build.setEnvironment = pkgs.writeText "set-environment"
|
||||
''
|
||||
${concatStringsSep "\n" (
|
||||
(mapAttrsToList (n: v: ''export ${n}="${concatStringsSep ":" v}"'')
|
||||
|
@ -119,7 +119,7 @@ in
|
||||
programs.bash = {
|
||||
|
||||
shellInit = ''
|
||||
. /etc/environment
|
||||
. ${config.system.build.setEnvironment}
|
||||
|
||||
${cfge.shellInit}
|
||||
'';
|
||||
|
@ -87,7 +87,7 @@ in
|
||||
programs.zsh = {
|
||||
|
||||
shellInit = ''
|
||||
. /etc/environment
|
||||
. ${config.system.build.setEnvironment}
|
||||
|
||||
${cfge.shellInit}
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user