From cb0ff1f919afbdd0f8fbcb7ee2a9921018e39fac Mon Sep 17 00:00:00 2001 From: iFargle Date: Fri, 6 Oct 2023 19:41:55 +0900 Subject: [PATCH] Testing remote builders --- nixos/common/modules/remote-builders.nix | 18 ++++++++++++++++++ nixos/default.nix | 7 ++++--- nixos/hosts/nixos-rpi4-02/default.nix | 1 - nixos/hosts/osaka-vultr-01/disks.nix | 3 +-- nixos/minimal.nix | 5 +++-- nixos/small.nix | 5 +++-- 6 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 nixos/common/modules/remote-builders.nix diff --git a/nixos/common/modules/remote-builders.nix b/nixos/common/modules/remote-builders.nix new file mode 100644 index 00000000..7c54dbdb --- /dev/null +++ b/nixos/common/modules/remote-builders.nix @@ -0,0 +1,18 @@ +{ + nix.buildMachines = [ + { + hostName = "nixos-vm-01"; + systems = [ + "x86_64-linux" + "aarch64-linux" + ]; + protocol = "ssh-ng"; + maxJobs = 4; + speedFactor = 2; + supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; + mandatoryFeatures = [ ]; + } + ]; + nix.distributedBuilds = true; + nix.extraOptions = ''builders-use-substitutes = true''; +} \ No newline at end of file diff --git a/nixos/default.nix b/nixos/default.nix index 50883d2e..dd36637c 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -16,9 +16,10 @@ ./common/software/cli/weechat.nix # NixOS Modules - ./common/modules/fonts.nix # Font Configs - ./common/modules/networking.nix # Initial Networking configs - ./common/modules/nixos.nix # NixOS related items + ./common/modules/fonts.nix # Font Configs + ./common/modules/networking.nix # Initial Networking configs + ./common/modules/nixos.nix # NixOS related items + ./common/modules/remote-builders.nix # Add remote builders ./users/${username} ./hosts/${hostname} diff --git a/nixos/hosts/nixos-rpi4-02/default.nix b/nixos/hosts/nixos-rpi4-02/default.nix index 5a106bcd..2f39f252 100644 --- a/nixos/hosts/nixos-rpi4-02/default.nix +++ b/nixos/hosts/nixos-rpi4-02/default.nix @@ -4,7 +4,6 @@ { config, lib, pkgs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") - ]; ##################################################################################### # BEGIN hardware config diff --git a/nixos/hosts/osaka-vultr-01/disks.nix b/nixos/hosts/osaka-vultr-01/disks.nix index d8102680..64728ece 100644 --- a/nixos/hosts/osaka-vultr-01/disks.nix +++ b/nixos/hosts/osaka-vultr-01/disks.nix @@ -34,5 +34,4 @@ }; # luks.partitions }; # partitions }; # content - }; # disko.devices.disk.vda -} # root \ No newline at end of file + }; # disko.devices.disk.vda \ No newline at end of file diff --git a/nixos/minimal.nix b/nixos/minimal.nix index b32c9d30..1e4e6122 100644 --- a/nixos/minimal.nix +++ b/nixos/minimal.nix @@ -5,8 +5,9 @@ ./common/services/fail2ban.nix # NixOS Modules - ./common/modules/networking.nix # Initial Networking configs - ./common/modules/nixos.nix # NixOS related items + ./common/modules/networking.nix # Initial Networking configs + ./common/modules/nixos.nix # NixOS related items + ./common/modules/remote-builders.nix # Add remote builders ./users/${username} ./hosts/${hostname} diff --git a/nixos/small.nix b/nixos/small.nix index 5c846e70..a5fe0078 100644 --- a/nixos/small.nix +++ b/nixos/small.nix @@ -8,8 +8,9 @@ ./common/services/fail2ban.nix # NixOS Modules - ./common/modules/networking.nix # Initial Networking configs - ./common/modules/nixos.nix # Common NixOS Configurations + ./common/modules/networking.nix # Initial Networking configs + ./common/modules/nixos.nix # Common NixOS Configurations + ./common/modules/remote-builders.nix # Add remote builders ./users/${username} ./hosts/${hostname}