diff --git a/hosts/modules/nixcache.nix b/hosts/modules/nixcache.nix index 8356df51..54de21a4 100644 --- a/hosts/modules/nixcache.nix +++ b/hosts/modules/nixcache.nix @@ -2,6 +2,10 @@ # if one of these hosts is offline, instead manually specify just cachix: # - `nixos-rebuild --option substituters https://cache.nixos.org/` # +# additionally, sends build jobs to supercap/servo/desko (splits the jobs across all that are enabled). +# to verify one particular remote builder: +# - `nix store ping --store ssh://servo` +# # future improvements: # - apply for community arm build box: # - @@ -44,6 +48,10 @@ in default = true; type = types.bool; }; + sane.nixcache.remote-builders.supercap = mkOption { + default = true; + type = types.bool; + }; }; config = { @@ -87,6 +95,17 @@ in sshUser = "nixremote"; sshKey = config.sops.secrets."nixremote_ssh_key".path; }) + (lib.mkIf cfg.remote-builders.supercap { + hostName = "supercap"; + system = "x86_64-linux"; + protocol = "ssh-ng"; + maxJobs = 32; + speedFactor = 16; + supportedFeatures = [ "big-parallel" ]; + mandatoryFeatures = [ ]; + sshUser = "root"; + sshKey = config.sops.secrets."nixremote_ssh_key".path; + }) ]; nix.distributedBuilds = lib.mkIf (cfg.remote-builders.desko || cfg.remote-builders.servo) true;