From 704e9b53f176d403514a33ca3a54d184cca8ef89 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Thu, 8 Apr 2021 21:45:49 -0400 Subject: [PATCH] optimize rebuild scripts --- modules/flakes.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/flakes.nix b/modules/flakes.nix index e52c87f..550b0cb 100644 --- a/modules/flakes.nix +++ b/modules/flakes.nix @@ -31,9 +31,9 @@ in [ "switch" "switch" ] [ "build" "build" ] [ "boot" "boot" ] - [ "switch-upgrade" "switch" "--refresh" (lib.optionalString (cfg.rebuildPath == "/etc/nixos") "--recreate-lock-file") ] - [ "build-upgrade" "build" "--refresh" (lib.optionalString (cfg.rebuildPath == "/etc/nixos") "--recreate-lock-file") ] - [ "boot-upgrade" "boot" "--refresh" (lib.optionalString (cfg.rebuildPath == "/etc/nixos") "--recreate-lock-file") ] + [ "switch-upgrade" "switch" (if cfg.rebuildPath == "/etc/nixos" then "--recreate-lock-file" else "--refresh") ] + [ "build-upgrade" "build" (if cfg.rebuildPath == "/etc/nixos" then "--recreate-lock-file" else "--refresh") ] + [ "boot-upgrade" "boot" (if cfg.rebuildPath == "/etc/nixos" then "--recreate-lock-file" else "--refresh") ] ]; };