feat: distributed builds
This commit is contained in:
parent
b2ee468733
commit
c9baa840d9
5 changed files with 59 additions and 20 deletions
|
|
@ -1,4 +1,9 @@
|
|||
{ pkgs, lib, ...}: {
|
||||
{ config, pkgs, lib, ...}: let
|
||||
subs = [
|
||||
"https://cache.thegeneralist01.com/"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
in {
|
||||
# todo: gc
|
||||
environment.systemPackages = with pkgs; [
|
||||
nh
|
||||
|
|
@ -11,15 +16,28 @@
|
|||
"pipe-operators"
|
||||
];
|
||||
|
||||
extra-substituters = [
|
||||
"https://cache.thegeneralist01.com/"
|
||||
];
|
||||
extra-substituters = subs;
|
||||
trusted-substituters = subs;
|
||||
|
||||
extra-trusted-public-keys = [
|
||||
"etc.thegeneralist01.com:BIhIf7HJ5xjFX+2e0WrGDQ4LdHeEEyQrtWBB1li2Ve8="
|
||||
"cache.thegeneralist01.com:jkKcenR877r7fQuWq6cr0JKv2piqBWmYLAYsYsSJnT4="
|
||||
];
|
||||
|
||||
trusted-users = [ "root" "@build" "@wheel" ];
|
||||
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
|
||||
nix.distributedBuilds = true;
|
||||
nix.buildMachines = if (config.networking.hostName != "thegeneralist-central") then [{
|
||||
hostName = "thegeneralist-central";
|
||||
maxJobs = 20;
|
||||
protocol = "ssh-ng";
|
||||
sshUser = "build";
|
||||
supportedFeatures = [ "benchmark" "big-parallel" "kvm" "nixos-test" ];
|
||||
system = "aarch64-linux";
|
||||
}] else [];
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue