summaryrefslogtreecommitdiff
path: root/modules/core/nix/extended.nix
blob: 4e924cd7a1a23f7d1f255e88cf909387aafae8e4 (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
47
48
{
  config,
  lib,
  pkgs,
  ...
}:
{
  imports = [ ./nh.nix ];

  config = lib.mkIf config.modules.nix.extend {
    nixpkgs.config.cudaSupport = true;
    programs.nix-index-database.comma.enable = true;

    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}"
        ];
      };
    };
  };
}