summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-04-15 20:56:29 +0300
committerK900 <me@0upti.me>2023-04-15 20:56:29 +0300
commitf3b6f6b04728416c64fc5ef52199fd9b9843c47d (patch)
tree619e5bd5b96f045378fa4f731212acb781ad5d1d /modules
parentf097aa2d9ad136cb796b571366517f70707bdebb (diff)
fix(native-systemd): fix PATH, don't source set-environment
We need to preserve PATH from the parent in case we're called by whatever random thing decided to call /bin/sh directly from inside NixOS. Unrelatedly, set-environment will be sourced by /etc/profile anyway, which persists across boots and is thus not racy.
Diffstat (limited to 'modules')
-rw-r--r--modules/wsl-distro.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix
index 6db95d9..4a6ab3a 100644
--- a/modules/wsl-distro.nix
+++ b/modules/wsl-distro.nix
@@ -4,8 +4,7 @@ with lib;
let
bashWrapper = pkgs.writeShellScriptBin "sh" ''
- export PATH=/bin:${lib.makeBinPath [ pkgs.systemd pkgs.gnugrep ]}
- . ${config.system.build.etc}/etc/set-environment
+ export PATH="$PATH:${lib.makeBinPath [ pkgs.systemd pkgs.gnugrep ]}"
exec ${pkgs.bashInteractive}/bin/sh "$@"
'';