depot/modules/nix-config/server.nix

31 lines
848 B
Nix
Raw Normal View History

{ pkgs, lib, config, inputs, tools, ... }:
2021-06-05 23:59:06 +03:00
let
fixPriority = x: if config.services.hydra.enable
then lib.mkForce x
else x;
in {
nix = {
package = inputs.nix-super.packages.${pkgs.system}.default;
2021-06-05 23:59:06 +03:00
trustedUsers = [ "root" "@wheel" "@admins" ];
2021-06-05 23:59:06 +03:00
extraOptions = fixPriority ''
experimental-features = nix-command flakes
2021-06-05 23:59:06 +03:00
builders-use-substitutes = true
flake-registry = https://git.${tools.meta.domain}/private-void/registry/-/raw/master/registry.json
# For Hercules CI agent
narinfo-cache-negative-ttl = 0
2021-06-05 23:59:06 +03:00
'';
binaryCaches = [ "https://cache.${tools.meta.domain}" ];
2021-06-05 23:59:06 +03:00
binaryCachePublicKeys = [ "cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg=" ];
gc = {
automatic = true;
dates = "weekly";
2022-05-29 15:43:38 +03:00
options = "--delete-older-than 7d";
2021-06-05 23:59:06 +03:00
};
};
}