From 32cd1b098b83c90726848bd6726f74e72c557abb Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Thu, 14 Jul 2022 01:02:15 -0300 Subject: [PATCH] update nix options to silence warning --- module.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/module.nix b/module.nix index 2af7635..681702d 100644 --- a/module.nix +++ b/module.nix @@ -21,7 +21,7 @@ in description = '' File containing the private key to sign the derivations with. ''; - }; + }; publicKeyFile = lib.mkOption { type = types.nullOr types.path; @@ -142,14 +142,15 @@ in }; nix = { - binaryCaches = [ - "http://127.0.0.1:12304/" - ]; - binaryCachePublicKeys = [ - (lib.mkIf (cfg.publicKeyFile != null) (builtins.readFile cfg.publicKeyFile)) - (lib.mkIf (cfg.publicKey != null) cfg.publicKey) - ]; - + settings = { + substituters = [ + "http://127.0.0.1:12304/" + ]; + trusted-public-keys = [ + (lib.mkIf (cfg.publicKeyFile != null) (builtins.readFile cfg.publicKeyFile)) + (lib.mkIf (cfg.publicKey != null) cfg.publicKey) + ]; + }; extraOptions = lib.mkIf (cfg.globalCacheTTL != null) '' narinfo-cache-negative-ttl = ${toString cfg.globalCacheTTL} narinfo-cache-positive-ttl = ${toString cfg.globalCacheTTL}