diff --git a/home-manager/roles/laptop.nix b/home-manager/roles/laptop.nix index 51f4ddfa..960eead3 100644 --- a/home-manager/roles/laptop.nix +++ b/home-manager/roles/laptop.nix @@ -45,7 +45,7 @@ in { main = do say "Building ~/.modes for apollo" nixPath <- myNixPath "${configPath}" - bracket (rm canaryPath) (\() -> git "-C" privatePath "restore" canaryPath) $ \() -> + bracket (rm "-f" canaryPath) (\() -> git "-C" privatePath "restore" canaryPath) $ \() -> nix_build nixPath (params ++ remoteBuildParams) &!> StdOut |> nom nix_build nixPath params activate_mode diff --git a/lib/update-system.nix b/lib/update-system.nix index f374ce32..6accc27a 100644 --- a/lib/update-system.nix +++ b/lib/update-system.nix @@ -11,7 +11,7 @@ in { main = do paths <- myNixPath "${configPath}" args <- getArgs - bracket (rm canaryPath) (\() -> exe "/run/wrappers/bin/sudo" "-u" "maralorn" "git" "-C" privatePath "restore" canaryPath) $ \() -> do + bracket (rm "-f" canaryPath) (\() -> exe "/run/wrappers/bin/sudo" "-u" "maralorn" "git" "-C" privatePath "restore" canaryPath) $ \() -> do nix_build (paths ++ buildSystemParams ++ ["--no-out-link"] ++ remoteBuildParams ++ fmap toString args) &!> StdOut |> nom nixos_rebuild (paths ++ ["switch"] ++ fmap toString args) &!> StdOut |> nom '';