summaryrefslogtreecommitdiff
path: root/modules/builder.nix
blob: fb0740ada01e17013d0273a675026299b4b154d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ config, lib, pkgs, ... }:
let
  cfg = config.orbekk.builder;
in
{
  options = {
    orbekk.builder = {
      enableRemoteBuilds = lib.mkEnableOption "Enable building on remote server";
    };
  };

  config = lib.mkIf cfg.enableRemoteBuilds {
    nix.buildMachines = [ {
      sshUser = "builder";
      hostName = "dragon.orbekk.com";
      systems = ["x86_64-linux"];
      maxJobs = 2;
      speedFactor = 2;
      supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
      mandatoryFeatures = [ ];
    }] ;
    nix.distributedBuilds = true;
    # optional, useful when the builder has a faster internet connection than yours
    # nix.extraOptions = ''
    # builders-use-substitutes = true
    # '';
  };
}