From c545378c357de631aa3bd9f17824e5eb48d663f7 Mon Sep 17 00:00:00 2001 From: specCon18 Date: Sun, 25 Feb 2024 19:28:57 -0500 Subject: [PATCH] remote builder works --- flake.nix | 1 + modules/system/nix-cli/{nix.nix => default.nix} | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) rename modules/system/nix-cli/{nix.nix => default.nix} (75%) diff --git a/flake.nix b/flake.nix index 2c2265c..e6cf66e 100644 --- a/flake.nix +++ b/flake.nix @@ -76,6 +76,7 @@ ./modules/system/services/openssh.nix # ./modules/system/services/syncthing.nix ./modules/system/services/tailscale.nix + ./modules/system/nix-cli ] #extra modules to be loaded by nixos [ hyprland.homeManagerModules.default diff --git a/modules/system/nix-cli/nix.nix b/modules/system/nix-cli/default.nix similarity index 75% rename from modules/system/nix-cli/nix.nix rename to modules/system/nix-cli/default.nix index e171621..ae7bcd8 100644 --- a/modules/system/nix-cli/nix.nix +++ b/modules/system/nix-cli/default.nix @@ -2,22 +2,23 @@ config , lib , pkgs +, ... }: let # To use this feature add -j0 to any nix commad. - hostName = "bob.local"; - + hostName = "10.18.1.60"; + pubKey = "bob:cday7vAQb+UWE1gQOAOjqnXB8EdjkBt+/Ife/R0ylUY="; in { nix = { distributedBuilds = true; settings = { trusted-public-keys = lib.mkAfter [ - # REMOTE MACHINE PUBLIC KEY WE GENERATE AFTER SETTING UP + pubKey ]; builders-use-substitutes = true; - substituters = lib.mkAfter [ - "ssh-ng://nix-ssh@{hostname}" - ]; + # substituters = lib.mkAfter [ + # "ssh-ng://nix-ssh@${hostname}" + # ]; # allowed-users = [ # "@wheel" # "@builders" @@ -42,9 +43,9 @@ in { "kvm" "benchmark" ]; - sshUser = "builder"; + sshUser = "root"; sshKey = "/root/.ssh/id_ed25519"; - # publicHostKey = config.local.keys.gerg-desktop_fingerprint; + # publicHostKey = } ]; };