Enable mbsync service
This commit is contained in:
parent
d5e3e49284
commit
78bad9a802
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue