Only make systemd services if mbsync for account is enabled
This commit is contained in:
parent
069bf62ca4
commit
55a6c3c281
|
@ -150,24 +150,25 @@
|
|||
};
|
||||
};
|
||||
systemd.user.services = {
|
||||
protonmail-bridge = {
|
||||
Unit = {
|
||||
Description = "Protonmail Bridge";
|
||||
After = [ "network.target" ];
|
||||
protonmail-bridge =
|
||||
lib.mkIf config.accounts.email.accounts.proton.mbsync.enable {
|
||||
Unit = {
|
||||
Description = "Protonmail Bridge";
|
||||
After = [ "network.target" ];
|
||||
};
|
||||
Service = {
|
||||
Restart = "always";
|
||||
# Environment = "PATH=${pkgs.libsecret}/bin";
|
||||
ExecStart =
|
||||
"${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive --log-level info";
|
||||
};
|
||||
Install.WantedBy = [
|
||||
"graphical-session.target"
|
||||
"mbsync.service"
|
||||
"imapnotify-proton.service"
|
||||
];
|
||||
};
|
||||
Service = {
|
||||
Restart = "always";
|
||||
# Environment = "PATH=${pkgs.libsecret}/bin";
|
||||
ExecStart =
|
||||
"${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive --log-level info";
|
||||
};
|
||||
Install.WantedBy = [
|
||||
"graphical-session.target"
|
||||
"mbsync.service"
|
||||
"imapnotify-proton.service"
|
||||
];
|
||||
};
|
||||
davmail = {
|
||||
davmail = lib.mkIf config.accounts.email.accounts.ukaea.mbsync.enable {
|
||||
Unit = {
|
||||
Description = "DavMail";
|
||||
After = [ "network.target" ];
|
||||
|
|
Loading…
Reference in a new issue