1
0
Fork 0
mirror of https://cgit.krebsco.de/krops synced 2024-11-26 21:19:47 +01:00

krops writeDeploy: add operation parameter

This commit is contained in:
tv 2022-07-16 16:50:32 +02:00
parent 89e5e67659
commit 9c49e9aa24
2 changed files with 8 additions and 3 deletions

View file

@ -125,13 +125,17 @@ architecture.
### `fast` (optional, defaults to false) ### `fast` (optional, defaults to false)
Run `nixos-rebuild switch` immediately without building the system Run `nixos-rebuild` immediately without building the system in a dedicated `nix
in a dedicated `nix build` step. build` step.
### `force` (optional, defaults to false) ### `force` (optional, defaults to false)
Create the sentinel file (`/var/src/.populate`) before syncing the new source. 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 ## writeTest
Very similiar to writeDeploy, but just builds the system on the target without Very similiar to writeDeploy, but just builds the system on the target without

View file

@ -49,6 +49,7 @@ in
crossDeploy ? false, crossDeploy ? false,
fast ? null, fast ? null,
force ? false, force ? false,
operation ? "switch",
source, source,
target target
}: let }: let
@ -65,7 +66,7 @@ in
(populate { inherit backup force source; target = buildTarget'; })} (populate { inherit backup force source; target = buildTarget'; })}
${populate { inherit backup force source; target = target'; }} ${populate { inherit backup force source; target = target'; }}
${rebuild ([ ${rebuild ([
"switch" operation
] ++ lib.optionals crossDeploy [ ] ++ lib.optionals crossDeploy [
"--no-build-nix" "--no-build-nix"
] ++ lib.optionals (buildTarget' != target') [ ] ++ lib.optionals (buildTarget' != target') [