distributed builds
This commit is contained in:
parent
1796a2a5bc
commit
b5f95e60ee
|
@ -57,6 +57,9 @@ in {
|
|||
../common/optional/gaming.nix
|
||||
../common/optional/powersave.nix
|
||||
../common/optional/restic-backup.nix
|
||||
|
||||
# This machine is used for remote building
|
||||
../common/optional/distributed_builds/remote-builder-machine.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
secrets = {
|
||||
"ssh_keys/root/remotebuild" = {
|
||||
path = "/root/.ssh/remotebuild";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
secrets = {
|
||||
"ssh_keys/root/remotebuild.pub" = {
|
||||
path = "/root/.ssh/remotebuild.pub";
|
||||
};
|
||||
};
|
||||
users.users.remotebuild = {
|
||||
isNormalUser = true;
|
||||
createHome = false;
|
||||
group = "remotebuild";
|
||||
|
||||
openssh.authorizedKeys.keyFiles = [/root/.ssh/remotebuild.pub];
|
||||
};
|
||||
|
||||
users.groups.remotebuild = {};
|
||||
|
||||
nix.settings.trusted-users = ["remotebuild"];
|
||||
}
|
|
@ -18,7 +18,6 @@
|
|||
pieholeIp = configVars.networking.addresses.piehole.ip;
|
||||
gatewayIp = configVars.networking.addresses.gateway.ip;
|
||||
semitaIp = configVars.networking.addresses.semita.ip;
|
||||
|
||||
in {
|
||||
imports = [
|
||||
# Create users for this host
|
||||
|
@ -84,6 +83,25 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.distributedBuilds = true;
|
||||
nix.buildMachines = [
|
||||
{
|
||||
hostName = "builder";
|
||||
systems = ["x86_64-linux"];
|
||||
maxJobs = 8;
|
||||
speedFactor = 2;
|
||||
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||
}
|
||||
];
|
||||
programs.ssh.extraConfig = ''
|
||||
Host builder
|
||||
HostName 192.10.99.14
|
||||
Port 2222
|
||||
User builder
|
||||
IdentitiesOnly yes
|
||||
IdentityFile /root/.ssh/id_builder
|
||||
'';
|
||||
|
||||
environment.variables = {
|
||||
GDK_SCALE = "2";
|
||||
GDK_DPI_SCALE = "0.6";
|
||||
|
@ -96,10 +114,12 @@ in {
|
|||
pkgs.sof-firmware
|
||||
];
|
||||
|
||||
swapDevices = [ {
|
||||
device = "/.swapvol/swapfile";
|
||||
size = 32*1024;
|
||||
} ];
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/.swapvol/swapfile";
|
||||
size = 32 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
# Add hardware support for intel gpus as specified here: https://nixos.wiki/wiki/Jellyfin
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
|
|
Loading…
Reference in New Issue