config: add deploy subtable for declarative images

It accepts keys used as arguments for deployment settings with
deploy-rs. This should make deployment a little bit easier for me
instead of manually creating a deploy entry every time.
This commit is contained in:
Gabriel Arazas 2023-06-23 00:26:04 +08:00
parent 36e2a817ae
commit 9f2452ec6e
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 11 additions and 2 deletions

View File

@ -410,9 +410,13 @@
let
nixosConfigurations = lib'.mapAttrs'
(name: value:
let metadata = images.${name}; in
lib'.nameValuePair "nixos-${name}" {
hostname = name;
fastConnection = true;
hostname = metadata.deploy.hostname or name;
autoRollback = metadata.deploy.auto-rollback or true;
magicRollback = metadata.deploy.magic-rollback or true;
fastConnection = metadata.deploy.fast-connection or true;
remoteBuild = metadata.deploy.remote-build or false;
profiles.system = {
sshUser = "admin";
user = "root";

View File

@ -18,6 +18,11 @@ system = "x86_64-linux"
format = "iso"
domain = "foodogsquared.one"
[plover.deploy]
hostname = "plover.foodogsquared.one"
auto-rollback = true
magic-rollback = true
[void]
system = "x86_64-linux"
format = "vm"