os/shared/core/nix.nix

45 lines
954 B
Nix

{ pkgs, lib, config, nixpkgs, pwnix, ... }:
let cfg = config.custom.nix;
in with lib; {
options.custom.nix = {
distributedBuilds.enable = mkEnableOption "distributed builds on strawberry";
};
# TODO: Add strawberry as a build machine here
config = {
nixpkgs.config.allowUnfree = true;
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"
];
};
};
}