From 6e9a8fcdf52ba0dafa92fdcd02d6c53503209964 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 25 Feb 2024 18:39:17 -0500 Subject: [PATCH] nixnix --- modules/system/nix-cli/nix.nix | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 modules/system/nix-cli/nix.nix diff --git a/modules/system/nix-cli/nix.nix b/modules/system/nix-cli/nix.nix new file mode 100644 index 0000000..e171621 --- /dev/null +++ b/modules/system/nix-cli/nix.nix @@ -0,0 +1,51 @@ +{ +config +, lib +, pkgs +}: +let + # To use this feature add -j0 to any nix commad. + hostName = "bob.local"; + +in { + nix = { + distributedBuilds = true; + settings = { + trusted-public-keys = lib.mkAfter [ + # REMOTE MACHINE PUBLIC KEY WE GENERATE AFTER SETTING UP + ]; + builders-use-substitutes = true; + substituters = lib.mkAfter [ + "ssh-ng://nix-ssh@{hostname}" + ]; + # allowed-users = [ + # "@wheel" + # "@builders" + # ]; + # trusted-users = [ + # "root" + # "nix-ssh" + # ]; + }; + buildMachines = [ + { + inherit hostName; + protocol = "ssh-ng"; + maxJobs = 8; + systems = [ + "x86_64-linux" + "i686-linux" + ]; + supportedFeatures = [ + "big-parallel" + "nixos-test" + "kvm" + "benchmark" + ]; + sshUser = "builder"; + sshKey = "/root/.ssh/id_ed25519"; + # publicHostKey = config.local.keys.gerg-desktop_fingerprint; + } + ]; + }; +} \ No newline at end of file