nixpkgs/nixos/modules/config
Tor Hedin Brønner d273db48c6 nixos/shells: avoid overriding the environment for child shells
A shared exported guard `__NIXOS_SET_ENVIRONMENT_DONE` is introduced that can
be used to prevent child shells from sourcing `system.build.setEnvironment`
the second time.

This fixes e.g. `nix run derivation` when run from e.g. ZSH through the console or
ssh. Before this Bash would resource the common environment resetting the `PATH`
environment variable.

We also export `system.build.setEnvironment` to `/etc/set-environment` making it
easy to reset the common environment with `. /etc/set-environment` when
needed and to grep for environment variables in `/etc` (which was the
motivation of #30418).

This reverts changes made in b00a3fc6fd
(the original #30418).
2018-08-30 13:20:39 +00:00
..
fonts [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
krb5
debug-info.nix
gnu.nix treewide: isArm -> isAarch32 2018-04-25 15:28:55 -04:00
i18n.nix
iproute2.nix iproute2: module to create rt_table file & co 2018-05-15 21:55:04 +09:00
ldap.nix nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
networking.nix nixos/networking: include local Unbound in resolv.conf 2018-07-23 16:26:03 +02:00
no-x-libs.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
nsswitch.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
power-management.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
pulseaudio.nix fix build with allowAliases=false 2018-07-23 00:12:23 +00:00
shells-environment.nix nixos/shells: avoid overriding the environment for child shells 2018-08-30 13:20:39 +00:00
swap.nix
sysctl.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
system-environment.nix
system-path.nix nixos: doc: introduce documentation config subtree 2018-03-30 06:52:26 +00:00
terminfo.nix
timezone.nix
unix-odbc-drivers.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
update-users-groups.pl
users-groups.nix fix build with allowAliases=false 2018-07-23 00:12:23 +00:00
vpnc.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
zram.nix zramSwap: remove mentions of old kernels 2018-04-19 16:53:40 +02:00