allows for specifying the public key directly
This makes it possible to use in pure mode
This commit is contained in:
parent
d308dd9b24
commit
8821e4aeaa
1 changed files with 14 additions and 5 deletions
19
module.nix
19
module.nix
|
@ -21,7 +21,7 @@ in
|
|||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
The private key to sign the derivations with.
|
||||
File containing the private key to sign the derivations with.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,15 @@ in
|
|||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
The private key to sign the derivations with.
|
||||
File containing the public key to sign the derivations with.
|
||||
'';
|
||||
};
|
||||
|
||||
publicKey = lib.mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
The public key to sign the derivations with.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -132,9 +140,10 @@ in
|
|||
binaryCaches = [
|
||||
"http://127.0.0.1:12304/"
|
||||
];
|
||||
binaryCachePublicKeys = lib.mkIf (cfg.publicKeyFile != null) [
|
||||
(builtins.readFile cfg.publicKeyFile)
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
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}
|
||||
|
|
Loading…
Reference in a new issue