From ecfd2e9f513269733fdc80ddcfdbd89d48d8b3fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 02:08:29 +0000 Subject: [PATCH] fix: use absolute paths for nix and nixos-rebuild in verify-integrity endpoint Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/7de38316-a649-4395-bfb4-c12a07741078 Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- app/sovran_systemsos_web/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/sovran_systemsos_web/server.py b/app/sovran_systemsos_web/server.py index 9dcec66..4787d43 100644 --- a/app/sovran_systemsos_web/server.py +++ b/app/sovran_systemsos_web/server.py @@ -3068,7 +3068,7 @@ async def api_security_verify_integrity(): store_errors: list[str] = [] try: result = subprocess.run( - ["nix", "store", "verify", "--all", "--no-trust"], + ["/run/current-system/sw/bin/nix", "store", "verify", "--all", "--no-trust"], capture_output=True, text=True, timeout=300, ) combined = (result.stdout + result.stderr).strip() @@ -3088,7 +3088,7 @@ async def api_security_verify_integrity(): try: current_system_path = os.path.realpath("/run/current-system") result = subprocess.run( - ["nixos-rebuild", "build", "--flake", "/etc/nixos", "--no-build-output"], + ["/run/current-system/sw/bin/nixos-rebuild", "build", "--flake", "/etc/nixos", "--no-build-output"], capture_output=True, text=True, timeout=600, ) if result.returncode == 0: