2024-10-28 13:12:06 +00:00
|
|
|
{
|
|
|
|
self,
|
|
|
|
deploy-rs,
|
|
|
|
...
|
|
|
|
}: let
|
2024-09-07 11:06:37 +00:00
|
|
|
deployArch = "x86_64-linux";
|
2024-03-02 12:58:17 +00:00
|
|
|
mkDeployNodes = nodeDef:
|
|
|
|
builtins.mapAttrs
|
2024-11-04 22:35:04 +00:00
|
|
|
(name: module: nodeDef name module)
|
|
|
|
self.machines;
|
2024-10-28 13:12:06 +00:00
|
|
|
in {
|
2024-03-02 12:58:17 +00:00
|
|
|
deploy = {
|
|
|
|
sshUser = "root";
|
|
|
|
user = "root";
|
|
|
|
|
2024-11-04 22:35:04 +00:00
|
|
|
nodes = mkDeployNodes (name: _module: let
|
2024-10-28 13:12:06 +00:00
|
|
|
nixosConfiguration = self.nixosConfigurations.${name};
|
2024-11-04 21:44:26 +00:00
|
|
|
machineArch = nixosConfiguration.config.facter.report.system;
|
2024-10-28 13:12:06 +00:00
|
|
|
in {
|
|
|
|
hostname = nixosConfiguration.config.networking.fqdn;
|
|
|
|
profiles.system = {
|
2024-11-04 21:44:26 +00:00
|
|
|
remoteBuild = machineArch != deployArch;
|
|
|
|
path = deploy-rs.lib.${machineArch}.activate.nixos nixosConfiguration;
|
2024-10-28 13:12:06 +00:00
|
|
|
};
|
|
|
|
});
|
2024-03-02 12:58:17 +00:00
|
|
|
};
|
|
|
|
}
|