]> xn--ix-yja.es Git - alex.git/commitdiff
Add notmuch
authoralex <alex@pdp7.net>
Sat, 25 May 2024 16:58:51 +0000 (16:58 +0000)
committeralex <alex@pdp7.net>
Sat, 25 May 2024 16:59:02 +0000 (16:59 +0000)
scripts/p7s/mail/__init__.py

index 0c37dd8b48b98443306f1ce0e0985e30676a206c..27183325cd6be5885f3afc933c240137388808c0 100644 (file)
@@ -25,7 +25,8 @@ def generate_config():
         Description=Mail synchronization
 
         [Service]
-        ExecStart=/usr/bin/mbsync -qa
+        Type=oneshot
+        ExecStart=/usr/bin/mbsync -qa ; /usr/bin/notmuch new
         """).lstrip())
 
     (user_units / "mbsync.timer").write_text(textwrap.dedent("""
@@ -42,6 +43,7 @@ def generate_config():
         Unit=mbsync.service
         """).lstrip())
 
+    subprocess.run(["systemctl", "--user", "daemon-reload"], check=True)
     subprocess.run(["systemctl", "--user", "enable", "--now", "mbsync.timer"], check=True)
     subprocess.run(["sudo", "loginctl", "enable-linger", "alex"], check=True)