diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 9457f433..72aecda9 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"; }