QE55SHCRM4EPX5UKNQMPDSEGR33P3CNUU6IJCEHXRDSFEMG6FETQC R3PMYATMF554P6ZCSMOFNEBZECLFBIT53DKHG2KZ2CIIBO5IJPGQC OWZPBDIBN3TM4556FOAUULIE4FBDGIF2QYOKY2E7AOLMIK7ETTPQC ATF3K2KSKMI6STPROVW54ZGLYM6S3XPB45AKAZODDKIXFR4HWYFAC BAHAE6MCRPVFMSXFJOS2LOYDD4VQ6XLW5SDNINV2JV6RQRV4N4EAC V2RX2Y7VB7Y3BHX3ALK4GTCMFJATMLCKIAT4U3XCYZZZIUBIIZ5QC JU3FNMQQ2AZ4NITYUGSBZPJO645Y5TVL5TEQPNKVW2QXQQDIL6JQC RTBMBSBABSGTRICJ4AWBKWO3JJHBRKV6FGOMYPDD7X6SS6X35ZIQC UBB7TTAXVPQQCOVHACKWXSPV2NPARSHREYJB6J3RSEDZZIXPFGOAC nix.distributedBuilds = mkIf (config.networking.hostName != "yuzu") true; # No distributed builds for powerful desktop.nix.buildMachines = mkIf (config.networking.hostName != "yuzu") (inputs.self.nixosConfigurations|> attrsToList|> filter ({ name, value }: name != config.networking.hostName && value.config.users.users ? build)|> map ({ name, value }:{hostName = name;maxJobs = 25; # This is handled by remote anyway so not sure what difference it makes..protocol = "ssh-ng";sshUser = "build";sshKey = "/root/.ssh/id";supportedFeatures = ["benchmark""big-parallel""kvm""nixos-test"];system = value.config.nixpkgs.hostPlatform.system;}));
{config.flake.modules.nixos.nix-distributed-builds ={inputs,config,lib,...}:letinherit (lib.attrsets) attrsToList;inherit (builtins) filter;in{nix.distributedBuilds = true;nix.buildMachines = (inputs.self.nixosConfigurations|> attrsToList|> filter ({ name, value }: name != config.networking.hostName && value.config.users.users ? build)|> map ({ name, value }:{hostName = name;maxJobs = 25; # This is handled by remote anyway so not sure what difference it makes..protocol = "ssh-ng";sshUser = "build";sshKey = "/root/.ssh/id";supportedFeatures = ["benchmark""big-parallel""kvm""nixos-test"];system = value.config.nixpkgs.hostPlatform.system;}));};config.flake.modules.nixos.nix-distributed-builder ={ config, lib, ... }:letinherit (config.flake) keys;inherit (lib.lists) singleton;in{users.users.build = {description = "Build";isNormalUser = true;createHome = false;openssh.authorizedKeys.keys = keys.all;extraGroups = singleton "build";};};}