fix distributed setup local
This commit is contained in:
parent
a58b62baa6
commit
2aabbdf5cf
|
@ -1,8 +1,10 @@
|
||||||
{ pkgs, configVars, ... }:
|
|
||||||
let
|
|
||||||
remoteMachineIp = configVars.networking.addresses.remote-builder.ip;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
configVars,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
remoteMachineIp = configVars.networking.addresses.remote-builder.ip;
|
||||||
|
in {
|
||||||
nix.distributedBuilds = true;
|
nix.distributedBuilds = true;
|
||||||
nix.settings.builders-use-substitutes = true;
|
nix.settings.builders-use-substitutes = true;
|
||||||
nix.settings.max-jobs = 0;
|
nix.settings.max-jobs = 0;
|
||||||
|
@ -11,8 +13,7 @@ in
|
||||||
|
|
||||||
nix.buildMachines = [
|
nix.buildMachines = [
|
||||||
{
|
{
|
||||||
hostName = remoteMachineIp;
|
hostName = "remotebuild@${remoteMachineIp}";
|
||||||
sshUser = "remotebuild";
|
|
||||||
speedFactor = 1;
|
speedFactor = 1;
|
||||||
maxJobs = 10;
|
maxJobs = 10;
|
||||||
sshKey = "/root/.ssh/remotebuild";
|
sshKey = "/root/.ssh/remotebuild";
|
||||||
|
@ -20,14 +21,13 @@ in
|
||||||
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
programs.ssh.extraConfig = ''
|
||||||
# TODO: set known host here when have static ip on main server
|
Host ${remoteMachineIp}
|
||||||
# programs.ssh.knownHosts = {
|
Port 22
|
||||||
# "merlin" = {
|
User remotebuild
|
||||||
# publicKey = "server pubkey";
|
IdentitiesOnly yes
|
||||||
# };
|
IdentityFile /root/.ssh/remotebuild
|
||||||
# };
|
'';
|
||||||
|
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
"ssh_keys/root/remotebuild" = {
|
"ssh_keys/root/remotebuild" = {
|
||||||
path = "/root/.ssh/remotebuild";
|
path = "/root/.ssh/remotebuild";
|
||||||
|
|
Loading…
Reference in New Issue