From f5fd4bf2a8e94b42254cf43e06b7309ba0cfe1a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 26 Jul 2024 19:35:33 +0200 Subject: [PATCH] fix cachix usage --- nix/master.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nix/master.nix b/nix/master.nix index bc3d3d3..4f731a6 100644 --- a/nix/master.nix +++ b/nix/master.nix @@ -8,6 +8,8 @@ let cfg = config.services.buildbot-nix.master; inherit (lib) mkRemovedOptionModule mkRenamedOptionModule; + optionsCachix = options.services.buildbot-nix.master.cachix; + interpolateType = lib.mkOptionType { name = "interpolate"; @@ -367,7 +369,6 @@ in { assertion = let - optionsCachix = options.services.buildbot-nix.master.cachix; allIsNull = lib.all (x: x == null); in optionsCachix.enable.value || lib.foldr (a: b: a && b) true [ @@ -449,8 +450,8 @@ in else { name = cfg.cachix.name; - signing_key_file = cfg.cachix.signingKeyFile; - auth_token_file = cfg.cachix.authTokenFile; + signing_key_file = if optionsCachix.signingKeyFile.isDefined then cfg.cachix.signingKeyFile else null; + auth_token_file = if optionsCachix.signingKeyFile.isDefined then cfg.cachix.authTokenFile else null; }; gitea = if !cfg.gitea.enable then null