mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: distributed builder work
This commit is contained in:
parent
08fbb97b5a
commit
b01c6222f8
7 changed files with 63 additions and 79 deletions
28
common/distributed.nix
Normal file
28
common/distributed.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, config, inputs, ... }: let
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.lists) optionals;
|
||||
buildMachines = mapAttrsToList (name: config_: let
|
||||
config = config_.config;
|
||||
in {
|
||||
hostName = "${config.networking.hostName}.inskip.me";
|
||||
sshUser = "deploy";
|
||||
systems = [ config.nixpkgs.system ] ++ optionals (config.nix.settings ? extra-platforms) config.nix.settings.extra-platforms;
|
||||
maxJobs = 100;
|
||||
speedFactor = 1; # TODO: provide adjustment factor
|
||||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||
} ) inputs.self.nixosConfigurations;
|
||||
daiyousei = {
|
||||
hostName = "daiyousei.inskip.me";
|
||||
sshUser = "root";
|
||||
system = "aarch64-linux";
|
||||
maxJobs = 100;
|
||||
speedFactor = 1;
|
||||
supportedFeatures = ["benchmark" "big-parallel" "kvm"];
|
||||
mandatoryFeatures = [];
|
||||
};
|
||||
in {
|
||||
nix = {
|
||||
inherit buildMachines;
|
||||
distributedBuilds = true;
|
||||
};
|
||||
}
|
||||
3
common/network.nix
Normal file
3
common/network.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ machine, ... }: {
|
||||
networking.hostName = machine;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue