diff --git a/modules/services/imapnotify-accounts.nix b/modules/services/imapnotify-accounts.nix index 5d841831..e437f94e 100644 --- a/modules/services/imapnotify-accounts.nix +++ b/modules/services/imapnotify-accounts.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ pkgs, lib, ... }: with lib; @@ -31,7 +31,7 @@ with lib; }; extraConfig = mkOption { - type = with types; attrsOf (oneOf [ bool int str ]); + type = let jsonFormat = pkgs.formats.json { }; in jsonFormat.type; default = { }; example = { wait = 10; }; description = "Additional configuration to add for this account."; diff --git a/modules/services/imapnotify.nix b/modules/services/imapnotify.nix index bc595ca9..a79cba35 100644 --- a/modules/services/imapnotify.nix +++ b/modules/services/imapnotify.nix @@ -99,7 +99,9 @@ in { }; 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; })); }; };