Skip to content

Commit 72b8000

Browse files
committed
Only include wslpath derivation on syschdemd
1 parent 0c872da commit 72b8000

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

modules/wsl-distro.nix

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,6 @@ in
8080
"resolv.conf".enable = false;
8181
})
8282
];
83-
84-
systemPackages = [
85-
(pkgs.runCommand "wslpath" { } ''
86-
mkdir -p $out/bin
87-
ln -s /init $out/bin/wslpath
88-
'')
89-
];
9083
};
9184

9285
# dhcp is handled by windows
@@ -189,6 +182,12 @@ in
189182

190183
# Include Windows %PATH% in Linux $PATH.
191184
environment.extraInit = mkIf cfg.interop.includePath ''PATH="$PATH:$WSLPATH"'';
185+
environment.systemPackages = [
186+
(pkgs.runCommand "wslpath" { } ''
187+
mkdir -p $out/bin
188+
ln -s /init $out/bin/wslpath
189+
'')
190+
];
192191
})
193192
(mkIf cfg.nativeSystemd {
194193
wsl.wslConf = {

0 commit comments

Comments
 (0)