distributed builds
This commit is contained in:
parent
1796a2a5bc
commit
b5f95e60ee
|
@ -57,6 +57,9 @@ in {
|
||||||
../common/optional/gaming.nix
|
../common/optional/gaming.nix
|
||||||
../common/optional/powersave.nix
|
../common/optional/powersave.nix
|
||||||
../common/optional/restic-backup.nix
|
../common/optional/restic-backup.nix
|
||||||
|
|
||||||
|
# This machine is used for remote building
|
||||||
|
../common/optional/distributed_builds/remote-builder-machine.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
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;
|
pieholeIp = configVars.networking.addresses.piehole.ip;
|
||||||
gatewayIp = configVars.networking.addresses.gateway.ip;
|
gatewayIp = configVars.networking.addresses.gateway.ip;
|
||||||
semitaIp = configVars.networking.addresses.semita.ip;
|
semitaIp = configVars.networking.addresses.semita.ip;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
# Create users for this host
|
# 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 = {
|
environment.variables = {
|
||||||
GDK_SCALE = "2";
|
GDK_SCALE = "2";
|
||||||
GDK_DPI_SCALE = "0.6";
|
GDK_DPI_SCALE = "0.6";
|
||||||
|
@ -96,10 +114,12 @@ in {
|
||||||
pkgs.sof-firmware
|
pkgs.sof-firmware
|
||||||
];
|
];
|
||||||
|
|
||||||
swapDevices = [ {
|
swapDevices = [
|
||||||
|
{
|
||||||
device = "/.swapvol/swapfile";
|
device = "/.swapvol/swapfile";
|
||||||
size = 32*1024;
|
size = 32 * 1024;
|
||||||
} ];
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Add hardware support for intel gpus as specified here: https://nixos.wiki/wiki/Jellyfin
|
# Add hardware support for intel gpus as specified here: https://nixos.wiki/wiki/Jellyfin
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
|
|
Loading…
Reference in New Issue