dotfiles/flakes/common/nix_modules/remote_lio_builds.nix
RingOfStorms (Joshua Bell) 80451ecb92 update
2026-01-04 19:15:23 -06:00

37 lines
707 B
Nix

{
config,
lib,
...
}:
let
hasSecret =
secret:
let
secrets = config.age.secrets or { };
in
secrets ? ${secret} && secrets.${secret} != null;
in
{
nix = lib.mkIf (hasSecret "nix2lio") {
distributedBuilds = true;
buildMachines = [
{
hostName = "lio";
system = "x86_64-linux";
protocol = "ssh-ng";
maxJobs = 32;
speedFactor = 2;
supportedFeatures = [
"nixos-test"
"benchmark"
"big-parallel"
"kvm"
"uid-range" # Often helpful
"recursive-nix"
];
mandatoryFeatures = [ ];
sshKey = config.age.secrets.nix2lio.path;
}
];
};
}