mirror of
https://github.com/divnix/digga.git
synced 2024-12-23 08:02:21 +03:00
ref: mkDeployNodes host attrs
This commit is contained in:
parent
fa15264d48
commit
b4cb50279a
@ -43,18 +43,32 @@ in
|
||||
|
||||
Generate the `nodes` attribute expected by deploy-rs
|
||||
where _nixosConfigurations_ are `nodes`.
|
||||
**/
|
||||
|
||||
lib.mapAttrs
|
||||
(_: c: lib.recursiveUpdate
|
||||
Example input:
|
||||
```
|
||||
{
|
||||
hostname-1 = {
|
||||
fastConnection = true;
|
||||
sshOpts = [ "-p" "25" ];
|
||||
};
|
||||
hostname-2 = {
|
||||
sshOpts = [ "-p" "19999" ];
|
||||
sshUser = "root";
|
||||
};
|
||||
}
|
||||
```
|
||||
**/
|
||||
lib.recursiveUpdate
|
||||
(lib.mapAttrs
|
||||
(_: c:
|
||||
{
|
||||
hostname = getFqdn c;
|
||||
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy.lib.${c.config.nixpkgs.system}.activate.nixos c;
|
||||
};
|
||||
}
|
||||
extraConfig)
|
||||
hosts;
|
||||
)
|
||||
hosts)
|
||||
extraConfig;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user