{ config, lib, pkgs, ... }: let cfg = config.hm.soft.email; in { options.hm.soft.email = { thunderbird.enable = lib.mkEnableOption "thunderbird config"; evolution.enable = lib.mkEnableOption "evolution config"; }; config = lib.mkMerge [ { accounts.email.accounts.disroot = { primary = true; address = "adikro@disroot.org"; userName = "adikro@disroot.org"; realName = "adi"; imap = { host = "disroot.org"; port = 993; tls.enable = true; }; smtp = { host = "disroot.org"; port = 465; tls.enable = true; }; thunderbird.enable = cfg.thunderbird.enable; }; } (lib.mkIf cfg.thunderbird.enable { programs.thunderbird = { enable = true; profiles.main = { isDefault = true; settings = { "network.proxy.type" = 0; }; }; }; }) (lib.mkIf cfg.evolution.enable { home.packages = [ pkgs.evolution ]; }) ]; }