From 0e548d1effb9230fb0ada42cb8c6787f7f112499 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 11 Aug 2021 11:57:05 +0800 Subject: [PATCH] nixbld: handle incoming RT emails --- nixbld-etc-nixos/configuration.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 9457f43..72aecda 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -767,6 +767,17 @@ in sendmailPath = "${pkgs.msmtp}/bin/msmtp"; sendmailArguments = ["-t" "-C" "/etc/nixos/secret/rt_msmtp.conf"]; }; + systemd.services.rt-fetchmail = { + description = "Fetchmail for RT"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + serviceConfig = { + Restart = "on-failure"; + User = "rt"; + Group = "rt"; + ExecStart = "${pkgs.bash}/bin/bash -c 'PATH=${pkgs.rt}/bin HOME=/tmp ${pkgs.fetchmail}/bin/fetchmail -f /etc/nixos/secret/rt_fetchmailrc'"; + }; + }; system.stateVersion = "21.05"; }