fix distributed setup local
This commit is contained in:
parent
1e7af5c096
commit
a58b62baa6
|
@ -487,11 +487,11 @@
|
|||
},
|
||||
"nix-secrets": {
|
||||
"locked": {
|
||||
"lastModified": 1736337009,
|
||||
"narHash": "sha256-5seeOYCOJrvhbKIj64bAzeSJN80hdVp08ufArlBf+qg=",
|
||||
"lastModified": 1736339437,
|
||||
"narHash": "sha256-Em8E6Ml2whMU1IoEB3OI3eKhjSu2J/xbXdlIt+8x61U=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "bd63772717581b787f1f2aaac3fb909eaae2c2b7",
|
||||
"revCount": 193,
|
||||
"rev": "7c6042a975808186934e012ad32ae0e03ab60bff",
|
||||
"revCount": 194,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
|
||||
},
|
||||
|
|
|
@ -1,4 +1,33 @@
|
|||
{ pkgs, configVars, ... }:
|
||||
let
|
||||
remoteMachineIp = configVars.networking.addresses.remote-builder.ip;
|
||||
in
|
||||
{
|
||||
nix.distributedBuilds = true;
|
||||
nix.settings.builders-use-substitutes = true;
|
||||
nix.settings.max-jobs = 0;
|
||||
nix.settings.trusted-substituters = ["ssh://${remoteMachineIp}"];
|
||||
nix.settings.substituters = ["ssh://${remoteMachineIp}"];
|
||||
|
||||
nix.buildMachines = [
|
||||
{
|
||||
hostName = remoteMachineIp;
|
||||
sshUser = "remotebuild";
|
||||
speedFactor = 1;
|
||||
maxJobs = 10;
|
||||
sshKey = "/root/.ssh/remotebuild";
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||
}
|
||||
];
|
||||
|
||||
# TODO: set known host here when have static ip on main server
|
||||
# programs.ssh.knownHosts = {
|
||||
# "merlin" = {
|
||||
# publicKey = "server pubkey";
|
||||
# };
|
||||
# };
|
||||
|
||||
sops.secrets = {
|
||||
"ssh_keys/root/remotebuild" = {
|
||||
path = "/root/.ssh/remotebuild";
|
||||
|
|
|
@ -59,6 +59,8 @@ in {
|
|||
|
||||
../common/optional/restic-backup.nix
|
||||
../common/optional/nixos-containers/backup-server.nix
|
||||
|
||||
../common/optional/distributed_builds/local-machine.nix
|
||||
];
|
||||
|
||||
fileSystems."/media/main-ssd" = {
|
||||
|
|
Loading…
Reference in New Issue