{ self, deploy-rs, ... }: let deployArch = "x86_64-linux"; mkDeployNodes = nodeDef: builtins.mapAttrs (name: machine: nodeDef name machine) self.machines.${deployArch}; in { deploy = { sshUser = "root"; user = "root"; nodes = mkDeployNodes (name: machine: let nixosConfiguration = self.nixosConfigurations.${name}; machineArch = nixosConfiguration.config.facter.report.system; in { hostname = nixosConfiguration.config.networking.fqdn; profiles.system = { remoteBuild = machineArch != deployArch; path = deploy-rs.lib.${machineArch}.activate.nixos nixosConfiguration; }; }); }; }