summaryrefslogtreecommitdiff
path: root/modules/core/nix/extended.nix
blob: 18b41760d1bb1387df1ad65f615d187244b18701 (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
35
36
37
38
39
40
41
42
43
44
45
46
{
  config,
  lib,
  pkgs,
  ...
}:
{
  config = lib.mkIf config.modules.nix.extend {
    programs.nix-index-database.comma.enable = true;
    boot.binfmt.emulatedSystems = [ "aarch64-linux" ];

    nix = {
      # distributedBuilds = true;

      buildMachines =
        map
          (system: {
            inherit system;

            hostName = "eu.nixbuild.net";
            maxJobs = 100;

            supportedFeatures = [
              "benchmark"
              "big-parallel"
            ];
          })
          [
            "x86_64-linux"
            "i686-linux"
            "aarch64-linux"
            "armv7l-linux"
          ];

      settings = {
        extra-platforms = config.boot.binfmt.emulatedSystems;

        extra-sandbox-paths = [
          config.programs.ccache.cacheDir
          "/run/binfmt"
          "${pkgs.qemu}"
        ];
      };
    };
  };
}