mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-07 07:09:15 +00:00
nix: share builder setup across machines
This commit is contained in:
parent
7919ce882d
commit
8024315063
5 changed files with 5 additions and 11 deletions
54
nix/nixosModules/builders/default.nix
Normal file
54
nix/nixosModules/builders/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
nix.distributedBuilds = true;
|
||||
|
||||
# NOTE:
|
||||
# https://github.com/NixOS/hydra/issues/584#issuecomment-1901289182
|
||||
# use ssh-ng to "fix" not trusted user issue
|
||||
nix.buildMachines =
|
||||
let
|
||||
def = {
|
||||
hostName = throw "hostName is not defined";
|
||||
system = throw "system is not defined";
|
||||
protocol = "ssh";
|
||||
sshUser = "nix-remote-builder";
|
||||
speedFactor = 1;
|
||||
supportedFeatures = [
|
||||
"nixos-test"
|
||||
"benchmark"
|
||||
"big-parallel"
|
||||
"kvm"
|
||||
];
|
||||
mandatoryFeatures = [ ];
|
||||
};
|
||||
|
||||
builder = def // {
|
||||
hostName = "builder";
|
||||
system = "x86_64-linux";
|
||||
speedFactor = 1;
|
||||
};
|
||||
|
||||
hydrogen = def // {
|
||||
hostName = "hydrogen";
|
||||
system = "aarch64-linux";
|
||||
speedFactor = 2;
|
||||
};
|
||||
|
||||
oracle = def // {
|
||||
hostName = "oracle";
|
||||
system = "aarch64-linux";
|
||||
protocol = "ssh-ng";
|
||||
sshUser = "ubuntu";
|
||||
speedFactor = 8;
|
||||
};
|
||||
in
|
||||
[
|
||||
builder
|
||||
hydrogen
|
||||
oracle
|
||||
];
|
||||
|
||||
# optional, useful when the builder has a faster internet connection than yours
|
||||
nix.extraOptions = ''
|
||||
builders-use-substitutes = true
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue