Added remote build options
This commit is contained in:
1 parent
b80f189128
commit
4b58c5c909
5 files changed
+36
No files matched your search
@@ -1,6 +1,11 @@
|
||||
{ user, systemStateVersion, localNixCaches ? { keys = [ ]; urls = [ ]; } }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
(import ./remote-builder.nix {
|
||||
user = user;
|
||||
})
|
||||
];
|
||||
# Nix core
|
||||
system.stateVersion = systemStateVersion;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{ user }:
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.homelab.nix.remote-builder;
|
||||
in {
|
||||
options = {
|
||||
homelab.nix.remote-builder = {
|
||||
enable = mkEnableOption
|
||||
"Enable Remote Local Builders";
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
nix.buildMachines = [{
|
||||
hostName = "bigbox1.lab.internal";
|
||||
sshUser = user.name;
|
||||
system = "x86_64-linux";
|
||||
protocol = "ssh-ng";
|
||||
maxJobs = 4;
|
||||
speedFactor = 4;
|
||||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||
mandatoryFeatures = [ ];
|
||||
}];
|
||||
nix.distributedBuilds = true;
|
||||
nix.extraOptions = ''
|
||||
builders-use-substitutes = true
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user