add distributd builds

This commit is contained in:
Cyryl Płotnicki 2020-02-22 11:11:10 +00:00
parent a55a5e16ed
commit 9101ebbfe8
3 changed files with 35 additions and 1 deletions

View file

@ -12,10 +12,12 @@
allowDiscards = true; allowDiscards = true;
}; };
}; };
loader.grub = { loader.grub = {
device = "nodev"; device = "nodev";
efiSupport = true; efiSupport = true;
}; };
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
}; };
@ -30,7 +32,6 @@
}; };
hardware.nvidiaOptimus.disable = true; hardware.nvidiaOptimus.disable = true;
hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
imports = [ imports = [
/etc/nixos/hardware-configuration.nix /etc/nixos/hardware-configuration.nix
@ -40,5 +41,6 @@
../virtualbox.nix ../virtualbox.nix
../zerotier.nix ../zerotier.nix
../i3/system.nix ../i3/system.nix
../distributed-builds.nix
]; ];
} }

View file

@ -41,5 +41,6 @@
../gfx-intel.nix ../gfx-intel.nix
../zerotier.nix ../zerotier.nix
../i3/system.nix ../i3/system.nix
../distributed-builds.nix
]; ];
} }

View file

@ -0,0 +1,31 @@
{ config, pkgs, ... }:
{
nix.buildMachines = [
{
hostName = "brix.local";
sshUser = "nix-builder";
sshKey = "/home/cyryl/.ssh/id_ed25519";
system = "x86_64-linux";
maxJobs = 2;
speedFactor = 1;
supportedFeatures = [ "kvm" ];
mandatoryFeatures = [ ];
}
{
hostName = "vultr1.local";
sshUser = "nix-builder";
sshKey = "/home/cyryl/.ssh/id_ed25519";
system = "x86_64-linux";
maxJobs = 4;
speedFactor = 4;
supportedFeatures = [ ];
mandatoryFeatures = [ ];
}
];
nix.extraOptions = ''
builders-use-substitutes = true
'';
nix.distributedBuilds = true;
}