Skip to content

Commit f5fd4bf

Browse files
Mic92mergify[bot]
authored andcommitted
fix cachix usage
1 parent eb746d9 commit f5fd4bf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

nix/master.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ let
88
cfg = config.services.buildbot-nix.master;
99
inherit (lib) mkRemovedOptionModule mkRenamedOptionModule;
1010

11+
optionsCachix = options.services.buildbot-nix.master.cachix;
12+
1113
interpolateType =
1214
lib.mkOptionType {
1315
name = "interpolate";
@@ -367,7 +369,6 @@ in
367369
{
368370
assertion =
369371
let
370-
optionsCachix = options.services.buildbot-nix.master.cachix;
371372
allIsNull = lib.all (x: x == null);
372373
in
373374
optionsCachix.enable.value || lib.foldr (a: b: a && b) true [
@@ -449,8 +450,8 @@ in
449450
else
450451
{
451452
name = cfg.cachix.name;
452-
signing_key_file = cfg.cachix.signingKeyFile;
453-
auth_token_file = cfg.cachix.authTokenFile;
453+
signing_key_file = if optionsCachix.signingKeyFile.isDefined then cfg.cachix.signingKeyFile else null;
454+
auth_token_file = if optionsCachix.signingKeyFile.isDefined then cfg.cachix.authTokenFile else null;
454455
};
455456
gitea = if !cfg.gitea.enable then
456457
null

0 commit comments

Comments
 (0)