imapnotify: Use JSON type for extraConfig (#4238)
Prior to this change, it was impossible to nest attrsets in accounts.email.accounts.<name>.imapnotify.extraConfig. However, goimapnotify's configuration is JSON-based, and the recommended configuration has: ``` "tlsOptions": { "rejectUnauthorized": true }, ``` This change changes the type from an attrset of str/int/bool to the JSON type provided by nixpkg's `pkgs.formats.json`.
This commit is contained in:
parent
346032240c
commit
f5b03feb33
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = with types; attrsOf (oneOf [ bool int str ]);
|
type = let jsonFormat = pkgs.formats.json { }; in jsonFormat.type;
|
||||||
default = { };
|
default = { };
|
||||||
example = { wait = 10; };
|
example = { wait = 10; };
|
||||||
description = "Additional configuration to add for this account.";
|
description = "Additional configuration to add for this account.";
|
||||||
|
|
|
@ -99,7 +99,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
accounts.email.accounts = mkOption {
|
accounts.email.accounts = mkOption {
|
||||||
type = with types; attrsOf (submodule (import ./imapnotify-accounts.nix));
|
type = with types;
|
||||||
|
attrsOf
|
||||||
|
(submodule (import ./imapnotify-accounts.nix { inherit pkgs lib; }));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue