diff options
| author | quentin@aristote.fr <quentin@aristote.fr> | 2025-02-23 10:46:59 +0100 |
|---|---|---|
| committer | quentin@aristote.fr <quentin@aristote.fr> | 2025-02-23 10:57:41 +0100 |
| commit | 95134b39dbeb11626475e8416d6aee7807dcdeca (patch) | |
| tree | ef3a565f76bc16be7ec8f123fa4c222fda11c194 | |
| parent | 6138a0b0ab10b2f8ab3e2021c09f1ee354bead3d (diff) | |
nixos: autoUpgrade: dry-build before rebuilding
| -rw-r--r-- | modules/nixos/personal/nix.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/nixos/personal/nix.nix b/modules/nixos/personal/nix.nix index f167d55..53daa6c 100644 --- a/modules/nixos/personal/nix.nix +++ b/modules/nixos/personal/nix.nix @@ -123,10 +123,11 @@ in { flags = lib.optional (!hasFlake) "--upgrade-all"; }; systemd.services.nixos-upgrade = lib.mkMerge [ - checkNetwork { + preStart = "${config.system.build.nixos-rebuild}/bin/nixos-rebuild dry-build ${toString config.system.autoUpgrade.flags}"; personal.monitor = true; } + checkNetwork # has to come second, so network is checked before the dry-build ]; }) |
