Convert most nix extraOptions to settings

This commit is contained in:
Charlotte Van Petegem 2022-01-31 10:47:08 +01:00
parent 448608c90c
commit 8b14e65aea
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -84,18 +84,26 @@ in
dates = "hourly";
options = "--delete-older-than 7d";
};
optimise = {
automatic = true;
dates = [ "hourly" ];
settings = {
auto-optimise-store = true;
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://chvp.cachix.org"
"https://accentor.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"chvp.cachix.org-1:eIG26KkeA+R3tCpvmaayA9i3KVVL06G+qB5ci4dHBT4="
"accentor.cachix.org-1:QP+oJwzmeq5Fsyp4Vk501UgUSbl5VIna/ard/XOePH8="
];
trusted-users = [ "@wheel" ];
};
settings.trusted-users = [ "@wheel" ];
extraOptions = ''
substituters = https://cache.nixos.org https://nix-community.cachix.org https://chvp.cachix.org https://accentor.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= chvp.cachix.org-1:eIG26KkeA+R3tCpvmaayA9i3KVVL06G+qB5ci4dHBT4= accentor.cachix.org-1:QP+oJwzmeq5Fsyp4Vk501UgUSbl5VIna/ard/XOePH8=
'' + (lib.optionalString config.chvp.base.nix.enableDirenv ''
extraOptions = lib.mkIf config.chvp.base.nix.enableDirenv ''
keep-outputs = true
keep-derivations = true
'');
'';
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.chvp.base.nix.unfreePackages;