mirror of
https://cgit.krebsco.de/krops
synced 2024-11-30 06:59:46 +01:00
writeDeploy: add crossDeploy argument
This commit is contained in:
parent
402c9cac25
commit
ea7e0c3a35
2 changed files with 14 additions and 0 deletions
11
README.md
11
README.md
|
@ -103,6 +103,17 @@ This requires the building machine to have ssh access to the target.
|
||||||
To build the system on the same machine, that runs the krops command,
|
To build the system on the same machine, that runs the krops command,
|
||||||
set up a local ssh service and set the build host to localhost.
|
set up a local ssh service and set the build host to localhost.
|
||||||
|
|
||||||
|
### `crossDeploy` (optional, defaults to false)
|
||||||
|
|
||||||
|
Use this option if target host architecture is not the same as the build host
|
||||||
|
architecture as set by `buildHost` i.e. deploying to aarch64 from a x86_64
|
||||||
|
machine. Setting this option will disable building & running nix in the wrong
|
||||||
|
architecture when running `nixos-rebuild` on the deploying machine. It is
|
||||||
|
required to set `nixpkgs.localSystem.system` in the NixOS configuration to the
|
||||||
|
architecture of the target host. This option is only useful if the build host
|
||||||
|
also has remote builders that are capable of producing artifacts for the deploy
|
||||||
|
architecture.
|
||||||
|
|
||||||
### `fast` (optional, defaults to false)
|
### `fast` (optional, defaults to false)
|
||||||
|
|
||||||
Run `nixos-rebuild switch` immediately without building the system
|
Run `nixos-rebuild switch` immediately without building the system
|
||||||
|
|
|
@ -48,6 +48,7 @@ in
|
||||||
writeDeploy = name: {
|
writeDeploy = name: {
|
||||||
backup ? false,
|
backup ? false,
|
||||||
buildTarget ? null,
|
buildTarget ? null,
|
||||||
|
crossDeploy ? false,
|
||||||
fast ? false,
|
fast ? false,
|
||||||
force ? false,
|
force ? false,
|
||||||
source,
|
source,
|
||||||
|
@ -70,6 +71,8 @@ in
|
||||||
''}
|
''}
|
||||||
${rebuild ([
|
${rebuild ([
|
||||||
"switch"
|
"switch"
|
||||||
|
] ++ lib.optionals crossDeploy [
|
||||||
|
"--no-build-nix"
|
||||||
] ++ lib.optionals (buildTarget' != target') [
|
] ++ lib.optionals (buildTarget' != target') [
|
||||||
"--build-host" "${buildTarget'.user}@${buildTarget'.host}"
|
"--build-host" "${buildTarget'.user}@${buildTarget'.host}"
|
||||||
"--target-host" "${target'.user}@${target'.host}"
|
"--target-host" "${target'.user}@${target'.host}"
|
||||||
|
|
Loading…
Reference in a new issue