Enable mbsync service

This commit is contained in:
Evie Litherland-Smith 2024-08-28 08:23:16 +01:00
parent d5e3e49284
commit 78bad9a802

View file

@ -1,12 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = [
protonmail-bridge-gui pkgs.protonmail-bridge-gui
(writeShellScriptBin "mbsync-ensure-pass" (builtins.readFile ./mbsync-ensure-pass.sh)) (pkgs.writeShellScriptBin "mbsync-ensure-pass" (builtins.readFile ./mbsync-ensure-pass.sh))
(writeShellScriptBin "davmail-setup" '' (pkgs.writeShellScriptBin "davmail-setup" ''
systemctl --user restart davmail # Ensure config file is present systemctl --user restart davmail # Ensure config file is present
systemctl --user stop davmail systemctl --user stop davmail
${davmail}/bin/davmail -n ~/.davmail.properties ${pkgs.davmail}/bin/davmail -n ~/.davmail.properties
systemctl --user restart davmail systemctl --user restart davmail
'') '')
]; ];
@ -154,6 +154,13 @@
}; };
}; };
}; };
services.mbsync = {
inherit (config.programs.mbsync) enable package;
frequency = "*:0/5"; # Every 5 minutes
verbose = true;
preExec = null;
postExec = null;
};
systemd.user.services.davmail = { systemd.user.services.davmail = {
Unit = { Unit = {
Description = "Davmail server"; Description = "Davmail server";