Unverified Commit 1da9bad1 authored by r-vdp's avatar r-vdp
Browse files

nixos-rebuild: run systemd-run with / as the working directory

Before we would run systemd-run with the user's home dir as the working
directory, but this causes issues when the home dir is on a separate
partition and that partition cannot be mounted, as the transient unit
created by systemd-run would gain a dependency on the home mount and fail.
Since the root partition is guaranteed to be mounted, using that as the
working directory avoids this issue and allows doing a remote
nixos-rebuild to fix the issue preventing /home from being mounted.
parent 2b1f15a6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -898,7 +898,6 @@ elif [[ "$action" = switch || "$action" = boot || "$action" = test || "$action"
        "--no-ask-password"
        "--pipe"
        "--quiet"
        "--same-dir"
        "--service-type=exec"
        "--unit=nixos-rebuild-switch-to-configuration"
        "--wait"