From 0583eb2f07af1aae1062025331d7132dc2639dfe Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 17 Jan 2023 21:49:53 +0000 Subject: [PATCH] clouvider-lon01: enable aarch64 emulation --- ops/nixos/clouvider-lon01/default.nix | 3 +++ ops/nixos/lib/macmini-distributed.nix | 9 ++++++++- ops/nixos/lib/oracle-lon01-distributed.nix | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ops/nixos/lib/oracle-lon01-distributed.nix diff --git a/ops/nixos/clouvider-lon01/default.nix b/ops/nixos/clouvider-lon01/default.nix index 34e672085e..dc5b58a3ce 100644 --- a/ops/nixos/clouvider-lon01/default.nix +++ b/ops/nixos/clouvider-lon01/default.nix @@ -10,6 +10,7 @@ ../lib/minotarproxy.nix ../lib/whitby-distributed.nix ../lib/macmini-distributed.nix + ../lib/oracle-lon01-distributed.nix ../lib/quotes.bfob.gg.nix ../lib/coredns/default.nix ]; @@ -314,5 +315,7 @@ depot.ops.factorio.multiworld ]; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + system.stateVersion = "20.09"; } diff --git a/ops/nixos/lib/macmini-distributed.nix b/ops/nixos/lib/macmini-distributed.nix index 69c0752369..cc2fb53373 100644 --- a/ops/nixos/lib/macmini-distributed.nix +++ b/ops/nixos/lib/macmini-distributed.nix @@ -5,13 +5,20 @@ { lib, ... }: { # Distributed builds! - nix.buildMachines = lib.mkAfter [ { + nix.buildMachines = lib.mkAfter [{ hostName = "mac-mini"; system = "x86_64-darwin"; maxJobs = 4; speedFactor = 1; supportedFeatures = [ ]; mandatoryFeatures = [ ]; + } { + hostName = "mac-mini"; + system = "aarch64-darwin"; + maxJobs = 4; + speedFactor = 1; + supportedFeatures = [ ]; + mandatoryFeatures = [ ]; }]; nix.distributedBuilds = true; nix.extraOptions = '' diff --git a/ops/nixos/lib/oracle-lon01-distributed.nix b/ops/nixos/lib/oracle-lon01-distributed.nix new file mode 100644 index 0000000000..448c6fd146 --- /dev/null +++ b/ops/nixos/lib/oracle-lon01-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 = "oracle-lon01"; + system = "aarch64-linux"; + maxJobs = 4; + speedFactor = 1; + supportedFeatures = [ ]; + mandatoryFeatures = [ ]; + }]; + nix.distributedBuilds = true; + nix.extraOptions = '' + builders-use-substitutes = true + ''; +}