]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/modules/services/mail/rspamd/dkim.nix
mermet: fix dovecot and postfix
[sourcephile-nix.git] / nixos / modules / services / mail / rspamd / dkim.nix
1 { pkgs, lib, config, ... }:
2 let inherit (builtins) listToAttrs;
3 inherit (builtins.extraBuiltins) pass;
4 inherit (lib) types;
5 inherit (pkgs.lib) unlinesAttrs;
6 inherit (config) networking;
7 inherit (config.services) rspamd;
8 in
9 {
10 options.services.rspamd.dkim = {
11 enable = lib.mkEnableOption "rspamd DKIM material";
12 domains = lib.mkOption {
13 default = {};
14 type = types.attrsOf (types.submodule {
15 options = {
16 selector = lib.mkOption {
17 type = types.str;
18 description = ''Current selector'';
19 };
20 selectors = lib.mkOption {
21 default = {};
22 description = ''Available selectors'';
23 type = types.attrsOf (types.submodule {
24 options = {
25 key = lib.mkOption {
26 type = types.str;
27 description = ''Private key'';
28 };
29 dns = lib.mkOption {
30 type = types.lines;
31 description = ''DNS record'';
32 };
33 };
34 });
35 };
36 };
37 });
38 };
39 };
40
41 config = lib.mkIf rspamd.dkim.enable {
42 };
43 }