diff options
Diffstat (limited to 'nixos/modules/services/mail')
-rw-r--r-- | nixos/modules/services/mail/rspamd-trainer.nix | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/nixos/modules/services/mail/rspamd-trainer.nix b/nixos/modules/services/mail/rspamd-trainer.nix index 81a0c460f0c3..11c4363cc1d5 100644 --- a/nixos/modules/services/mail/rspamd-trainer.nix +++ b/nixos/modules/services/mail/rspamd-trainer.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.rspamd-trainer; @@ -10,18 +7,18 @@ let in { options.services.rspamd-trainer = { - enable = mkEnableOption "Spam/ham trainer for rspamd"; + enable = lib.mkEnableOption "Spam/ham trainer for rspamd"; - settings = mkOption { + settings = lib.mkOption { default = { }; description = '' IMAP authentication configuration for rspamd-trainer. For supplying the IMAP password, use the `secrets` option. ''; - type = types.submodule { + type = lib.types.submodule { freeformType = format.type; }; - example = literalExpression '' + example = lib.literalExpression '' { HOST = "localhost"; USERNAME = "spam@example.com"; @@ -31,7 +28,7 @@ in { }; secrets = lib.mkOption { - type = with types; listOf path; + type = with lib.types; listOf path; description = '' A list of files containing the various secrets. Should be in the format expected by systemd's `EnvironmentFile` directory. For the @@ -42,7 +39,7 @@ in { }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd = { services.rspamd-trainer = { |