diff options
| author | Fuwn <[email protected]> | 2024-10-28 09:44:00 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-28 09:44:04 -0700 |
| commit | 1522254ec90eb05d8bb401b8cd3112ed1b383b0f (patch) | |
| tree | 98b3a878d525c1ad7e47f015e4744efd881d24f3 /modules/core | |
| parent | options: flip nix.extend default (diff) | |
| download | nixos-config-1522254ec90eb05d8bb401b8cd3112ed1b383b0f.tar.xz nixos-config-1522254ec90eb05d8bb401b8cd3112ed1b383b0f.zip | |
options: distributed builds nix option
Diffstat (limited to 'modules/core')
| -rw-r--r-- | modules/core/nix/default.nix | 1 | ||||
| -rw-r--r-- | modules/core/nix/distributed-builds.nix | 26 | ||||
| -rw-r--r-- | modules/core/nix/extended.nix | 38 |
3 files changed, 34 insertions, 31 deletions
diff --git a/modules/core/nix/default.nix b/modules/core/nix/default.nix index f1919f0..2280f97 100644 --- a/modules/core/nix/default.nix +++ b/modules/core/nix/default.nix @@ -6,6 +6,7 @@ }: { imports = [ + ./distributed-builds.nix ./extended.nix ./nh.nix ]; diff --git a/modules/core/nix/distributed-builds.nix b/modules/core/nix/distributed-builds.nix new file mode 100644 index 0000000..2960bfd --- /dev/null +++ b/modules/core/nix/distributed-builds.nix @@ -0,0 +1,26 @@ +{ config, lib, ... }: +{ + config.nix = lib.mkIf config.modules.nix.distributedBuilds { + 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" + ]; + }; +} diff --git a/modules/core/nix/extended.nix b/modules/core/nix/extended.nix index 18b4176..6ce2695 100644 --- a/modules/core/nix/extended.nix +++ b/modules/core/nix/extended.nix @@ -9,38 +9,14 @@ programs.nix-index-database.comma.enable = true; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; - nix = { - # distributedBuilds = true; + nix.settings = { + extra-platforms = config.boot.binfmt.emulatedSystems; - 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}" - ]; - }; + extra-sandbox-paths = [ + config.programs.ccache.cacheDir + "/run/binfmt" + "${pkgs.qemu}" + ]; }; }; } |