2023-05-21 21:15:04 +02:00
|
|
|
{ pkgs, lib, config, nixpkgs, pwnix, ... }:
|
|
|
|
|
|
|
|
let cfg = config.custom.nix;
|
|
|
|
|
|
|
|
in with lib; {
|
|
|
|
|
2023-06-19 18:40:58 +02:00
|
|
|
options.custom.nix = {
|
|
|
|
distributedBuilds.enable = mkEnableOption "distributed builds on strawberry";
|
|
|
|
};
|
2023-05-21 21:15:04 +02:00
|
|
|
|
2023-06-17 23:46:16 +02:00
|
|
|
# TODO: Add strawberry as a build machine here
|
2023-05-21 21:15:04 +02:00
|
|
|
config = {
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2023-06-19 18:40:58 +02:00
|
|
|
nix = {
|
|
|
|
distributedBuilds = true;
|
|
|
|
buildMachines = [{
|
|
|
|
hostName = "strawberry";
|
|
|
|
sshUser = "nix-build";
|
|
|
|
sshKey = "/etc/ssh/ssh_host_ed25519_key";
|
|
|
|
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
|
|
|
|
|
|
|
supportedFeatures = [
|
|
|
|
"nixos-test"
|
|
|
|
"benchmark"
|
|
|
|
"big-parallel"
|
|
|
|
"kvm"
|
|
|
|
];
|
|
|
|
}];
|
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
|
|
|
registry.nixpkgs.flake = nixpkgs;
|
|
|
|
registry.pwnix.flake = pwnix;
|
|
|
|
settings.trusted-users = [
|
|
|
|
"@wheel"
|
|
|
|
"root"
|
|
|
|
];
|
|
|
|
};
|
2023-05-21 21:15:04 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|