mirror of
https://github.com/divnix/digga.git
synced 2024-12-23 16:11:51 +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
|
Generate the `nodes` attribute expected by deploy-rs
|
||||||
where _nixosConfigurations_ are `nodes`.
|
where _nixosConfigurations_ are `nodes`.
|
||||||
|
|
||||||
|
Example input:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
hostname-1 = {
|
||||||
|
fastConnection = true;
|
||||||
|
sshOpts = [ "-p" "25" ];
|
||||||
|
};
|
||||||
|
hostname-2 = {
|
||||||
|
sshOpts = [ "-p" "19999" ];
|
||||||
|
sshUser = "root";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
**/
|
**/
|
||||||
|
lib.recursiveUpdate
|
||||||
lib.mapAttrs
|
(lib.mapAttrs
|
||||||
(_: c: lib.recursiveUpdate
|
(_: c:
|
||||||
{
|
{
|
||||||
hostname = getFqdn c;
|
hostname = getFqdn c;
|
||||||
|
profiles.system = {
|
||||||
profiles.system = {
|
user = "root";
|
||||||
user = "root";
|
path = deploy.lib.${c.config.nixpkgs.system}.activate.nixos c;
|
||||||
path = deploy.lib.${c.config.nixpkgs.system}.activate.nixos c;
|
};
|
||||||
};
|
}
|
||||||
}
|
)
|
||||||
extraConfig)
|
hosts)
|
||||||
hosts;
|
extraConfig;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user