depot/modules/nix-config/server.nix

38 lines
984 B
Nix
Raw Permalink Normal View History

2023-08-31 01:55:45 +03:00
{ depot, ... }:
{
2021-06-05 23:59:06 +03:00
nix = {
2023-03-07 02:25:57 +02:00
package = depot.inputs.nix-super.packages.default;
2021-06-05 23:59:06 +03:00
settings = {
trusted-users = [ "root" "@wheel" "@admins" ];
2023-08-31 01:55:45 +03:00
substituters = [ "https://cache.${depot.lib.meta.domain}" ];
trusted-public-keys = [ "cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg=" ];
};
extraOptions = ''
2023-08-26 23:50:19 +03:00
experimental-features = nix-command flakes cgroups
use-cgroups = true
2021-06-05 23:59:06 +03:00
builders-use-substitutes = true
2023-08-31 01:55:45 +03:00
flake-registry = https://git.${depot.lib.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
'';
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
};
daemonCPUSchedPolicy = "batch";
daemonIOSchedPriority = 7;
2021-06-05 23:59:06 +03:00
};
systemd.services.nix-daemon = {
serviceConfig.Slice = "builder.slice";
environment.AWS_EC2_METADATA_DISABLED = "true";
};
2021-06-05 23:59:06 +03:00
}