From 7b7e323fd845dddf23a67d8f2233a91a438b9818 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Fri, 24 Oct 2025 19:39:08 +0200 Subject: [PATCH] Fix nixos-rebuild sudo path mismatch Use explicit /run/current-system/sw/bin/nixos-rebuild path instead of 'nixos-rebuild' command to match sudo rules exactly. This resolves 'command not allowed' errors when the command resolves to nix store paths. --- agent/src/agent.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/src/agent.rs b/agent/src/agent.rs index 38fb6ae..c7a3064 100644 --- a/agent/src/agent.rs +++ b/agent/src/agent.rs @@ -302,7 +302,7 @@ impl Agent { tokio::process::Command::new("sudo") .arg("-u") .arg("cm") - .arg("nixos-rebuild") + .arg("/run/current-system/sw/bin/nixos-rebuild") .arg("switch") .current_dir(working_dir) .output()