From 80bec9eac703098f5fbd86938a549f4104c51088 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Fri, 10 Jan 2025 09:44:16 +0300 Subject: [PATCH] Davmail: Move from home to clients. --- config/Davmail.nix | 20 ++++++++++++++++++++ home/account/default.nix | 4 ++-- host/x86_64-linux/home/Davmail.nix | 15 --------------- option/Davmail.nix | 3 +++ 4 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 config/Davmail.nix delete mode 100644 host/x86_64-linux/home/Davmail.nix create mode 100644 option/Davmail.nix diff --git a/config/Davmail.nix b/config/Davmail.nix new file mode 100644 index 0000000..80b8af1 --- /dev/null +++ b/config/Davmail.nix @@ -0,0 +1,20 @@ +{ config, lib, ... }: +let + cfg = config.module.davmail; +in +{ + config = lib.mkIf cfg.enable { + services.davmail = { + enable = true; + url = "https://mail.fsight.ru/ews/exchange.asmx"; + config = { + davmail.server = true; + davmail.allowRemote = false; + davmail.bindAddress = "::1"; + davmail.imapPort = 55143; + davmail.smtpPort = 55025; + davmail.caldavPort = 55080; + }; + }; + }; +} diff --git a/home/account/default.nix b/home/account/default.nix index f3a2867..41bc789 100644 --- a/home/account/default.nix +++ b/home/account/default.nix @@ -26,12 +26,12 @@ let cfg // { imap = { - host = "home.local"; + host = "localhost"; port = 55143; tls.enable = false; }; smtp = { - host = "home.local"; + host = "localhost"; port = 55025; tls.enable = false; }; diff --git a/host/x86_64-linux/home/Davmail.nix b/host/x86_64-linux/home/Davmail.nix deleted file mode 100644 index 79ab6e6..0000000 --- a/host/x86_64-linux/home/Davmail.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ ... }: -{ - services.davmail = { - enable = true; - url = "https://mail.fsight.ru/ews/exchange.asmx"; - config = { - davmail.server = true; - davmail.allowRemote = true; - davmail.bindAddress = "::"; - davmail.imapPort = 55143; - davmail.smtpPort = 55025; - davmail.caldavPort = 55080; - }; - }; -} diff --git a/option/Davmail.nix b/option/Davmail.nix new file mode 100644 index 0000000..db2b716 --- /dev/null +++ b/option/Davmail.nix @@ -0,0 +1,3 @@ +{ config, lib, ... }: { + options.module.davmail.enable = lib.mkEnableOption "the Davmail Exchange proxy." // { default = config.module.purpose.work; }; +}