From 8b14e65aead4ec4ee4c9a7c554b96f90f85e5829 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Mon, 31 Jan 2022 10:47:08 +0100 Subject: [PATCH] Convert most nix extraOptions to settings --- modules/base/nix/default.nix | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/modules/base/nix/default.nix b/modules/base/nix/default.nix index bda043a2..40f87ff7 100644 --- a/modules/base/nix/default.nix +++ b/modules/base/nix/default.nix @@ -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;