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 let
nixosConfigurations = lib'.mapAttrs' nixosConfigurations = lib'.mapAttrs'
(name: value: (name: value:
let metadata = images.${name}; in
lib'.nameValuePair "nixos-${name}" { lib'.nameValuePair "nixos-${name}" {
hostname = name; hostname = metadata.deploy.hostname or name;
fastConnection = true; 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 = { profiles.system = {
sshUser = "admin"; sshUser = "admin";
user = "root"; user = "root";

View File

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