modules/nix-config: move stuff into settings

This commit is contained in:
Max Headroom 2022-12-17 20:31:19 +01:00
parent f1685ef060
commit 176853c43c

View file

@ -1,15 +1,16 @@
{ pkgs, lib, config, inputs, tools, ... }:
let
fixPriority = x: if config.services.hydra.enable
then lib.mkForce x
else x;
in {
{
nix = {
package = inputs.nix-super.packages.${pkgs.system}.default;
trustedUsers = [ "root" "@wheel" "@admins" ];
settings = {
trusted-users = [ "root" "@wheel" "@admins" ];
binary-caches = [ "https://cache.${tools.meta.domain}" ];
trusted-public-keys = [ "cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg=" ];
};
extraOptions = fixPriority ''
extraOptions = ''
experimental-features = nix-command flakes
builders-use-substitutes = true
flake-registry = https://git.${tools.meta.domain}/private-void/registry/-/raw/master/registry.json
@ -18,9 +19,6 @@ in {
narinfo-cache-negative-ttl = 0
'';
binaryCaches = [ "https://cache.${tools.meta.domain}" ];
binaryCachePublicKeys = [ "cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg=" ];
gc = {
automatic = true;
dates = "weekly";