char/flake

nixos flake

git clone https://git.t4t.associates/char/flake

Charlotte Somrunestone: add imapfilter41147b9

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