nixpkgs/nixos
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
..
doc Revert "doc: Update section about imperative containers" 2018-09-30 03:18:58 +03:00
lib Add ssh backdoor to VM tests infrastructure. 2018-09-28 10:53:08 +01:00
maintainers create-amis.sh: Change directory for AMIs 2018-07-24 21:19:14 +02:00
modules NIX_PATH: don't prepend $HOME-based value in session variable, set later 2018-09-29 20:29:33 -04:00
tests nixos/rspamd: Remove non-working socket activation 2018-09-28 19:43:34 +02:00
COPYING
default.nix nixos: export packages of the current configuration (its pkgs argument) 2018-02-09 19:35:27 +00:00
README
release-combined.nix nixos/release-combined: remove keymap tests from tested job 2018-06-06 21:02:55 +02:00
release-small.nix Add the boot test to release-small.nix 2018-02-27 20:09:07 +01:00
release.nix nixos: doc: rename manual to manualHTML, cleanup references 2018-09-23 20:47:58 +00:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.