Simplify goimapnotify service declaration

This commit is contained in:
coolneng 2025-05-09 15:58:42 +02:00
parent db7065e449
commit c67a370092
Signed by: coolneng
GPG Key ID: 9893DA236405AF57

View File

@ -56,9 +56,9 @@ in
after = [ "network-online.target" ]; after = [ "network-online.target" ];
}; };
# Sync mail using IDLE # Sync mail using IMAP IDLE
systemd.user.services.goimapnotify-gmail = { systemd.user.services.goimapnotify = {
description = "Sync gmail mail using IMAP IDLE"; description = "Sync mail using IMAP IDLE";
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [
goimapnotify goimapnotify
@ -69,33 +69,10 @@ in
emacs-vterm emacs-vterm
]; ];
script = '' script = ''
${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/gmail.conf ${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/goimapnotify.yaml
''; '';
serviceConfig = { serviceConfig = {
ExecStartPre = "/home/coolneng/.local/share/scripts/mail-sync gmail"; ExecStartPre = "/home/coolneng/.local/share/scripts/mail-sync";
Type = "simple";
Restart = "always";
RestartSec = 20;
};
after = [ "network-online.target" ];
};
systemd.user.services.goimapnotify-disroot = {
description = "Sync disroot mail using IMAP IDLE";
wantedBy = [ "default.target" ];
path = [
goimapnotify
pass-wayland
isync-oauth2
mu
procps
emacs-vterm
];
script = ''
${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/disroot.conf
'';
serviceConfig = {
ExecStartPre = "/home/coolneng/.local/share/scripts/mail-sync disroot";
Type = "simple"; Type = "simple";
Restart = "always"; Restart = "always";
RestartSec = 20; RestartSec = 20;