From 91f6cb3317a0df5512dce33547df1ae2f24b8295 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Fri, 9 Apr 2021 18:14:06 +0000 Subject: [PATCH] clouvider-lon01: add mac-mini as remote builder --- ops/nixos/clouvider-lon01/default.nix | 1 + ops/nixos/lib/macmini-distributed.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ops/nixos/lib/macmini-distributed.nix diff --git a/ops/nixos/clouvider-lon01/default.nix b/ops/nixos/clouvider-lon01/default.nix index ca4444365e..7bf96a8bfc 100644 --- a/ops/nixos/clouvider-lon01/default.nix +++ b/ops/nixos/clouvider-lon01/default.nix @@ -13,6 +13,7 @@ in { ../lib/zfs.nix ../lib/bgp.nix ../lib/whitby-distributed.nix + ../lib/macmini-distributed.nix ../lib/quotes.bfob.gg.nix ../lib/coredns/default.nix ]; diff --git a/ops/nixos/lib/macmini-distributed.nix b/ops/nixos/lib/macmini-distributed.nix new file mode 100644 index 0000000000..69c0752369 --- /dev/null +++ b/ops/nixos/lib/macmini-distributed.nix @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ lib, ... }: +{ + # Distributed builds! + nix.buildMachines = lib.mkAfter [ { + hostName = "mac-mini"; + system = "x86_64-darwin"; + maxJobs = 4; + speedFactor = 1; + supportedFeatures = [ ]; + mandatoryFeatures = [ ]; + }]; + nix.distributedBuilds = true; + nix.extraOptions = '' + builders-use-substitutes = true + ''; +}