File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ with builtins; with lib;
3333 config =
3434 let
3535 cfg = config . wsl ;
36- syschdemd = import ../syschdemd.nix { inherit lib pkgs config ; defaultUser = cfg . defaultUser ; defaultUserHome = config . users . users . ${ cfg . defaultUser } . home ; } ;
36+ syschdemd = import ../syschdemd.nix { inherit lib pkgs config ; inherit ( cfg ) automountPath defaultUser ; defaultUserHome = config . users . users . ${ cfg . defaultUser } . home ; } ;
3737 in
3838 mkIf cfg . enable {
3939
Original file line number Diff line number Diff line change 11{ lib
22, pkgs
33, config
4+ , automountPath
45, defaultUser
56, defaultUserHome ? "/home/${ defaultUser } "
67, ...
@@ -21,6 +22,7 @@ pkgs.substituteAll {
2122
2223 systemdWrapper = pkgs . writeShellScript "systemd-wrapper.sh" ''
2324 mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc || true
25+ mount --make-rshared ${ automountPath }
2426 exec systemd
2527 '' ;
2628}
Original file line number Diff line number Diff line change @@ -8,14 +8,12 @@ systemPath=$(${sw}/readlink -f /nix/var/nix/profiles/system)
88function start_systemd {
99 echo " Starting systemd..." >&2
1010
11- @wrapperDir@/umount /proc/sys/fs/binfmt_misc || true
12-
1311 PATH=/run/current-system/systemd/lib/systemd:@fsPackagesPath@ \
1412 LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
1513 @daemonize@/bin/daemonize /run/current-system/sw/bin/unshare -fp --mount-proc @systemdWrapper@
1614
1715 # Wait until systemd has been started to prevent a race condition from occuring
18- while ! /run/current-system/ sw/bin/ pgrep -xf systemd > /run/systemd.pid; do
16+ while ! $ sw /pgrep -xf systemd | $sw /tail -n1 > /run/systemd.pid; do
1917 $sw /sleep 1s
2018 done
2119
You can’t perform that action at this time.
0 commit comments