59 lines
1.8 KiB
Nix
59 lines
1.8 KiB
Nix
{ inputs, overlays, lib, config, ... }: {
|
|
nixpkgs = {
|
|
config.allowUnfree = true;
|
|
inherit overlays;
|
|
};
|
|
nix =
|
|
let
|
|
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
|
in
|
|
{
|
|
optimise = {
|
|
automatic = true;
|
|
};
|
|
channel.enable = false;
|
|
|
|
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
|
|
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
|
settings = {
|
|
trusted-users = [ "root" "@wheel" ];
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
auto-optimise-store = true;
|
|
substituters = [
|
|
"http://nix-cache.gaja-group.intranet:5000"
|
|
"https://nix-community.cachix.org"
|
|
"https://cache.nixos.org"
|
|
];
|
|
trusted-public-keys = [
|
|
"nix-cache.gaja-group.intranet:EcUsafvI9NUrnab3DA71s2PGjAYMgct0FOvCwdYuStw="
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
];
|
|
inherit (config.nix) nixPath;
|
|
};
|
|
gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 30d";
|
|
};
|
|
buildMachines = [
|
|
{
|
|
hostName = "nix-cache.gaja-group.intranet";
|
|
#system = "x86_64-linux";
|
|
protocol = "ssh-ng";
|
|
# if the builder supports building for multiple architectures,
|
|
# replace the previous line by, e.g.,
|
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
|
maxJobs = 4;
|
|
speedFactor = 2;
|
|
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
|
mandatoryFeatures = [ ];
|
|
}
|
|
];
|
|
distributedBuilds = true;
|
|
# optional, useful when the builder has a faster internet connection than yours
|
|
extraOptions = ''
|
|
builders-use-substitutes = true
|
|
'';
|
|
};
|
|
}
|