about summary refs log tree commit diff
path: root/modules/workstation/mail/isync
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-10-15 20:05:03 +0000
committerAlyssa Ross <hi@alyssa.is>2019-10-15 20:09:41 +0000
commit7ef530000efea9173bf10b687ecd895625c1958c (patch)
treeeab38a3c15dace4dbf67cbe1e3f0a9788916bced /modules/workstation/mail/isync
parentff6f4aed93ab7ac091fb007a3ec6958999e5a0ef (diff)
downloadnixlib-7ef530000efea9173bf10b687ecd895625c1958c.tar
nixlib-7ef530000efea9173bf10b687ecd895625c1958c.tar.gz
nixlib-7ef530000efea9173bf10b687ecd895625c1958c.tar.bz2
nixlib-7ef530000efea9173bf10b687ecd895625c1958c.tar.lz
nixlib-7ef530000efea9173bf10b687ecd895625c1958c.tar.xz
nixlib-7ef530000efea9173bf10b687ecd895625c1958c.tar.zst
nixlib-7ef530000efea9173bf10b687ecd895625c1958c.zip
modules/mail: run notmuch after mbsync
Doesn't really make sense to call this service "mbsync" any more.  It
might be better to run notmuch on inotify, though...
Diffstat (limited to 'modules/workstation/mail/isync')
-rw-r--r--modules/workstation/mail/isync/default.nix41
-rw-r--r--modules/workstation/mail/isync/mbsyncrc.in22
2 files changed, 0 insertions, 63 deletions
diff --git a/modules/workstation/mail/isync/default.nix b/modules/workstation/mail/isync/default.nix
deleted file mode 100644
index ee384434f8d8..000000000000
--- a/modules/workstation/mail/isync/default.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ pkgs, config, ... }:
-
-
-{
-  environment.systemPackages = with pkgs; [ isync ];
-
-  systemd.services.isync =
-    let
-      maildir = "${config.users.users.qyliss.home}/mail";
-      mbsyncrc = pkgs.substituteAll { inherit maildir; src = ./mbsyncrc.in; };
-    in with pkgs; {
-      serviceConfig.Type = "oneshot";
-      script = ''
-        ${sudo}/bin/sudo -u qyliss-mail \
-        ${isync}/bin/mbsync -a -V -c ${mbsyncrc}
-      '';
-      postStart = ''
-        ${findutils}/bin/find \
-            "${maildir}" \
-            \! -name .mbsyncstate* \
-            \( \
-              \( \! -user qyliss -o \! -group qyliss \) \
-              -exec ${coreutils}/bin/chown qyliss:qyliss '{}' \; \
-            , \
-              -type f \! -perm 660 \
-              -exec ${coreutils}/bin/chmod 0660 '{}' \; \
-            , \
-              -type d \! -perm 770 \
-              -exec ${coreutils}/bin/chmod 0770 '{}' \; \
-            \)
-      '';
-    };
-
-  systemd.timers.isync = {
-    timerConfig.Unit = "isync.service";
-    timerConfig.OnCalendar = "*:0/5";
-    timerConfig.Persistent = "true";
-    after = [ "network-online.target" ];
-    wantedBy = [ "timers.target" ];
-  };
-}
diff --git a/modules/workstation/mail/isync/mbsyncrc.in b/modules/workstation/mail/isync/mbsyncrc.in
deleted file mode 100644
index 987646dd9e66..000000000000
--- a/modules/workstation/mail/isync/mbsyncrc.in
+++ /dev/null
@@ -1,22 +0,0 @@
-Create Both
-
-MaildirStore local
-  Path @maildir@/
-  Inbox @maildir@/INBOX
-  Subfolders Verbatim
-
-IMAPAccount fastmail
-  Host imap.fastmail.com
-  User alyssa@fastmail.com
-  PassCmd "cat ~/imappass"
-  SSLType IMAPS
-  SSLVersions TLSv1.2
-
-IMAPStore fastmail-remote
-  Account fastmail
-
-Channel fastmail
-  Master :fastmail-remote:
-  Slave :local:
-  Patterns *
-  SyncState *