diff --git a/configs/aerc.nix b/configs/aerc.nix index 9259906..71284c8 100644 --- a/configs/aerc.nix +++ b/configs/aerc.nix @@ -87,14 +87,22 @@ in { aliases = ["kmein@posteo.de"]; userName = address; imap.host = "posteo.de"; + imap.port = 993; + imap.tls.enable = true; smtp.host = imap.host; + smtp.port = 465; + smtp.tls.enable = true; primary = true; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-posteo.path}"; - # himalaya = { enable = true; backend = "imap"; sender = "smtp"; }; + himalaya = { + enable = true; + backend = "imap"; + sender = "smtp"; + }; }; }; - # programs.himalaya.enable = true; + programs.himalaya.enable = true; programs.thunderbird = { enable = true; diff --git a/configs/fu-berlin.nix b/configs/fu-berlin.nix index a67807c..ff2c3bd 100644 --- a/configs/fu-berlin.nix +++ b/configs/fu-berlin.nix @@ -8,7 +8,11 @@ inherit (import ../lib/email.nix) defaults pronouns; fu-defaults = rec { imap.host = "mail.zedat.fu-berlin.de"; + imap.port = 993; + imap.tls.enable = true; smtp.host = imap.host; + smtp.port = 465; + smtp.tls.enable = true; folders.drafts = "Entwürfe"; folders.sent = "Gesendet"; folders.trash = "Papierkorb"; @@ -48,6 +52,11 @@ in { Arnimallee 10, Raum 106, 14195 Berlin ''; }; + himalaya = { + enable = true; + backend = "imap"; + sender = "smtp"; + }; }); }; }; diff --git a/configs/hu-berlin.nix b/configs/hu-berlin.nix index c7cf745..f12bb89 100644 --- a/configs/hu-berlin.nix +++ b/configs/hu-berlin.nix @@ -72,6 +72,11 @@ in { aliases = ["${userName}@hu-berlin.de"]; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhaki.path}"; aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text); + himalaya = { + enable = true; + backend = "imap"; + sender = "smtp"; + }; signature = { showSignature = "append"; text = '' @@ -92,6 +97,11 @@ in { rec { userName = "dslalewa"; address = "admin.alew.vglsprwi@hu-berlin.de"; + himalaya = { + enable = true; + backend = "imap"; + sender = "smtp"; + }; aliases = ["${userName}@hu-berlin.de"]; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-dslalewa.path}"; inherit (hu-employee) signature; diff --git a/packages/dashboard/default.nix b/packages/dashboard/default.nix index af15d3a..1f82596 100644 --- a/packages/dashboard/default.nix +++ b/packages/dashboard/default.nix @@ -2,6 +2,7 @@ writers, formats, wtf, + himalaya, lib, jq, gh, @@ -31,7 +32,7 @@ mods.vdir_khal = command { title = "Calendar"; cmd = "${khal}/bin/khal"; - args = ["--color" "list"]; + args = ["--color" "list" "--exclude-calendar" "calendarium-tridentinum"]; refreshInterval = "1m"; position = rec { top = 0; @@ -136,6 +137,28 @@ width = 2; }; }; + mods.email = command { + title = "Email"; + cmd = writers.writeDash "email" '' + ${himalaya}/bin/himalaya accounts --output json \ + | ${jq}/bin/jq -r 'map(.name) | join("\n")' \ + | while read -r account + do + ${himalaya}/bin/himalaya list --account "$account" -o json \ + | ${jq}/bin/jq -r ' + map(select(.flags == []) + | "\u001b[33m\(.from.addr)\u001b[0m \(.subject)") | join("\n") + ' + done + ''; + refreshInterval = "5m"; + position = { + top = 2; + left = 0; + height = 4; + width = 3; + }; + }; mods.gh-status = command { enabled = true; title = "GitHub";