2024-04-13 15:28:31 +00:00
|
|
|
{ self, pkgs, machines, deploy-rs, ... }:
|
2024-03-02 12:58:17 +00:00
|
|
|
let
|
|
|
|
mkDeployNodes = nodeDef:
|
|
|
|
builtins.mapAttrs
|
|
|
|
(name: machine: nodeDef name machine)
|
2024-04-13 13:43:01 +00:00
|
|
|
machines;
|
2024-03-02 12:58:17 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
deploy = {
|
|
|
|
sshUser = "root";
|
|
|
|
user = "root";
|
|
|
|
|
2024-03-05 19:56:00 +00:00
|
|
|
nodes = mkDeployNodes (name: machine:
|
|
|
|
let
|
|
|
|
nixosConfiguration = self.nixosConfigurations.${name};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
hostname = nixosConfiguration.config.networking.fqdn;
|
|
|
|
profiles.system = {
|
2024-04-13 15:28:31 +00:00
|
|
|
remoteBuild = machine.arch != pkgs.stdenv.hostPlatform.system;
|
2024-03-05 19:56:00 +00:00
|
|
|
path = deploy-rs.lib.${machine.arch}.activate.nixos nixosConfiguration;
|
|
|
|
};
|
|
|
|
});
|
2024-03-02 12:58:17 +00:00
|
|
|
};
|
|
|
|
}
|