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, ... }:
{
home.packages = with pkgs; [
protonmail-bridge-gui
(writeShellScriptBin "mbsync-ensure-pass" (builtins.readFile ./mbsync-ensure-pass.sh))
(writeShellScriptBin "davmail-setup" ''
home.packages = [
pkgs.protonmail-bridge-gui
(pkgs.writeShellScriptBin "mbsync-ensure-pass" (builtins.readFile ./mbsync-ensure-pass.sh))
(pkgs.writeShellScriptBin "davmail-setup" ''
systemctl --user restart davmail # Ensure config file is present
systemctl --user stop davmail
${davmail}/bin/davmail -n ~/.davmail.properties
${pkgs.davmail}/bin/davmail -n ~/.davmail.properties
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 = {
Unit = {
Description = "Davmail server";