enable servo as a remote builder
This commit is contained in:
parent
23f4b2e2e4
commit
a9ba9b77ad
|
@ -30,6 +30,7 @@
|
|||
sane.nixcache.substituters.servo = false;
|
||||
sane.nixcache.substituters.desko = false;
|
||||
sane.nixcache.remote-builders.desko = false;
|
||||
sane.nixcache.remote-builders.servo = false;
|
||||
# sane.services.duplicity.enable = true; # TODO: re-enable after HW upgrade
|
||||
|
||||
# automatically log in at the virtual consoles.
|
||||
|
|
|
@ -40,6 +40,10 @@ in
|
|||
default = true;
|
||||
type = types.bool;
|
||||
};
|
||||
sane.nixcache.remote-builders.servo = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
@ -60,20 +64,35 @@ in
|
|||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
|
||||
nix.buildMachines = lib.mkIf cfg.remote-builders.desko [{
|
||||
hostName = "desko";
|
||||
system = "x86_64-linux";
|
||||
protocol = "ssh-ng";
|
||||
maxJobs = 4; # constrained by ram, for things like webkitgtk, etc.
|
||||
speedFactor = 8;
|
||||
supportedFeatures = [ "big-parallel" ];
|
||||
mandatoryFeatures = [ ];
|
||||
sshUser = "nixremote";
|
||||
sshKey = config.sops.secrets."nixremote_ssh_key".path;
|
||||
}];
|
||||
nix.distributedBuilds = lib.mkIf cfg.remote-builders.desko true;
|
||||
nix.buildMachines = [
|
||||
(lib.mkIf cfg.remote-builders.desko {
|
||||
hostName = "desko";
|
||||
system = "x86_64-linux";
|
||||
protocol = "ssh-ng";
|
||||
maxJobs = 4; # constrained by ram, for things like webkitgtk, etc.
|
||||
speedFactor = 8;
|
||||
supportedFeatures = [ "big-parallel" ];
|
||||
mandatoryFeatures = [ ];
|
||||
sshUser = "nixremote";
|
||||
sshKey = config.sops.secrets."nixremote_ssh_key".path;
|
||||
})
|
||||
(lib.mkIf cfg.remote-builders.servo {
|
||||
hostName = "servo";
|
||||
system = "x86_64-linux";
|
||||
protocol = "ssh-ng";
|
||||
maxJobs = 3; # constrained by ram, for things like webkitgtk, etc.
|
||||
speedFactor = 2;
|
||||
supportedFeatures = [ "big-parallel" ];
|
||||
mandatoryFeatures = [ ];
|
||||
sshUser = "nixremote";
|
||||
sshKey = config.sops.secrets."nixremote_ssh_key".path;
|
||||
})
|
||||
];
|
||||
nix.distributedBuilds = lib.mkIf (cfg.remote-builders.desko || cfg.remote-builders.servo) true;
|
||||
|
||||
# optional, useful when the builder has a faster internet connection than yours
|
||||
nix.extraOptions = lib.mkIf cfg.remote-builders.desko ''
|
||||
# TODO: move this to hosts/common/default.nix where the other extraOptions are
|
||||
nix.extraOptions = lib.mkIf (cfg.remote-builders.desko || cfg.remote-builders.servo) ''
|
||||
builders-use-substitutes = true
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue