From 868aac8c30897423c2e65ab4c94e017a8e4b892a Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 23 May 2019 15:11:54 -0700 Subject: setup distributed builds over ssh --- common.nix | 19 +++++++++++++++++++ linux.nix | 5 ----- machines/helium.nix | 15 +++++++++++++++ 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/common.nix b/common.nix index c828a99..23c5244 100644 --- a/common.nix +++ b/common.nix @@ -45,6 +45,25 @@ in path = "${homedir}/cfg/home-manager"; }; + ssh = { + enable = true; + forwardAgent = true; + matchBlocks = { + hidor-kahih = { + hostname = "home.simatime.com"; + user = "ben"; + identityFile = [ "${homedir}/.ssh/hidor-kahih" ]; + identitiesOnly = true; + }; + nutin-madaj = { + hostname = "simatime.com"; + user = "ben"; + identityFile = [ "${homedir}/.ssh/id_rsa" ]; + identitiesOnly = true; + }; + }; + }; + direnv = { enable = true; }; diff --git a/linux.nix b/linux.nix index ab96729..c58ba4f 100644 --- a/linux.nix +++ b/linux.nix @@ -221,11 +221,6 @@ in }; programs = { - ssh = { - enable = true; - forwardAgent = true; - }; - firefox = { enable = true; }; diff --git a/machines/helium.nix b/machines/helium.nix index 2f5c166..17eef23 100644 --- a/machines/helium.nix +++ b/machines/helium.nix @@ -118,7 +118,22 @@ extraOptions = '' gc-keep-outputs = true gc-keep-derivations = true + builders-use-substitutes = true ''; + + buildMachines = [ + { + hostName = "home.simatime.com"; + sshUser = "root"; + sshKey = "/home/ben/.ssh/hidor-kahih"; + system = "x86_64-linux"; + maxJobs = 4; + speedFactor = 4; + #supportedFeatures = [ ]; + #mandatoryFeatures = [ ]; + } + ]; + distributedBuilds = true; }; # This value determines the NixOS release with which your system is to be -- cgit v1.2.3