email sync services

This commit is contained in:
joygnu 2024-08-22 14:14:25 +02:00
parent 7e32d7f9bb
commit 8f190d628f
4 changed files with 35 additions and 35 deletions

View file

@ -1,4 +1,4 @@
{inputs, ...}: { {...}: {
imports = [ imports = [
./zsh ./zsh
./gtk ./gtk
@ -11,7 +11,6 @@
./alacritty ./alacritty
./hyprland ./hyprland
./hypridle ./hypridle
./neomutt
./newsboat ./newsboat
./dunst ./dunst
]; ];

View file

@ -1,15 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
mutt-wizard
neomutt
msmtp
curl
isync
pass
lynx
notmuch
abook
mpop
urlscan
];
}

View file

@ -1,21 +1,25 @@
{...}:{ {...}:
systemd.services.email-sync = {
description = "Service to sync emails";
serviceConfig = {
ExecStart = "mw -Y";
User = "joy";
Group = "users";
};
wantedBy = [ "multi-user.target" ];
};
systemd.timers.email-sync = { {
description = "Timer to run email sync every 10 minutes"; systemd.services.mw-service = {
timerConfig = { after = [ "network.target" ];
OnBootSec = "1min"; serviceConfig = {
OnUnitActiveSec = "10min"; User = "joy";
ExecStart = "/run/current-system/sw/bin/mw -Y";
Environment = "PATH=/run/current-system/sw/bin:/usr/bin:/bin"; # Ensure all required paths are included
};
wantedBy = [ "multi-user.target" ];
};
systemd.timers.mw-service-timer = {
timerConfig = {
OnBootSec = "5sec";
OnUnitActiveSec = "10sec";
AccuracySec = "1sec";
};
unitConfig = {
Wants = [ "mw-service.service" ];
After = [ "mw-service.service" ];
};
}; };
wants = [ "email-sync.service" ];
unit = "email-sync.service";
};
} }

View file

@ -49,6 +49,18 @@
networkmanagerapplet networkmanagerapplet
ncdu ncdu
git git
#mutt
mutt-wizard
neomutt
msmtp
curl
isync
pass
lynx
notmuch
abook
mpop
urlscan
#office #office
sent sent
]; ];