From 91861782f5635ce5a860a5c9c19ac1bfd81cedd4 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar <3998+srid@users.noreply.github.com> Date: Fri, 17 Oct 2025 10:03:58 -0400 Subject: [PATCH] remote builders --- configurations/home/srid@pureintent.nix | 6 +++-- configurations/home/srid@vixen.nix | 4 +++ modules/home/all/buildMachines/default.nix | 8 ++++++ .../home/all/buildMachines/sincereintent.nix | 26 +++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 modules/home/all/buildMachines/default.nix create mode 100644 modules/home/all/buildMachines/sincereintent.nix diff --git a/configurations/home/srid@pureintent.nix b/configurations/home/srid@pureintent.nix index 95472c1..12eebbb 100644 --- a/configurations/home/srid@pureintent.nix +++ b/configurations/home/srid@pureintent.nix @@ -17,6 +17,10 @@ in "${homeMod}/all/juspay-vertex.nix" # "${homeMod}/all/1password.nix" (self + /modules/home/all/vira.nix) + + # Remote builders + "${homeMod}/all/buildMachines" + "${homeMod}/all/buildMachines/sincereintent.nix" ]; home.username = "srid"; @@ -28,6 +32,4 @@ in command = "${lib.getExe config.programs.tmux.package} new-session -A -s gotty"; write = true; }; - - } diff --git a/configurations/home/srid@vixen.nix b/configurations/home/srid@vixen.nix index 235caea..c320f30 100644 --- a/configurations/home/srid@vixen.nix +++ b/configurations/home/srid@vixen.nix @@ -18,6 +18,10 @@ in "${homeMod}/all/terminal.nix" "${homeMod}/all/juspay-vertex.nix" # "${homeMod}/all/1password.nix" + + # Remote builders + "${homeMod}/all/buildMachines" + "${homeMod}/all/buildMachines/sincereintent.nix" ]; home.username = "srid"; diff --git a/modules/home/all/buildMachines/default.nix b/modules/home/all/buildMachines/default.nix new file mode 100644 index 0000000..5ded69e --- /dev/null +++ b/modules/home/all/buildMachines/default.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: +{ + nix = { + package = pkgs.nix; + enable = true; + distributedBuilds = true; + }; +} diff --git a/modules/home/all/buildMachines/sincereintent.nix b/modules/home/all/buildMachines/sincereintent.nix new file mode 100644 index 0000000..4b013e8 --- /dev/null +++ b/modules/home/all/buildMachines/sincereintent.nix @@ -0,0 +1,26 @@ +{ ... }: +{ + # Configure remote building to sincereintent (macOS builder) + nix.buildMachines = [ + { + # hostName = "sincereintent"; TAILSCALE problem + hostName = "192.168.2.247"; + sshUser = "srid"; + systems = [ "aarch64-darwin" ]; + protocol = "ssh-ng"; + + maxJobs = 16; + speedFactor = 2; + supportedFeatures = [ "benchmark" "big-parallel" ]; + mandatoryFeatures = [ ]; + + # We need this! + sshKey = "/home/srid/.ssh/id_ed25519"; + + # This too! + # Run on the remote machine: + # nix run nixpkgs#base64 -w0 /etc/ssh/ssh_host_ed25519_key.pub + publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSU82S2Q2OG5LdFlqNVhTaWgveVlteE96M2o0WUdMUGQxUTE1cTF0dUdsZWUgCg=="; + } + ]; +}