char/flake
nixos flake
git clone https://git.t4t.associates/char/flake
41147b9
main
1{ pkgs , ...} : 2{ 3users . users . charlotte . packages = [ pkgs . imapfilter ]; 4 5systemd . services . imapfilter = { 6description = "Filter IMAP mail" ; 7wants = [ "network-online.target" ]; 8after = [ "network-online.target" ]; 9unitConfig . ConditionPathExists = "/home/charlotte/.config/imapfilter/config.lua" ; 10serviceConfig = { 11Type = "oneshot" ; 12User = "charlotte" ; 13EnvironmentFile = "/var/secrets/imapfilter.env" ; 14ExecStart = " ${ pkgs . imapfilter } /bin/imapfilter -c /home/charlotte/.config/imapfilter/config.lua" ; 15}; 16}; 17 18systemd . timers . imapfilter = { 19wantedBy = [ "timers.target" ]; 20timerConfig = { 21OnCalendar = "*:0/5" ; 22Persistent = true ; 23}; 24}; 25}