From ec43143933fcda0d4138120bc1e2ddb774b071e5 Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Thu, 1 Oct 2020 08:05:00 +0200 Subject: [PATCH] Fix update-script --- lib/update-system.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/update-system.nix b/lib/update-system.nix index 12489225..146bbb1a 100644 --- a/lib/update-system.nix +++ b/lib/update-system.nix @@ -11,8 +11,9 @@ in { main = do paths <- myNixPath "${configPath}" args <- getArgs - bracket (rm canaryPath) (\() -> exe "/run/wrappers/bin/sudo" "-u" "maralorn" "git" "-C" privatePath "restore" canaryPath) $ \() -> - nixos_rebuild (paths ++ ["build", "--no-out-link"] ++ remoteBuildParams ++ fmap toString args) + bracket (rm canaryPath) (\() -> exe "/run/wrappers/bin/sudo" "-u" "maralorn" "git" "-C" privatePath "restore" canaryPath) $ \() -> do + nixos_rebuild (paths ++ ["build"] ++ remoteBuildParams ++ fmap toString args) + rm "result" nixos_rebuild (paths ++ ["switch"] ++ fmap toString args) ''; }