diff --git a/home/modules/email.nix b/home/modules/email.nix index 68da6436..729b1371 100644 --- a/home/modules/email.nix +++ b/home/modules/email.nix @@ -23,6 +23,16 @@ in { # TODO: Add Maildir to nextcloud sync config = mkIf cfg.enable { + home.packages = with pkgs; builtins.concatLists [ + (optionals cfg.kmail.enable [ kmail ]) + ]; + + home.file = mkMerge [ + (optionalAttrs cfg.kmail.autostart { + ".config/autostart/org.kde.kmail2.desktop".source = mkIf cfg.kmail.autostart ../../config/autostart/org.kde.kmail2.desktop; + }) + ]; + programs = { mbsync.enable = true; # isync package msmtp.enable = true; @@ -34,18 +44,8 @@ in { preNew = "mbsync --all"; }; }; - - home.packages = with pkgs; builtins.concatLists [ - (optionals cfg.kmail.enable [ kmail ]) - ]; }; - home.file = mkMerge [ - (optionalAttrs cfg.kmail.autostart { - ".config/autostart/org.kde.kmail2.desktop".source = mkIf cfg.kmail.autostart ../../config/autostart/org.kde.kmail2.desktop; - }) - ]; - # TODO: imapnotify can't parse the configuration, HM bug? services.imapnotify.enable = true;