From 053fafde540fa794004718a262bc9d0f5b30f34c Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Thu, 19 Dec 2024 00:43:47 +0100 Subject: [PATCH] Configure remote build --- common.nix | 2 -- hosts/nixos-desktop/default.nix | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/common.nix b/common.nix index fd24780..852e6f8 100644 --- a/common.nix +++ b/common.nix @@ -17,12 +17,10 @@ settings = { substituters = [ "https://nix-community.cachix.org" - "http://cache.banditlair.com" "https://cache.nixos.org/" ]; trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "cache.banditlair.com:4zk7iDvzKh6VN+LxzKIGcVPKgL5dLeyEt2ydrgx4o8c=" ]; auto-optimise-store = true; }; diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index e844676..30b0e45 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -27,6 +27,26 @@ programs.kdeconnect.enable = true; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + nix = { + distributedBuilds = true; + buildMachines = [ + { + hostName = "hel1.banditlair.com"; + sshUser = "nix-ssh"; + system = "x86_64-linux"; + supportedFeatures = [ + "nixos-test" + "benchmark" + "big-parallel" + "kvm" + ]; + } + ]; + settings = { + substituters = [ "ssh://nix-ssh@hel1.banditlair.com" ]; + trusted-public-keys = [ "hel1.banditlair.com:stzB4xe5QTFvSABoP11ZpNzLDCRZ93PExk0Z/gOzW3g=" ]; + }; + }; # Allow to externally control MPD networking.firewall.allowedTCPPorts = [ 6600 ];