{ self, deploy-rs, ... }: let deployArch = "x86_64-linux"; mkDeployNodes = nodeDef: builtins.mapAttrs (name: module: nodeDef name module) self.machines; in { deploy = { sshUser = "root"; user = "root"; nodes = mkDeployNodes (name: _module: 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; }; }); }; }