diff options
Diffstat (limited to 'modules/workstation/mail/isync/default.nix')
-rw-r--r-- | modules/workstation/mail/isync/default.nix | 41 |
1 files changed, 0 insertions, 41 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" ]; - }; -} |