1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 08:01:14 +00:00
nixpkgs/nixos
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
..
doc doc: document luksroot.nix changes in release notes 2018-08-08 02:47:50 +00:00
lib [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
maintainers create-amis.sh: Change directory for AMIs 2018-07-24 21:19:14 +02:00
modules nixos/shells: avoid overriding the environment for child shells 2018-08-30 13:20:39 +00:00
tests Merge pull request #44841 from Ma27/bump-hydra 2018-08-14 09:55:11 +02:00
COPYING
default.nix
README
release-combined.nix nixos/release-combined: remove keymap tests from tested job 2018-06-06 21:02:55 +02:00
release-small.nix
release.nix Merge pull request #44556 from johanot/certmgr-module-init 2018-08-10 15:11:26 +02: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.