about summary refs log tree commit diff
path: root/nixos/modules/services/mail
diff options
context:
space:
mode:
authorFelix Buehler2024-08-24 22:05:33 +0200
committerFelix Buehler2024-08-30 22:59:25 +0200
commit15d06237b7bd28614f50fd6326c4f88ae8f08c72 (patch)
treef48c48bd710d6ff89a32e7c5840d30c6f5bdd9dc /nixos/modules/services/mail
parentaa62d49bd70058f862b0d8b614597400badc7e91 (diff)
nixos/services.dkimproxy-out: remove `with lib;`
Diffstat (limited to 'nixos/modules/services/mail')
-rw-r--r--nixos/modules/services/mail/dkimproxy-out.nix30
1 files changed, 14 insertions, 16 deletions
diff --git a/nixos/modules/services/mail/dkimproxy-out.nix b/nixos/modules/services/mail/dkimproxy-out.nix
index 48ccf2dda601..1d6a143dc836 100644
--- a/nixos/modules/services/mail/dkimproxy-out.nix
+++ b/nixos/modules/services/mail/dkimproxy-out.nix
@@ -1,6 +1,4 @@
 { config, lib, pkgs, ... }:
-
-with lib;
 let
   cfg = config.services.dkimproxy-out;
   keydir = "/var/lib/dkimproxy-out";
@@ -11,8 +9,8 @@ in
   ##### interface
   options = {
     services.dkimproxy-out = {
-      enable = mkOption {
-        type = types.bool;
+      enable = lib.mkOption {
+        type = lib.types.bool;
         default = false;
         description = ''
             Whether to enable dkimproxy_out.
@@ -22,26 +20,26 @@ in
           '';
       };
 
-      listen = mkOption {
-        type = types.str;
+      listen = lib.mkOption {
+        type = lib.types.str;
         example = "127.0.0.1:10027";
         description = "Address:port DKIMproxy should listen on.";
       };
 
-      relay = mkOption {
-        type = types.str;
+      relay = lib.mkOption {
+        type = lib.types.str;
         example = "127.0.0.1:10028";
         description = "Address:port DKIMproxy should forward mail to.";
       };
 
-      domains = mkOption {
-        type = with types; listOf str;
+      domains = lib.mkOption {
+        type = with lib.types; listOf str;
         example = [ "example.org" "example.com" ];
         description = "List of domains DKIMproxy can sign for.";
       };
 
-      selector = mkOption {
-        type = types.str;
+      selector = lib.mkOption {
+        type = lib.types.str;
         example = "selector1";
         description = ''
             The selector to use for DKIM key identification.
@@ -53,8 +51,8 @@ in
           '';
       };
 
-      keySize = mkOption {
-        type = types.int;
+      keySize = lib.mkOption {
+        type = lib.types.int;
         default = 2048;
         description = ''
             Size of the RSA key to use to sign outgoing emails. Note that the
@@ -75,7 +73,7 @@ in
         listen ${cfg.listen}
         relay ${cfg.relay}
 
-        domain ${concatStringsSep "," cfg.domains}
+        domain ${lib.concatStringsSep "," cfg.domains}
         selector ${cfg.selector}
 
         signature dkim(c=relaxed/relaxed)
@@ -83,7 +81,7 @@ in
         keyfile ${privkey}
       '';
   in
-    mkIf cfg.enable {
+    lib.mkIf cfg.enable {
       users.groups.dkimproxy-out = {};
       users.users.dkimproxy-out = {
         description = "DKIMproxy_out daemon";