aboutsummaryrefslogtreecommitdiff
path: root/profiles/remote-builder.nix
blob: cc7751f4f25cc6e5fc5a45d3625c9e84c45a3fed (plain) (blame)
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
29
30
31
32
33
34
{ ... }:
{
  nix.buildMachines = [
    {
      hostName = "vm-synology";
      sshUser = "builder";

      # 'ssh-ng' is faster if both machines are NixOS but falls flat if the
      # machine Nix will attempt a connection to is not NixOS. In such a case
      # you must use 'ssh' instead.
      protocol = "ssh-ng";

      # Systems for which builds will be offloaded.
      systems = [
        "x86_64-linux"
      ];

      # Default is 1 but may keep the builder idle in between builds
      maxJobs = 1;

      supportedFeatures = [
        "nixos-test"
      ];
    }
  ];

  nix.distributedBuilds = true;

  programs.ssh.extraConfig = ''
    Host builder
      User builder
      HostName vm-synology
  '';
}