about summary refs log tree commit diff
path: root/nixos/modules/services/mail
diff options
context:
space:
mode:
authorFelix Buehler2024-08-28 21:18:57 +0200
committerJörg Thalheim2024-09-15 10:43:49 +0200
commit4b4b2cca1b2fff884949e66dd7ec76032b0e89d3 (patch)
tree34ce2704cba8fdfdbd1bb6a99a35a7bd1daaf1b3 /nixos/modules/services/mail
parent9faf71229844adea6b24613b27489d5ee1e1b68a (diff)
nixos/services.rspamd-trainer: remove `with lib;`
Diffstat (limited to 'nixos/modules/services/mail')
-rw-r--r--nixos/modules/services/mail/rspamd-trainer.nix15
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 = {