nixpkgs/nixos/modules
Will Dietz f3a114e088 NIX_PATH: don't prepend $HOME-based value in session variable, set later
environment.sessionVariables cannot refer to the values of env vars,
and as a result this has caused problems in a variety of scenarios.

One use for these is that they're injected into /etc/profile,
elewhere these are used to populate an 'envfile' for pam
(`pam 5 pam_env.conf`) which mentions use of HOME being
potentially problematic.

Anyway if the goal is to make things easier for users,
simply do the NIX_PATH modification as extraInit.

This fixes the annoying problems generated by the current approach
(#40165 and others) while hopefully serving the original goal.

One way to check if things are borked is to try:

$ sudo env | grep NIX_PATH

Which (before this change) prints NIX_PATH variable with
an unexpanded $HOME in the value.

-------

This does mean the following won't contain user channels for 'will':
$ sudo -u will nix-instantiate --eval -E builtins.nixPath

However AFAICT currently they won't be present either,
due to unescaped $HOME.  Unsure if similar situation for other users
of sessionVariables (not sudo) work with current situation
(if they exist they will regress after this change AFAIK).
2018-09-29 20:29:33 -04:00
..
config Merge branch 'master' into staging-next 2018-09-13 10:08:53 +02:00
hardware [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
i18n/input-method nixos docs: more IDs 2018-09-02 15:47:59 -04:00
installer nixos: doc: move non-service parts of service.nixosManual to documentation.nixos 2018-09-23 20:50:47 +00:00
misc lidarr: init at 0.3.1.471 2018-09-29 21:40:29 +02:00
profiles nixos: Fix eval error for documentation.nixos 2018-09-25 23:39:44 +02:00
programs nixos/zsh: use `escapeShelLArg' for shell aliases (#47471) 2018-09-28 23:42:55 +02:00
security acme module: fix self-signed cert with openssl 1.1 2018-09-12 13:40:46 +02:00
services NIX_PATH: don't prepend $HOME-based value in session variable, set later 2018-09-29 20:29:33 -04:00
system nixos/kexec: Fix typo in meta.platforms 2018-09-28 17:44:42 +02:00
tasks networking.hostId: fix cmd in description 2018-09-11 11:29:04 +02:00
testing Add ssh backdoor to VM tests infrastructure. 2018-09-28 10:53:08 +01:00
virtualisation google-compute-engine: 20180510 -> 20180905 2018-09-26 11:48:16 +02:00
module-list.nix lidarr: init at 0.3.1.471 2018-09-29 21:40:29 +02:00
rename.nix nixos: doc: move non-service parts of service.nixosManual to documentation.nixos 2018-09-23 20:50:47 +00:00