From d9a57c597c31f4c7523a395fe2a7ae4910e193e2 Mon Sep 17 00:00:00 2001 From: "Benedikt M. Rips" Date: Wed, 13 Aug 2025 22:52:17 +0200 Subject: [PATCH] davmail: enable access to the display server (#7671) Without this access, davmail can not display its token request dialogue. --- modules/services/davmail.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/services/davmail.nix b/modules/services/davmail.nix index 8c9b2d874..5d2f378a8 100644 --- a/modules/services/davmail.nix +++ b/modules/services/davmail.nix @@ -66,10 +66,7 @@ in config = mkIf cfg.enable { assertions = [ - { - assertion = pkgs.stdenv.hostPlatform.isLinux; - message = "The DavMail service is only available on Linux."; - } + (lib.hm.assertions.assertPlatform "services.davmail" pkgs lib.platforms.linux) ]; services.davmail.settings = @@ -111,7 +108,7 @@ in }; Install.WantedBy = [ "graphical-session.target" ]; Service = { - Type = "simple"; + Type = "exec"; ExecStart = "${lib.getExe cfg.package} ${settingsFile}"; Restart = "on-failure"; @@ -134,6 +131,7 @@ in RestrictAddressFamilies = [ "AF_INET" "AF_INET6" + "AF_UNIX" ]; RestrictNamespaces = true; RestrictRealtime = true;