From 9c49e9aa24d7793e2dc99d00e9df04d65851a8ef Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 16 Jul 2022 16:50:32 +0200 Subject: krops writeDeploy: add operation parameter --- README.md | 8 ++++++-- pkgs/krops/default.nix | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d868768..98abac1 100644 --- a/README.md +++ b/README.md @@ -125,13 +125,17 @@ architecture. ### `fast` (optional, defaults to false) -Run `nixos-rebuild switch` immediately without building the system -in a dedicated `nix build` step. +Run `nixos-rebuild` immediately without building the system in a dedicated `nix +build` step. ### `force` (optional, defaults to false) Create the sentinel file (`/var/src/.populate`) before syncing the new source. +### `operation` (optional, defaults to "switch") + +Specifies which `nixos-rebuild` operation to perform. + ## writeTest Very similiar to writeDeploy, but just builds the system on the target without diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix index 7fe8370..63d23dc 100644 --- a/pkgs/krops/default.nix +++ b/pkgs/krops/default.nix @@ -49,6 +49,7 @@ in crossDeploy ? false, fast ? null, force ? false, + operation ? "switch", source, target }: let @@ -65,7 +66,7 @@ in (populate { inherit backup force source; target = buildTarget'; })} ${populate { inherit backup force source; target = target'; }} ${rebuild ([ - "switch" + operation ] ++ lib.optionals crossDeploy [ "--no-build-nix" ] ++ lib.optionals (buildTarget' != target') [ -- cgit v1.2.3