1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 19:41:08 +01:00

feat: configure himalaya email (and add to dashboard)

This commit is contained in:
2024-03-14 22:31:55 +01:00
parent 6a15af9f0b
commit 484c445a24
4 changed files with 53 additions and 3 deletions

View File

@@ -87,14 +87,22 @@ in {
aliases = ["kmein@posteo.de"]; aliases = ["kmein@posteo.de"];
userName = address; userName = address;
imap.host = "posteo.de"; imap.host = "posteo.de";
imap.port = 993;
imap.tls.enable = true;
smtp.host = imap.host; smtp.host = imap.host;
smtp.port = 465;
smtp.tls.enable = true;
primary = true; primary = true;
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-posteo.path}"; 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 = { programs.thunderbird = {
enable = true; enable = true;

View File

@@ -8,7 +8,11 @@
inherit (import ../lib/email.nix) defaults pronouns; inherit (import ../lib/email.nix) defaults pronouns;
fu-defaults = rec { fu-defaults = rec {
imap.host = "mail.zedat.fu-berlin.de"; imap.host = "mail.zedat.fu-berlin.de";
imap.port = 993;
imap.tls.enable = true;
smtp.host = imap.host; smtp.host = imap.host;
smtp.port = 465;
smtp.tls.enable = true;
folders.drafts = "Entwürfe"; folders.drafts = "Entwürfe";
folders.sent = "Gesendet"; folders.sent = "Gesendet";
folders.trash = "Papierkorb"; folders.trash = "Papierkorb";
@@ -48,6 +52,11 @@ in {
Arnimallee 10, Raum 106, 14195 Berlin Arnimallee 10, Raum 106, 14195 Berlin
''; '';
}; };
himalaya = {
enable = true;
backend = "imap";
sender = "smtp";
};
}); });
}; };
}; };

View File

@@ -72,6 +72,11 @@ in {
aliases = ["${userName}@hu-berlin.de"]; aliases = ["${userName}@hu-berlin.de"];
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhaki.path}"; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhaki.path}";
aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text); aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text);
himalaya = {
enable = true;
backend = "imap";
sender = "smtp";
};
signature = { signature = {
showSignature = "append"; showSignature = "append";
text = '' text = ''
@@ -92,6 +97,11 @@ in {
rec { rec {
userName = "dslalewa"; userName = "dslalewa";
address = "admin.alew.vglsprwi@hu-berlin.de"; address = "admin.alew.vglsprwi@hu-berlin.de";
himalaya = {
enable = true;
backend = "imap";
sender = "smtp";
};
aliases = ["${userName}@hu-berlin.de"]; aliases = ["${userName}@hu-berlin.de"];
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-dslalewa.path}"; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-dslalewa.path}";
inherit (hu-employee) signature; inherit (hu-employee) signature;

View File

@@ -2,6 +2,7 @@
writers, writers,
formats, formats,
wtf, wtf,
himalaya,
lib, lib,
jq, jq,
gh, gh,
@@ -31,7 +32,7 @@
mods.vdir_khal = command { mods.vdir_khal = command {
title = "Calendar"; title = "Calendar";
cmd = "${khal}/bin/khal"; cmd = "${khal}/bin/khal";
args = ["--color" "list"]; args = ["--color" "list" "--exclude-calendar" "calendarium-tridentinum"];
refreshInterval = "1m"; refreshInterval = "1m";
position = rec { position = rec {
top = 0; top = 0;
@@ -136,6 +137,28 @@
width = 2; 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 { mods.gh-status = command {
enabled = true; enabled = true;
title = "GitHub"; title = "GitHub";