{ pkgs, lib, config, ... }: let inherit (builtins) listToAttrs; inherit (builtins.extraBuiltins) pass; inherit (lib) types; inherit (pkgs.lib) unlinesAttrs; inherit (config) networking; inherit (config.services) rspamd; in { options.services.rspamd.dkim = { enable = lib.mkEnableOption "rspamd DKIM material"; domains = lib.mkOption { default = {}; type = types.attrsOf (types.submodule { options = { selector = lib.mkOption { type = types.str; description = ''Current selector''; }; selectors = lib.mkOption { default = {}; description = ''Available selectors''; type = types.attrsOf (types.submodule { options = { key = lib.mkOption { type = types.str; description = ''Private key''; }; dns = lib.mkOption { type = types.lines; description = ''DNS record''; }; }; }); }; }; }); }; }; config = lib.mkIf rspamd.dkim.enable { }; }