summaryrefslogtreecommitdiff
path: root/config/nix/remote-builds.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/nix/remote-builds.nix')
-rw-r--r--config/nix/remote-builds.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/config/nix/remote-builds.nix b/config/nix/remote-builds.nix
new file mode 100644
index 0000000..5f23108
--- /dev/null
+++ b/config/nix/remote-builds.nix
@@ -0,0 +1,30 @@
+{...}: {
+ networking.hosts."10.13.42.2" = ["hephaistos.local"];
+ programs.ssh = {
+ extraConfig = ''
+ Host hephaistos.local
+ # Prevent using ssh-agent or another keyfile, useful for testing
+ IdentitiesOnly yes
+ IdentityFile /etc/ssh/nixremote
+ # The weakly privileged user on the remote builder – if not set, 'root' is used – which will hopefully fail
+ User nixremote
+ '';
+ knownHosts."hephaistos.local".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHvtqi8tziBuviUV8LDK2ddQQUbHdJYB02dgWTK5Olxq";
+ };
+
+ nix = {
+ distributedBuilds = true;
+ buildMachines = [
+ {
+ hostName = "hephaistos.local";
+ system = "x86_64-linux";
+ # Nix custom ssh-variant that avoids lots of "trusted-users" settings pain
+ protocol = "ssh-ng";
+ maxJobs = 4;
+ speedFactor = 4;
+ supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
+ mandatoryFeatures = [];
+ }
+ ];
+ };
+}