From 1da9bad1a2136516be58c1f72551009b967d51a8 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Fri, 1 Nov 2024 13:26:35 +0100 Subject: [PATCH] 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. --- pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 6236c923c8a9..8ac445b53b50 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -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"