summary refs log tree commit diff
path: root/modules/nix.nix
blob: 13572c510bde24991f2f1ef0aa297f8fc3f28a82 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
  me,
  lib,
  self,
  ...
}:

{
  nix = {
    # add compat scripts to the environment,
    # to allow nixos-option to find the configuration
    nixPath = [
      "nixpkgs=${self}/compat"
      "nixos-config=${self}/compat/nixos"
    ];

    settings = {
      experimental-features = [
        "flakes"
        "nix-command"
      ];
      trusted-users = [
        "root"
        "mel"
      ];
    };

    distributedBuilds = true;
    buildMachines =
      let
        tailnet = n: "${n}.serval-moth.ts.net";

        defaults = {
          sshUser = "mel";
          system = "x86_64-linux";
          supportedFeatures = [
            "kvm"
            "big-parallel"
            "nixos-test"
            "benchmark"
          ];
        };
      in
      lib.filter (m: m.hostName != me) [
        {
          hostName = tailnet "bismuth";
          maxJobs = 16;
          speedFactor = 5;
          publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUVQMVE4LzA3UEQ1QVhnaE03Y2Q5VWY1NFlZOHJrdUJIZmxscjFLenhoMTAgcm9vdEBiaXNtdXRoCg==";
          inherit (defaults) sshUser system supportedFeatures;
        }
        {
          hostName = tailnet "corsac";
          maxJobs = 4;
          speedFactor = 2;
          publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUh4Z2hWWDBPcStlSGtsZy9lN3MvcWhDOENLOFBMVWd2cExrMkc1M3hFaksgcm9vdEBjb3JzYWMK";
          inherit (defaults) sshUser system supportedFeatures;
        }
        {
          hostName = tailnet "renard";
          maxJobs = 6;
          speedFactor = 3;
          publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUovcURMNys4NiswSDZOa1BzL3c0R1lpV1F3VC80WUF4OU8ySjdzTGtLbWYgcm9vdEByZW5hcmQK";
          inherit (defaults) sshUser system supportedFeatures;
        }
      ];
  };
}