diff options
| author | Andrew Childs <lorne@cons.org.nz> | 2018-10-25 00:30:34 +0900 |
|---|---|---|
| committer | Andrew Childs <lorne@cons.org.nz> | 2018-10-25 01:00:52 +0900 |
| commit | 676ef103771aa3fc4b150290294b8ad5610d2750 (patch) | |
| tree | a208b52ff962a4f0cfc0041cd5f473f6795a07dc /modules/programs/fish.nix | |
| parent | e6a698a7011487f16dd061d65e36ec330465ed16 (diff) | |
Unify environment configuration and don't run in child shells
This should enable `nix run` to work under shells like fish and zsh,
as well as making child shells not needlessly reset any environment
that should be inherited.
Implementation adapted from NixOS.
Diffstat (limited to 'modules/programs/fish.nix')
| -rw-r--r-- | modules/programs/fish.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 6ee5355..470dcac 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -109,8 +109,9 @@ in set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $__fish_datadir/functions # source the NixOS environment config - fenv export PATH=${config.environment.systemPath} - fenv source ${config.system.build.setEnvironment} + if [ -z "$__NIX_DARWIN_SET_ENVIRONMENT_DONE" ] + fenv source ${config.system.build.setEnvironment} + end # clear fish_function_path so that it will be correctly set when we return to $__fish_datadir/config.fish set -e fish_function_path |
