Compare commits

...

2 commits

Author SHA1 Message Date
6f5047da3d
bump flake.lock 2024-11-07 14:24:55 -05:00
fc183208cf
add mailfetch service 2024-11-07 14:24:54 -05:00
2 changed files with 44 additions and 22 deletions

View file

@ -75,8 +75,11 @@
# location.provider = "geoclue2";
location.provider = "manual";
# using the location of the cafe ascii should be good enough
location.latitude = 51.0250869;
location.longitude = 13.7210005;
# location.latitude = 51.0250869;
# location.longitude = 13.7210005;
# RIT
location.latitude = 43.084902;
location.longitude = -77.678352;
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
@ -376,21 +379,40 @@
];
# periodic automated mail fetching
systemd.user.services.mailfetch = {
enable = true;
description = "Automatically fetches new mails.";
wantedBy = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
systemd.user.services.mbsync = {
description = "Automated mail fetch and tagging";
serviceConfig = {
Restart = "always";
RestartSec = "60";
Type = "oneshot";
};
path = with pkgs; [ bash notmuch isync ];
script = ''
mbsync -a && /home/felix/.config/neomutt/notmuch-hook.sh
'';
path = with pkgs; [ bash isync notmuch ];
script = "mbsync -a";
postStop = "/home/felix/.config/neomutt/notmuch-hook.sh";
};
systemd.user.timers.mbsync = {
description = "Automated mail fetch and processing";
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "10m";
OnUnitInactiveSec = "10m";
};
};
# systemd.user.services.mailfetch = {
# enable = true;
# description = "Automatically fetches new mails.";
# wantedBy = [ "graphical-session.target" ];
# after = [ "graphical-session.target" ];
# serviceConfig = {
# Restart = "always";
# RestartSec = "60";
# };
# path = with pkgs; [ bash notmuch isync ];
# script = ''
# mbsync -a && /home/felix/.config/neomutt/notmuch-hook.sh
# '';
# };
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View file

@ -21,11 +21,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1729624485,
"narHash": "sha256-iEffyT68tEU5kHQuyP05QRH+JhWNNLAwHfgZAzXFS7o=",
"lastModified": 1730797322,
"narHash": "sha256-cH9emjYIbDYTde/CKOmU97rh7sKuyfedzPcTz4OTJkE=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "22e8de2729f40d29a445c8baeaf22740b8b25daf",
"rev": "1b0b927860d7eb367ee6a3123ddeb7a8e24bd836",
"type": "github"
},
"original": {
@ -52,11 +52,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1729413321,
"narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=",
"lastModified": 1730531603,
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26",
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
"type": "github"
},
"original": {
@ -75,11 +75,11 @@
},
"unstable": {
"locked": {
"lastModified": 1729413321,
"narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=",
"lastModified": 1730531603,
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26",
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
"type": "github"
},
"original": {