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) ''; }