mail: go away from afew
This commit is contained in:
parent
8c207e5566
commit
642814736c
2 changed files with 462 additions and 651 deletions
|
@ -1,351 +1,7 @@
|
||||||
# fetches mails for me
|
# fetches mails for me
|
||||||
{ lib, pkgs, config, ... }: {
|
{ lib, pkgs, config, ... }:
|
||||||
|
let
|
||||||
backup.all.restic.dirs = [ config.users.users.mailUser.home ];
|
|
||||||
|
|
||||||
users.users.mailUser = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "collects mails for me";
|
|
||||||
hashedPassword = "!";
|
|
||||||
name = "mailfetcher";
|
|
||||||
openssh.authorizedKeys.keyFiles =
|
|
||||||
config.users.users.root.openssh.authorizedKeys.keyFiles;
|
|
||||||
};
|
|
||||||
|
|
||||||
# configure passwords
|
|
||||||
krops.userKeys = {
|
|
||||||
"gmail.palipalo9" = {
|
|
||||||
user = config.users.users.mailUser.name;
|
|
||||||
source = toString <secrets/mail/gmail/palipalo9>;
|
|
||||||
requiredBy = [ "fetchmail.service" ];
|
|
||||||
};
|
|
||||||
"gmx.palo_van_dalo" = {
|
|
||||||
user = config.users.users.mailUser.name;
|
|
||||||
source = toString <secrets/mail/gmx/palo_van_dalo>;
|
|
||||||
requiredBy = [ "fetchmail.service" ];
|
|
||||||
};
|
|
||||||
"gmx.ingolf_wagner" = {
|
|
||||||
user = config.users.users.mailUser.name;
|
|
||||||
source = toString <secrets/mail/gmx/ingolf.wagner>;
|
|
||||||
requiredBy = [ "fetchmail.service" ];
|
|
||||||
};
|
|
||||||
"web.pali_palo" = {
|
|
||||||
user = config.users.users.mailUser.name;
|
|
||||||
source = toString <secrets/mail/web.de/pali_palo>;
|
|
||||||
requiredBy = [ "fetchmail.service" ];
|
|
||||||
};
|
|
||||||
"siteground.contact" = {
|
|
||||||
user = config.users.users.mailUser.name;
|
|
||||||
source = toString <secrets/mail/siteground/contact>;
|
|
||||||
requiredBy = [ "fetchmail.service" ];
|
|
||||||
};
|
|
||||||
"gaykraft.root" = {
|
|
||||||
user = config.users.users.mailUser.name;
|
|
||||||
source = toString <secrets/mail/gaykraft/root>;
|
|
||||||
requiredBy = [ "fetchmail.service" ];
|
|
||||||
};
|
|
||||||
"c-base.palo" = {
|
|
||||||
user = config.users.users.mailUser.name;
|
|
||||||
source = toString <secrets/mail/c-base/palo>;
|
|
||||||
requiredBy = [ "fetchmail.service" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.muchsync ];
|
|
||||||
|
|
||||||
# configure accounts
|
|
||||||
home-manager.users.mailUser.accounts.email = {
|
|
||||||
accounts = {
|
|
||||||
palo_van_dalo-gmx = {
|
|
||||||
primary = false;
|
|
||||||
address = "palo_van_dalo@gmx.de";
|
|
||||||
aliases = [ ];
|
|
||||||
realName = "Ingolf Wagner";
|
|
||||||
userName = "palo_van_dalo@gmx.de";
|
|
||||||
passwordCommand =
|
|
||||||
"cat ${toString config.krops.userKeys."gmx.palo_van_dalo".target}";
|
|
||||||
imap = {
|
|
||||||
host = "imap.gmx.net";
|
|
||||||
port = 993;
|
|
||||||
};
|
|
||||||
mbsync = {
|
|
||||||
enable = true;
|
|
||||||
create = "both";
|
|
||||||
};
|
|
||||||
notmuch.enable = true;
|
|
||||||
};
|
|
||||||
ingolf-wagner-gmx = {
|
|
||||||
primary = false;
|
|
||||||
address = "ingolf.wagner@gmx.de";
|
|
||||||
aliases = [ ];
|
|
||||||
realName = "Ingolf Wagner";
|
|
||||||
userName = "ingolf.wagner@gmx.de";
|
|
||||||
passwordCommand =
|
|
||||||
"cat ${toString config.krops.userKeys."gmx.ingolf_wagner".target}";
|
|
||||||
|
|
||||||
imap = {
|
|
||||||
host = "imap.gmx.net";
|
|
||||||
port = 993;
|
|
||||||
};
|
|
||||||
mbsync = {
|
|
||||||
enable = true;
|
|
||||||
create = "both";
|
|
||||||
};
|
|
||||||
notmuch.enable = true;
|
|
||||||
};
|
|
||||||
#gaykraft = {
|
|
||||||
# primary = false;
|
|
||||||
# address = "root@gaykraft.com";
|
|
||||||
# aliases = [ ];
|
|
||||||
# realName = "Ingolf Wagner";
|
|
||||||
# userName = "root@gaykraft.com";
|
|
||||||
# passwordCommand = "cat ${toString config.krops.userKeys."gaykraft.root".target}";
|
|
||||||
# imap = {
|
|
||||||
# host = "mail.gaykraft.com";
|
|
||||||
# port = 993;
|
|
||||||
# tls.certificatesFile =
|
|
||||||
# pkgs.writeText "gaykraft.pem" ''
|
|
||||||
# -----BEGIN CERTIFICATE-----
|
|
||||||
# MIIDfzCCAmcCFBMAAMjIQnhYR9w+KIlfG8zLhM06MA0GCSqGSIb3DQEBCwUAMH8x
|
|
||||||
# CzAJBgNVBAYTAlVLMRUwEwYDVQQIDAxXYXJ3aWNrc2hpcmUxEzARBgNVBAcMCkxl
|
|
||||||
# YW1pbmd0b24xEDAOBgNVBAoMB09yZ05hbWUxHDAaBgNVBAsME1NlY3VyaXR5IERl
|
|
||||||
# cGFydG1lbnQxFDASBgNVBAMMC2V4YW1wbGUuY29tMB4XDTE5MTEyNzAxNTU1NloX
|
|
||||||
# DTE5MTEyODAxNTU1NloweTELMAkGA1UEBhMCVUsxFTATBgNVBAgMDFdhcndpY2tz
|
|
||||||
# aGlyZTETMBEGA1UEBwwKTGVhbWluZ3RvbjEQMA4GA1UECgwHT3JnTmFtZTEWMBQG
|
|
||||||
# A1UECwwNSVQgRGVwYXJ0bWVudDEUMBIGA1UEAwwLZXhhbXBsZS5jb20wggEiMA0G
|
|
||||||
# CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDAJwAMze7u3I3D2z2cT7IrBeyDHfdu
|
|
||||||
# 5kCK9jZbYoU4wT7kNz/hD3BVe8BvUSNAEVJk/oPaE6v5PuFT2hAasoOhEEEr5Tt4
|
|
||||||
# xp1MRItjxu+SUs7uZ+LpocZC4NNGb6/LPcmgthC4w8jj/JtZmcoStFqAAOqkdb6d
|
|
||||||
# tuf5lYHPxdFKRw2wgc/4pQo2PeeWder8NFoILC7Yh12zab7H2camobbbJl4tZPvJ
|
|
||||||
# z1FBk0WfeZLsUZ+2tdtginTOszsjPngygsUdQVnxfQeWBkVFXcZTHg/fELaW5uwV
|
|
||||||
# E4WIE5PZASlVwYV+gRqwM0312VW8zGF/JnwMT9hlcA27mwLBK8C4KoxRAgMBAAEw
|
|
||||||
# DQYJKoZIhvcNAQELBQADggEBAIBWcdnQbRdgxI3DXCi+IY+u+0nGrt/dduDzSqlt
|
|
||||||
# y0AFpRat4CImtgaG0jb7BDDEWTCycYFB+ABqUovQcJ5jjR/aq8Rfj2QD3nqIButg
|
|
||||||
# PyQvyYn5Z5Rx6h9aF7IOu5Eo/r/a73zJXK6iOLoLhD/e2mSIsNCW8hfbSLgPdEHH
|
|
||||||
# S14BxfacU0u1Pyh1WNprZ0C1HkJPJ/A0MZYRy4bJ5tYSO+ddcmYHbj8/ds728i8U
|
|
||||||
# L6/ijQaZ0q+lO/IXUFYODLkRcFAitg3fp/rj6D0lRMGlZKdMgI1OT6ziZm/Y074I
|
|
||||||
# yRo1wgUnGy6BOCZeHnZ9xa/q6huv9QZZGt6VtQFgnKpNNOY=
|
|
||||||
# -----END CERTIFICATE-----
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# mbsync = {
|
|
||||||
# enable = true;
|
|
||||||
# create = "both";
|
|
||||||
# };
|
|
||||||
# notmuch.enable = true;
|
|
||||||
#};
|
|
||||||
pali_palo = {
|
|
||||||
primary = false;
|
|
||||||
address = "pali_palo@web.de";
|
|
||||||
aliases = [ ];
|
|
||||||
realName = "Ingolf Wagner";
|
|
||||||
userName = "pali_palo@web.de";
|
|
||||||
passwordCommand =
|
|
||||||
"cat ${toString config.krops.userKeys."web.pali_palo".target}";
|
|
||||||
imap = {
|
|
||||||
host = "imap.web.de";
|
|
||||||
port = 993;
|
|
||||||
};
|
|
||||||
mbsync = {
|
|
||||||
enable = true;
|
|
||||||
create = "both";
|
|
||||||
};
|
|
||||||
notmuch.enable = true;
|
|
||||||
};
|
|
||||||
c-base = {
|
|
||||||
primary = false;
|
|
||||||
address = "palo@c-base.org";
|
|
||||||
aliases = [ ];
|
|
||||||
realName = "Ingolf Wagner";
|
|
||||||
userName = "palo";
|
|
||||||
passwordCommand =
|
|
||||||
"cat ${toString config.krops.userKeys."c-base.palo".target}";
|
|
||||||
imap = {
|
|
||||||
host = "c-mail.c-base.org";
|
|
||||||
port = 993;
|
|
||||||
# fetched using : nix-shell -p openssl --run "openssl s_client -connect c-mail.c-base.org:993 -showcerts"
|
|
||||||
tls.certificatesFile = pkgs.writeText "c-base.pem" ''
|
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIFKDCCAxCgAwIBAgIDAtwrMA0GCSqGSIb3DQEBDQUAMFQxFDASBgNVBAoTC0NB
|
|
||||||
Y2VydCBJbmMuMR4wHAYDVQQLExVodHRwOi8vd3d3LkNBY2VydC5vcmcxHDAaBgNV
|
|
||||||
BAMTE0NBY2VydCBDbGFzcyAzIFJvb3QwHhcNMTkxMTA5MDgzMjUyWhcNMjExMTA4
|
|
||||||
MDgzMjUyWjBhMQswCQYDVQQGEwJERTEPMA0GA1UECBMGQmVybGluMQ8wDQYDVQQH
|
|
||||||
EwZCZXJsaW4xFDASBgNVBAoTC2MtYmFzZSBlLlYuMRowGAYDVQQDExFjLW1haWwu
|
|
||||||
Yy1iYXNlLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKR3XBxJ
|
|
||||||
72MayCS0D5GCoHcY0TQLs1DQSohCCobRdSowFJzNQw/2lL6bb+Q2rmevZQXuM4vP
|
|
||||||
YbFytvTDmY5y5MNXEqGLfi8D5TcaP/RdXWQU++yUunE6yMdqZNheeXPjM//PnoXG
|
|
||||||
DyT236BovEi3YipUUsLXFiRj+cAjrQE7a2YUs3fjV3P6grMH0V06J6P6+JJvRgp2
|
|
||||||
K33uhKhnKyb3s1tbdbu1KeGozx2ws9lg79XV+Py6PXxP6jTZ2PCsaxs3BThSdmsl
|
|
||||||
vQyk/zoW7tA1m2ntRCoyFHZqfOHsN3UOS/HDRlXqgSf0ah8cPYPsl0ayXhgOv0Tu
|
|
||||||
1PSMt4Ve2GajX8MCAwEAAaOB9TCB8jAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQE
|
|
||||||
AwIDqDA0BgNVHSUELTArBggrBgEFBQcDAgYIKwYBBQUHAwEGCWCGSAGG+EIEAQYK
|
|
||||||
KwYBBAGCNwoDAzAzBggrBgEFBQcBAQQnMCUwIwYIKwYBBQUHMAGGF2h0dHA6Ly9v
|
|
||||||
Y3NwLmNhY2VydC5vcmcvMDgGA1UdHwQxMC8wLaAroCmGJ2h0dHA6Ly9jcmwuY2Fj
|
|
||||||
ZXJ0Lm9yZy9jbGFzczMtcmV2b2tlLmNybDAtBgNVHREEJjAkghFjLW1haWwuYy1i
|
|
||||||
YXNlLm9yZ4IPbWFpbC5jLWJhc2Uub3JnMA0GCSqGSIb3DQEBDQUAA4ICAQBjTIa1
|
|
||||||
xdhUYXJidv1U0qaqSV1DzumakFY20OM4QCV0Qvlq+SQUqroGBTIGodxhTnjG5o01
|
|
||||||
4xBAnsTcMRNycXHu0j6XYqDS4QhaFcGdFmXP0EQfAFbvhwZdbvgiRHuUTSGEbcLp
|
|
||||||
Vk8sP8dpzx+zMAZ6PL7XMwPFPTHm7vw40qmTyCuUcnhIwHgwGxu4yu0tdsU+VwRD
|
|
||||||
RVsdZO4V2GhFTz8oRcHvmC2wmx+Zwx0RXWPXSN5yRDDZWwY4WbECa2MvojH1HlJG
|
|
||||||
YJkokq7nbYJix/RipSkAXgurcgppVmM5cf7uYgSrltW8pm3IMMPrlaFrlzMMMtdq
|
|
||||||
SYFk+FDp296B7CDyWpQhDcVjnGQ70JfMWT5S3Lsi8DnI2pul9ljxPOt+Q8XFh1oz
|
|
||||||
Ofr7y5Qjm72YToOX1j7N8ppCh0RJH4lOsouTPVdp859ch9FxZdceq+nC744wv+Nt
|
|
||||||
TQPw15Gk3RY5mVYBE/Cw2T7j7qDmBaEUKxkfW7q8t287FXM4XX6C+cKYr6jYx6s1
|
|
||||||
5/2p4gCuOALYqJ7kD2xjci0VTWu77H4J2QKEZF8AgdI36dIYr7GY0e/+xb/CScwr
|
|
||||||
uvu2R9jfPOMVu6CiavPGUtcvju4A+qMUDqIyH9dNwkMQRffAtmsF6KR4nMYxhr45
|
|
||||||
nKY1BaufWLD1UWrjaR1IF6L5qDHOXeMJEChYkg==
|
|
||||||
-----END CERTIFICATE-----'';
|
|
||||||
};
|
|
||||||
mbsync = {
|
|
||||||
enable = true;
|
|
||||||
create = "both";
|
|
||||||
};
|
|
||||||
notmuch.enable = true;
|
|
||||||
};
|
|
||||||
gmail = {
|
|
||||||
# for google accounts you have to allow 'less secure apps' in accounts.google.com
|
|
||||||
primary = true;
|
|
||||||
address = "palipalo9@googlemail.com";
|
|
||||||
aliases = [ ];
|
|
||||||
realName = "Ingolf Wagner";
|
|
||||||
userName = "palipalo9@googlemail.com";
|
|
||||||
passwordCommand =
|
|
||||||
"cat ${toString config.krops.userKeys."gmail.palipalo9".target}";
|
|
||||||
imap = {
|
|
||||||
host = "imap.gmail.com";
|
|
||||||
port = 993;
|
|
||||||
};
|
|
||||||
mbsync = {
|
|
||||||
enable = true;
|
|
||||||
create = "both";
|
|
||||||
};
|
|
||||||
notmuch.enable = true;
|
|
||||||
};
|
|
||||||
ingolf-wagner-de = {
|
|
||||||
primary = false;
|
|
||||||
address = "contact@ingolf-wagner.de";
|
|
||||||
aliases = [ ];
|
|
||||||
realName = "Ingolf Wagner";
|
|
||||||
userName = "contact@ingolf-wagner.de";
|
|
||||||
passwordCommand =
|
|
||||||
"cat ${toString config.krops.userKeys."siteground.contact".target}";
|
|
||||||
imap = {
|
|
||||||
host = "securees5.sgcpanel.com";
|
|
||||||
port = 143;
|
|
||||||
tls.useStartTls = true;
|
|
||||||
};
|
|
||||||
# make sure the upstream mail is deleted
|
|
||||||
getmail = {
|
|
||||||
enable = true;
|
|
||||||
delete = true;
|
|
||||||
readAll = false;
|
|
||||||
mailboxes = [ "ALL" ];
|
|
||||||
};
|
|
||||||
#mbsync = {
|
|
||||||
# enable = true;
|
|
||||||
# create = "both";
|
|
||||||
#};
|
|
||||||
notmuch.enable = true;
|
|
||||||
};
|
|
||||||
#ingolf-wagner = {
|
|
||||||
# primary = false;
|
|
||||||
# address = "contact@ingolf-wagner.de";
|
|
||||||
# aliases = [ ];
|
|
||||||
# realName = "Ingolf Wagner";
|
|
||||||
# userName = "contact@ingolf-wagner.de";
|
|
||||||
# passwordCommand = "cat ${toString config.krops.userKeys."siteground.contact".target}";
|
|
||||||
# imap = {
|
|
||||||
# host = "securees5.sgcpanel.com";
|
|
||||||
# port = 143;
|
|
||||||
# tls.useStartTls = true;
|
|
||||||
# };
|
|
||||||
# mbsync = {
|
|
||||||
# enable = true;
|
|
||||||
# create = "both";
|
|
||||||
# };
|
|
||||||
# notmuch.enable = true;
|
|
||||||
#};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# configure mbsync
|
|
||||||
home-manager.users.mailUser.programs.mbsync.enable = true;
|
|
||||||
|
|
||||||
# re-tag everything once a day
|
|
||||||
systemd.services.retagmail = {
|
|
||||||
enable = true;
|
|
||||||
serviceConfig = { User = config.users.users.mailUser.name; };
|
|
||||||
environment.NOTMUCH_CONFIG =
|
|
||||||
"${config.users.users.mailUser.home}/.config/notmuch/notmuchrc";
|
|
||||||
script = ''
|
|
||||||
echo "run afew"
|
|
||||||
${pkgs.afew}/bin/afew --all --tag
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
systemd.timers.retagmail = {
|
|
||||||
enable = true;
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "daily";
|
|
||||||
Persistent = "true";
|
|
||||||
};
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# fetch mails every 10 minutes
|
|
||||||
systemd.services.fetchmail = {
|
|
||||||
enable = true;
|
|
||||||
serviceConfig = { User = config.users.users.mailUser.name; };
|
|
||||||
environment.NOTMUCH_CONFIG =
|
|
||||||
"${config.users.users.mailUser.home}/.config/notmuch/notmuchrc";
|
|
||||||
script = ''
|
|
||||||
echo "run mbsync"
|
|
||||||
${pkgs.isync}/bin/mbsync \
|
|
||||||
--all
|
|
||||||
|
|
||||||
echo "run getmail"
|
|
||||||
${pkgs.getmail}/bin/getmail \
|
|
||||||
--quiet \
|
|
||||||
--rcfile getmailingolf-wagner-de
|
|
||||||
|
|
||||||
echo "run notmuch"
|
|
||||||
${pkgs.notmuch}/bin/notmuch new
|
|
||||||
echo "run afew"
|
|
||||||
${pkgs.afew}/bin/afew --new --tag -v
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
systemd.timers.fetchmail = {
|
|
||||||
enable = true;
|
|
||||||
# timerConfig.OnCalendar = " *-*-* *:00:00";
|
|
||||||
timerConfig.OnCalendar = "*:0/10";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# configure notmuch
|
|
||||||
home-manager.users.mailUser.programs.notmuch = {
|
|
||||||
enable = true;
|
|
||||||
new.tags = [ "unread" "inbox" "new" ];
|
|
||||||
};
|
|
||||||
home-manager.users.mailUser.home.file."notmuch" = {
|
|
||||||
source = "${config.users.users.mailUser.home}/.config/notmuch/notmuchrc";
|
|
||||||
target = ".notmuch-config";
|
|
||||||
};
|
|
||||||
|
|
||||||
# a few config
|
|
||||||
home-manager.users.mailUser.programs.afew = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = with lib;
|
|
||||||
let
|
|
||||||
|
|
||||||
template = index:
|
|
||||||
{ tags, query, message ? "generic", ... }: ''
|
|
||||||
[Filter.${toString index}]
|
|
||||||
query = ${query}
|
|
||||||
tags = ${concatStringsSep ";" tags}
|
|
||||||
message = ${message}
|
|
||||||
'';
|
|
||||||
|
|
||||||
filters = [
|
filters = [
|
||||||
|
|
||||||
{
|
{
|
||||||
query = "from:linkedin.com";
|
query = "from:linkedin.com";
|
||||||
tags = [ "+linked" "+jobs" ];
|
tags = [ "+linked" "+jobs" ];
|
||||||
|
@ -362,7 +18,6 @@
|
||||||
query = "from:xing.com";
|
query = "from:xing.com";
|
||||||
tags = [ "+jobs" "-inbox" ];
|
tags = [ "+jobs" "-inbox" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
query = "from:no-reply@backtrace.io";
|
query = "from:no-reply@backtrace.io";
|
||||||
tags = [ "+sononym" "-inbox" "-unread" ];
|
tags = [ "+sononym" "-inbox" "-unread" ];
|
||||||
|
@ -552,6 +207,18 @@
|
||||||
query = "from:ghostinspector.com";
|
query = "from:ghostinspector.com";
|
||||||
tags = [ "-unread" "-inbox" "+junk" ];
|
tags = [ "-unread" "-inbox" "+junk" ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
query = "from:notifications@github.com";
|
||||||
|
tags = [ "+github" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
query = "from:travis-ci.org AND subject:mrVanDalo/navi";
|
||||||
|
tags = [ "+development" "+navi" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
query = "from:travis-ci.org AND subject:nur-packages";
|
||||||
|
tags = [ "+development" "+nixos" "+nur-packages" ];
|
||||||
|
}
|
||||||
{
|
{
|
||||||
query = "from:travis-ci.org AND subject:csv-to-qif";
|
query = "from:travis-ci.org AND subject:csv-to-qif";
|
||||||
tags = [ "+development" "+csv-to-qif" ];
|
tags = [ "+development" "+csv-to-qif" ];
|
||||||
|
@ -564,6 +231,34 @@
|
||||||
query = "from:nixos1@discoursemail.com";
|
query = "from:nixos1@discoursemail.com";
|
||||||
tags = [ "+nixos" "+discourse" ];
|
tags = [ "+nixos" "+discourse" ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
query = "from:nixos1@discoursemail.com AND subject:Development";
|
||||||
|
tags = [ "+nixos" "+discourse" "+development" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
query = "from:nixos1@discoursemail.com AND subject:Français";
|
||||||
|
tags = [ "+nixos" "+discourse" "-inbox" "-unread" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
query = "from:nixos1@discoursemail.com AND subject:Announcements";
|
||||||
|
tags = [ "+nixos" "+discourse" "+announcements" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
query = "from:nixos1@discoursemail.com AND subject:Links";
|
||||||
|
tags = [ "+nixos" "+discourse" "+links" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
query = "from:nixos1@discoursemail.com AND subject:Games";
|
||||||
|
tags = [ "+nixos" "+discourse" "+games" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
query = "from:nixos1@discoursemail.com AND subject:Meta";
|
||||||
|
tags = [ "+nixos" "+discourse" "+meta" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
query = "from:nixos1@discoursemail.com AND subject:Events";
|
||||||
|
tags = [ "+nixos" "+discourse" "+events" ];
|
||||||
|
}
|
||||||
{
|
{
|
||||||
query = "from:limebike.com AND (subject:Funds OR subject:Receipt)";
|
query = "from:limebike.com AND (subject:Funds OR subject:Receipt)";
|
||||||
tags = [ "-inbox" "-unread" "+billing" "+limebike" ];
|
tags = [ "-inbox" "-unread" "+billing" "+limebike" ];
|
||||||
|
@ -705,7 +400,10 @@
|
||||||
tags = [ "-inbox" "-unread" ];
|
tags = [ "-inbox" "-unread" ];
|
||||||
message = "clean up tag killed";
|
message = "clean up tag killed";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
query = "tag:muted";
|
||||||
|
tags = [ "-inbox" "-unread" ];
|
||||||
|
}
|
||||||
# remove new tag at the end
|
# remove new tag at the end
|
||||||
{
|
{
|
||||||
query = "tag:new";
|
query = "tag:new";
|
||||||
|
@ -715,16 +413,319 @@
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
in ''
|
notmuchTagging = let
|
||||||
# Tag mails which are mailing lists
|
template = index:
|
||||||
[ListMailsFilter]
|
{ tags, query, message ? "generic", ... }:
|
||||||
|
let
|
||||||
# Tag mails as killed if the thread has been marked as "killed"
|
command = ''
|
||||||
[KillThreadsFilter]
|
${pkgs.notmuch}/bin/notmuch tag ${
|
||||||
|
lib.concatStringsSep " " tags
|
||||||
${concatStringsSep "\n" (imap0 template filters)}
|
} -- "${query}"
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
in ''
|
||||||
|
echo '${command}'
|
||||||
|
${command}
|
||||||
|
'';
|
||||||
|
in pkgs.writers.writeBash "notmuch-tagging"
|
||||||
|
(lib.concatStringsSep "\n" (lib.imap0 template filters));
|
||||||
|
|
||||||
|
notmuchTaggingNew = let
|
||||||
|
template = index:
|
||||||
|
{ tags, query, message ? "generic", ... }:
|
||||||
|
let
|
||||||
|
command = ''
|
||||||
|
${pkgs.notmuch}/bin/notmuch tag ${
|
||||||
|
lib.concatStringsSep " " tags
|
||||||
|
} -- "${query} AND tag:new"
|
||||||
|
'';
|
||||||
|
in ''
|
||||||
|
echo '${command}'
|
||||||
|
${command}
|
||||||
|
'';
|
||||||
|
in pkgs.writers.writeBash "notmuch-tagging-new"
|
||||||
|
(lib.concatStringsSep "\n" (lib.imap0 template filters));
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
backup.all.restic.dirs = [ config.users.users.mailUser.home ];
|
||||||
|
|
||||||
|
users.users.mailUser = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "collects mails for me";
|
||||||
|
hashedPassword = "!";
|
||||||
|
name = "mailfetcher";
|
||||||
|
openssh.authorizedKeys.keyFiles =
|
||||||
|
config.users.users.root.openssh.authorizedKeys.keyFiles;
|
||||||
|
};
|
||||||
|
|
||||||
|
# configure passwords
|
||||||
|
krops.userKeys = {
|
||||||
|
"gmail.palipalo9" = {
|
||||||
|
user = config.users.users.mailUser.name;
|
||||||
|
source = toString <secrets/mail/gmail/palipalo9>;
|
||||||
|
requiredBy = [ "fetchmail.service" ];
|
||||||
|
};
|
||||||
|
"gmx.palo_van_dalo" = {
|
||||||
|
user = config.users.users.mailUser.name;
|
||||||
|
source = toString <secrets/mail/gmx/palo_van_dalo>;
|
||||||
|
requiredBy = [ "fetchmail.service" ];
|
||||||
|
};
|
||||||
|
"gmx.ingolf_wagner" = {
|
||||||
|
user = config.users.users.mailUser.name;
|
||||||
|
source = toString <secrets/mail/gmx/ingolf.wagner>;
|
||||||
|
requiredBy = [ "fetchmail.service" ];
|
||||||
|
};
|
||||||
|
"web.pali_palo" = {
|
||||||
|
user = config.users.users.mailUser.name;
|
||||||
|
source = toString <secrets/mail/web.de/pali_palo>;
|
||||||
|
requiredBy = [ "fetchmail.service" ];
|
||||||
|
};
|
||||||
|
"siteground.contact" = {
|
||||||
|
user = config.users.users.mailUser.name;
|
||||||
|
source = toString <secrets/mail/siteground/contact>;
|
||||||
|
requiredBy = [ "fetchmail.service" ];
|
||||||
|
};
|
||||||
|
"gaykraft.root" = {
|
||||||
|
user = config.users.users.mailUser.name;
|
||||||
|
source = toString <secrets/mail/gaykraft/root>;
|
||||||
|
requiredBy = [ "fetchmail.service" ];
|
||||||
|
};
|
||||||
|
"c-base.palo" = {
|
||||||
|
user = config.users.users.mailUser.name;
|
||||||
|
source = toString <secrets/mail/c-base/palo>;
|
||||||
|
requiredBy = [ "fetchmail.service" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.muchsync ];
|
||||||
|
|
||||||
|
# configure accounts
|
||||||
|
home-manager.users.mailUser.accounts.email = {
|
||||||
|
accounts = {
|
||||||
|
palo_van_dalo-gmx = {
|
||||||
|
primary = false;
|
||||||
|
address = "palo_van_dalo@gmx.de";
|
||||||
|
aliases = [ ];
|
||||||
|
realName = "Ingolf Wagner";
|
||||||
|
userName = "palo_van_dalo@gmx.de";
|
||||||
|
passwordCommand =
|
||||||
|
"cat ${toString config.krops.userKeys."gmx.palo_van_dalo".target}";
|
||||||
|
imap = {
|
||||||
|
host = "imap.gmx.net";
|
||||||
|
port = 993;
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
};
|
||||||
|
notmuch.enable = true;
|
||||||
|
};
|
||||||
|
ingolf-wagner-gmx = {
|
||||||
|
primary = false;
|
||||||
|
address = "ingolf.wagner@gmx.de";
|
||||||
|
aliases = [ ];
|
||||||
|
realName = "Ingolf Wagner";
|
||||||
|
userName = "ingolf.wagner@gmx.de";
|
||||||
|
passwordCommand =
|
||||||
|
"cat ${toString config.krops.userKeys."gmx.ingolf_wagner".target}";
|
||||||
|
|
||||||
|
imap = {
|
||||||
|
host = "imap.gmx.net";
|
||||||
|
port = 993;
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
};
|
||||||
|
notmuch.enable = true;
|
||||||
|
};
|
||||||
|
pali_palo = {
|
||||||
|
primary = false;
|
||||||
|
address = "pali_palo@web.de";
|
||||||
|
aliases = [ ];
|
||||||
|
realName = "Ingolf Wagner";
|
||||||
|
userName = "pali_palo@web.de";
|
||||||
|
passwordCommand =
|
||||||
|
"cat ${toString config.krops.userKeys."web.pali_palo".target}";
|
||||||
|
imap = {
|
||||||
|
host = "imap.web.de";
|
||||||
|
port = 993;
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
};
|
||||||
|
notmuch.enable = true;
|
||||||
|
};
|
||||||
|
c-base = {
|
||||||
|
primary = false;
|
||||||
|
address = "palo@c-base.org";
|
||||||
|
aliases = [ ];
|
||||||
|
realName = "Ingolf Wagner";
|
||||||
|
userName = "palo";
|
||||||
|
passwordCommand =
|
||||||
|
"cat ${toString config.krops.userKeys."c-base.palo".target}";
|
||||||
|
imap = {
|
||||||
|
host = "c-mail.c-base.org";
|
||||||
|
port = 993;
|
||||||
|
# fetched using : nix-shell -p openssl --run "openssl s_client -connect c-mail.c-base.org:993 -showcerts"
|
||||||
|
tls.certificatesFile = pkgs.writeText "c-base.pem" ''
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFKDCCAxCgAwIBAgIDAtwrMA0GCSqGSIb3DQEBDQUAMFQxFDASBgNVBAoTC0NB
|
||||||
|
Y2VydCBJbmMuMR4wHAYDVQQLExVodHRwOi8vd3d3LkNBY2VydC5vcmcxHDAaBgNV
|
||||||
|
BAMTE0NBY2VydCBDbGFzcyAzIFJvb3QwHhcNMTkxMTA5MDgzMjUyWhcNMjExMTA4
|
||||||
|
MDgzMjUyWjBhMQswCQYDVQQGEwJERTEPMA0GA1UECBMGQmVybGluMQ8wDQYDVQQH
|
||||||
|
EwZCZXJsaW4xFDASBgNVBAoTC2MtYmFzZSBlLlYuMRowGAYDVQQDExFjLW1haWwu
|
||||||
|
Yy1iYXNlLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKR3XBxJ
|
||||||
|
72MayCS0D5GCoHcY0TQLs1DQSohCCobRdSowFJzNQw/2lL6bb+Q2rmevZQXuM4vP
|
||||||
|
YbFytvTDmY5y5MNXEqGLfi8D5TcaP/RdXWQU++yUunE6yMdqZNheeXPjM//PnoXG
|
||||||
|
DyT236BovEi3YipUUsLXFiRj+cAjrQE7a2YUs3fjV3P6grMH0V06J6P6+JJvRgp2
|
||||||
|
K33uhKhnKyb3s1tbdbu1KeGozx2ws9lg79XV+Py6PXxP6jTZ2PCsaxs3BThSdmsl
|
||||||
|
vQyk/zoW7tA1m2ntRCoyFHZqfOHsN3UOS/HDRlXqgSf0ah8cPYPsl0ayXhgOv0Tu
|
||||||
|
1PSMt4Ve2GajX8MCAwEAAaOB9TCB8jAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQE
|
||||||
|
AwIDqDA0BgNVHSUELTArBggrBgEFBQcDAgYIKwYBBQUHAwEGCWCGSAGG+EIEAQYK
|
||||||
|
KwYBBAGCNwoDAzAzBggrBgEFBQcBAQQnMCUwIwYIKwYBBQUHMAGGF2h0dHA6Ly9v
|
||||||
|
Y3NwLmNhY2VydC5vcmcvMDgGA1UdHwQxMC8wLaAroCmGJ2h0dHA6Ly9jcmwuY2Fj
|
||||||
|
ZXJ0Lm9yZy9jbGFzczMtcmV2b2tlLmNybDAtBgNVHREEJjAkghFjLW1haWwuYy1i
|
||||||
|
YXNlLm9yZ4IPbWFpbC5jLWJhc2Uub3JnMA0GCSqGSIb3DQEBDQUAA4ICAQBjTIa1
|
||||||
|
xdhUYXJidv1U0qaqSV1DzumakFY20OM4QCV0Qvlq+SQUqroGBTIGodxhTnjG5o01
|
||||||
|
4xBAnsTcMRNycXHu0j6XYqDS4QhaFcGdFmXP0EQfAFbvhwZdbvgiRHuUTSGEbcLp
|
||||||
|
Vk8sP8dpzx+zMAZ6PL7XMwPFPTHm7vw40qmTyCuUcnhIwHgwGxu4yu0tdsU+VwRD
|
||||||
|
RVsdZO4V2GhFTz8oRcHvmC2wmx+Zwx0RXWPXSN5yRDDZWwY4WbECa2MvojH1HlJG
|
||||||
|
YJkokq7nbYJix/RipSkAXgurcgppVmM5cf7uYgSrltW8pm3IMMPrlaFrlzMMMtdq
|
||||||
|
SYFk+FDp296B7CDyWpQhDcVjnGQ70JfMWT5S3Lsi8DnI2pul9ljxPOt+Q8XFh1oz
|
||||||
|
Ofr7y5Qjm72YToOX1j7N8ppCh0RJH4lOsouTPVdp859ch9FxZdceq+nC744wv+Nt
|
||||||
|
TQPw15Gk3RY5mVYBE/Cw2T7j7qDmBaEUKxkfW7q8t287FXM4XX6C+cKYr6jYx6s1
|
||||||
|
5/2p4gCuOALYqJ7kD2xjci0VTWu77H4J2QKEZF8AgdI36dIYr7GY0e/+xb/CScwr
|
||||||
|
uvu2R9jfPOMVu6CiavPGUtcvju4A+qMUDqIyH9dNwkMQRffAtmsF6KR4nMYxhr45
|
||||||
|
nKY1BaufWLD1UWrjaR1IF6L5qDHOXeMJEChYkg==
|
||||||
|
-----END CERTIFICATE-----'';
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
};
|
||||||
|
notmuch.enable = true;
|
||||||
|
};
|
||||||
|
gmail = {
|
||||||
|
# for google accounts you have to allow 'less secure apps' in accounts.google.com
|
||||||
|
primary = true;
|
||||||
|
address = "palipalo9@googlemail.com";
|
||||||
|
aliases = [ ];
|
||||||
|
realName = "Ingolf Wagner";
|
||||||
|
userName = "palipalo9@googlemail.com";
|
||||||
|
passwordCommand =
|
||||||
|
"cat ${toString config.krops.userKeys."gmail.palipalo9".target}";
|
||||||
|
imap = {
|
||||||
|
host = "imap.gmail.com";
|
||||||
|
port = 993;
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
};
|
||||||
|
notmuch.enable = true;
|
||||||
|
};
|
||||||
|
ingolf-wagner-de = {
|
||||||
|
primary = false;
|
||||||
|
address = "contact@ingolf-wagner.de";
|
||||||
|
aliases = [ ];
|
||||||
|
realName = "Ingolf Wagner";
|
||||||
|
userName = "contact@ingolf-wagner.de";
|
||||||
|
passwordCommand =
|
||||||
|
"cat ${toString config.krops.userKeys."siteground.contact".target}";
|
||||||
|
imap = {
|
||||||
|
host = "securees5.sgcpanel.com";
|
||||||
|
port = 143;
|
||||||
|
tls.useStartTls = true;
|
||||||
|
};
|
||||||
|
# make sure the upstream mail is deleted
|
||||||
|
getmail = {
|
||||||
|
enable = true;
|
||||||
|
delete = true;
|
||||||
|
readAll = false;
|
||||||
|
mailboxes = [ "ALL" ];
|
||||||
|
};
|
||||||
|
notmuch.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# configure mbsync
|
||||||
|
home-manager.users.mailUser.programs.mbsync.enable = true;
|
||||||
|
|
||||||
|
# re-tag everything once a day
|
||||||
|
systemd.services.retagmail = {
|
||||||
|
enable = true;
|
||||||
|
serviceConfig = { User = config.users.users.mailUser.name; };
|
||||||
|
environment.NOTMUCH_CONFIG =
|
||||||
|
"${config.users.users.mailUser.home}/.config/notmuch/notmuchrc";
|
||||||
|
script = "${notmuchTagging}";
|
||||||
|
};
|
||||||
|
systemd.timers.retagmail = {
|
||||||
|
enable = true;
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "daily";
|
||||||
|
Persistent = "true";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# fetch mails every 10 minutes
|
||||||
|
systemd.services.fetchmail = {
|
||||||
|
enable = true;
|
||||||
|
serviceConfig = { User = config.users.users.mailUser.name; };
|
||||||
|
environment.NOTMUCH_CONFIG =
|
||||||
|
"${config.users.users.mailUser.home}/.config/notmuch/notmuchrc";
|
||||||
|
script = ''
|
||||||
|
echo "run mbsync"
|
||||||
|
${pkgs.isync}/bin/mbsync \
|
||||||
|
--all
|
||||||
|
|
||||||
|
echo "run getmail"
|
||||||
|
${pkgs.getmail}/bin/getmail \
|
||||||
|
--quiet \
|
||||||
|
--rcfile getmailingolf-wagner-de
|
||||||
|
|
||||||
|
echo "run notmuch"
|
||||||
|
${pkgs.notmuch}/bin/notmuch new
|
||||||
|
${notmuchTaggingNew}
|
||||||
|
echo "mute threads"
|
||||||
|
${pkgs.notmuch}/bin/notmuch tag +muted $(${pkgs.notmuch}/bin/notmuch search --output=threads tag:muted)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
systemd.timers.fetchmail = {
|
||||||
|
enable = true;
|
||||||
|
# timerConfig.OnCalendar = " *-*-* *:00:00";
|
||||||
|
timerConfig.OnCalendar = "*:0/10";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# configure notmuch
|
||||||
|
home-manager.users.mailUser.programs.notmuch = {
|
||||||
|
enable = true;
|
||||||
|
new.tags = [ "unread" "inbox" "new" ];
|
||||||
|
};
|
||||||
|
home-manager.users.mailUser.home.file."notmuch" = {
|
||||||
|
source = "${config.users.users.mailUser.home}/.config/notmuch/notmuchrc";
|
||||||
|
target = ".notmuch-config";
|
||||||
|
};
|
||||||
|
|
||||||
|
# a few config
|
||||||
|
home-manager.users.mailUser.programs.afew = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = with lib;
|
||||||
|
let
|
||||||
|
|
||||||
|
template = index:
|
||||||
|
{ tags, query, message ? "generic", ... }: ''
|
||||||
|
[Filter.${toString index}]
|
||||||
|
query = ${query}
|
||||||
|
tags = ${concatStringsSep ";" tags}
|
||||||
|
message = ${message}
|
||||||
|
'';
|
||||||
|
|
||||||
|
in concatStringsSep "\n" (imap0 template filters);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,202 +173,6 @@ in {
|
||||||
home-manager.users.mainUser.programs.msmtp.enable = true;
|
home-manager.users.mainUser.programs.msmtp.enable = true;
|
||||||
home-manager.users.mainUser.programs.notmuch.enable = true;
|
home-manager.users.mainUser.programs.notmuch.enable = true;
|
||||||
|
|
||||||
# not working for some reason
|
|
||||||
# maybe update home-manager
|
|
||||||
#home-manager.users.mainUser.services.muchsync = {
|
|
||||||
# remotes = {
|
|
||||||
# server = {
|
|
||||||
# frequency = "*:0/10";
|
|
||||||
# remote.host = "mailfetcher@sterni.private";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
#};
|
|
||||||
|
|
||||||
# configure astroid ui
|
|
||||||
home-manager.users.mainUser.programs.astroid = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = { startup.queries.inbox = "tag:inbox AND NOT tag:killed"; };
|
|
||||||
externalEditor =
|
|
||||||
"${pkgs.neovim-qt}/bin/nvim-qt -- -c 'set ft=mail' '+set fileencoding=utf-8' '+set ff=unix' '+set enc=utf-8' '+set fo+=w' %1";
|
|
||||||
};
|
|
||||||
|
|
||||||
# configure alot
|
|
||||||
home-manager.users.mainUser.programs.alot = {
|
|
||||||
enable = true;
|
|
||||||
#name mono fg mono bg 16c fg 16c bg 256c fg 256c bg
|
|
||||||
# | | | | | |
|
|
||||||
# v v v v v v
|
|
||||||
#normal= 'bold,underline', '', 'light red, bold, underline', 'light green', 'light red, bold, underline', '#8f6'
|
|
||||||
bindings = {
|
|
||||||
envelope = { e = "edit"; };
|
|
||||||
thread = {
|
|
||||||
r = "reply --all";
|
|
||||||
R = "reply --all";
|
|
||||||
g = "reply";
|
|
||||||
h = "toggleheaders";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
theme = "solarized_light_real"
|
|
||||||
auto_remove_unread = True
|
|
||||||
ask_subject = True
|
|
||||||
handle_mouse = False
|
|
||||||
initial_command = "search tag:inbox AND NOT tag:discourse"
|
|
||||||
input_timeout = 0.3
|
|
||||||
exclude_tags = "killed"
|
|
||||||
prefer_plaintext = True
|
|
||||||
thread_indent_replies = 4
|
|
||||||
|
|
||||||
[tags]
|
|
||||||
[[flagged]]
|
|
||||||
translated = ⚑
|
|
||||||
normal = ${ticks},${ticks},'light red',${ticks},'light red',${ticks}
|
|
||||||
focus = ${ticks},${ticks},'light red',${ticks},'light red',${ticks}
|
|
||||||
[[replied]]
|
|
||||||
translated = ⏎
|
|
||||||
normal = ${ticks},${ticks},'light red',${ticks},'light red',${ticks}
|
|
||||||
focus = ${ticks},${ticks},'light red',${ticks},'light red',${ticks}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.mainUser.xdg.configFile."alot/themes/solarized_light_real".text =
|
|
||||||
''
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# SOLARIZED LIGHT
|
|
||||||
#
|
|
||||||
# colour theme for alot. © 2012 Patrick Totzke, GNU GPL3+
|
|
||||||
# http://ethanschoonover.com/solarized
|
|
||||||
# https://github.com/pazz/alot
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# Define mappings from solarized colour names to urwid attribute names for 16
|
|
||||||
# and 256 colour modes. These work well assuming you use the solarized term
|
|
||||||
# colours via Xressources/Xdefaults. You might want to change this otherwise
|
|
||||||
|
|
||||||
16_base3 = 'dark gray'
|
|
||||||
16_base2 = 'black'
|
|
||||||
16_base1 = 'light green'
|
|
||||||
16_base0 = 'yellow'
|
|
||||||
16_base00 = 'light blue'
|
|
||||||
16_base01 = 'light cyan'
|
|
||||||
16_base02 = 'light gray'
|
|
||||||
16_base03 = 'white'
|
|
||||||
16_yellow = 'brown'
|
|
||||||
16_orange = 'light red'
|
|
||||||
16_red = 'dark red'
|
|
||||||
16_magenta = 'dark magenta'
|
|
||||||
16_violet = 'light magenta'
|
|
||||||
16_blue = 'dark blue'
|
|
||||||
16_cyan = 'dark cyan'
|
|
||||||
16_green = 'dark green'
|
|
||||||
|
|
||||||
# Use a slightly different mapping here to be able to use "bold" in 256c mode
|
|
||||||
|
|
||||||
256_base3 = 'dark gray'
|
|
||||||
256_base2 = 'black'
|
|
||||||
256_base1 = 'light green'
|
|
||||||
256_base0 = 'yellow'
|
|
||||||
256_base00 = 'g50' #808080
|
|
||||||
256_base01 = 'g52' #848484 - approximates #8a8a8a
|
|
||||||
256_base02 = 'light gray'
|
|
||||||
256_base03 = 'white'
|
|
||||||
256_yellow = 'brown'
|
|
||||||
256_orange = 'light red'
|
|
||||||
256_red = 'dark red'
|
|
||||||
256_magenta = 'dark magenta'
|
|
||||||
256_violet = 'light magenta'
|
|
||||||
256_blue = 'dark blue'
|
|
||||||
256_cyan = '#0aa' #00afaf
|
|
||||||
256_green = 'dark green'
|
|
||||||
|
|
||||||
# This is the actual alot theme
|
|
||||||
[global]
|
|
||||||
footer = 'standout','default','%(16_base01)s','%(16_base2)s','%(256_base01)s','%(256_base2)s'
|
|
||||||
body = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base3)s'
|
|
||||||
notify_error = 'standout','default','%(16_base3)s','%(16_red)s','%(256_base3)s','%(256_red)s'
|
|
||||||
notify_normal = 'default','default','%(16_base00)s','%(16_base2)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
prompt = 'default','default','%(16_base00)s','%(16_base2)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
tag = 'default','default','%(16_yellow)s','%(16_base3)s','%(256_yellow)s','%(256_base3)s'
|
|
||||||
tag_focus = 'standout','default','%(16_base3)s','%(16_yellow)s','%(256_base3)s','%(256_yellow)s'
|
|
||||||
[help]
|
|
||||||
text = 'default','default','%(16_base00)s','%(16_base2)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
section = 'underline','default','%(16_base01)s,underline','%(16_base2)s','%(256_base01)s,underline','%(256_base2)s'
|
|
||||||
title = 'standout','default','%(16_base01)s','%(16_base2)s','%(256_base01)s','%(256_base2)s'
|
|
||||||
[namedqueries]
|
|
||||||
line_focus = 'standout','default','%(16_base2)s','%(16_yellow)s','%(256_base2)s','%(256_yellow)s'
|
|
||||||
line_even = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base3)s'
|
|
||||||
line_odd = 'default','default','%(16_base00)s','%(16_base2)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
[taglist]
|
|
||||||
line_focus = 'standout','default','%(16_base2)s','%(16_yellow)s','%(256_base2)s','%(256_yellow)s'
|
|
||||||
line_even = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base3)s'
|
|
||||||
line_odd = 'default','default','%(16_base00)s','%(16_base2)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
[bufferlist]
|
|
||||||
line_focus = 'standout','default','%(16_base2)s','%(16_yellow)s','%(256_base2)s','%(256_yellow)s'
|
|
||||||
line_even = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base3)s'
|
|
||||||
line_odd = 'default','default','%(16_base00)s','%(16_base2)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
[thread]
|
|
||||||
attachment = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base3)s'
|
|
||||||
attachment_focus = 'underline','default','%(16_base2)s','%(16_yellow)s','%(256_base2)s','%(256_yellow)s'
|
|
||||||
body = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base3)s'
|
|
||||||
body_focus = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
arrow_bars = 'default','default','%(16_yellow)s','%(16_base3)s','%(256_yellow)s','%(256_base3)s'
|
|
||||||
arrow_heads = 'default','default','%(16_yellow)s','%(16_base3)s','%(256_yellow)s','%(256_base3)s'
|
|
||||||
header = 'default','default','%(16_base00)s','%(16_base2)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
header_key = 'default','default','%(16_magenta)s','%(16_base2)s','%(256_magenta)s','%(256_base2)s'
|
|
||||||
header_value = 'default','default','%(16_blue)s','%(16_base2)s','%(256_blue)s','%(256_base2)s'
|
|
||||||
[[summary]]
|
|
||||||
even = 'default','default','%(16_base00)s','%(16_base2)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
focus = 'standout','default','%(16_base3)s','%(16_yellow)s','%(256_base3)s','%(256_yellow)s'
|
|
||||||
odd = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base3)s'
|
|
||||||
[envelope]
|
|
||||||
body = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base3)s'
|
|
||||||
header = 'default','default','%(16_base00)s','%(16_base2)s','%(256_base00)s','%(256_base2)s'
|
|
||||||
header_key = 'default','default','%(16_orange)s','%(16_base2)s','%(256_orange)s','%(256_base2)s'
|
|
||||||
header_value = 'default','default','%(16_violet)s','%(16_base2)s','%(256_violet)s','%(256_base2)s'
|
|
||||||
[search]
|
|
||||||
[[threadline]]
|
|
||||||
normal = 'default','default','%(16_base01)s','%(16_base3)s','%(256_base01)s','%(256_base3)s'
|
|
||||||
focus = 'default','default','%(16_base01)s,underline','%(16_base3)s','%(256_base01)s,underline','%(256_base3)s'
|
|
||||||
parts = mailcount,date,tags,authors,subject
|
|
||||||
[[[date]]]
|
|
||||||
normal = 'default','default','%(16_base01)s','%(16_base3)s','%(256_base01)s','%(256_base3)s'
|
|
||||||
focus = 'default','default','%(16_base01)s,underline','%(16_base3)s','%(256_base01)s,underline','%(256_base3)s'
|
|
||||||
[[[mailcount]]]
|
|
||||||
normal = 'default','default','%(16_base01)s','%(16_base3)s','%(256_base01)s','%(256_base3)s'
|
|
||||||
focus = 'default','default','%(16_base01)s,underline','%(16_base3)s','%(256_base01)s,underline','%(256_base3)s'
|
|
||||||
[[[tags]]]
|
|
||||||
normal = 'bold','default','%(16_yellow)s','%(16_base3)s','%(256_yellow)s','%(256_base3)s'
|
|
||||||
focus = 'bold','default','%(16_yellow)s,underline','%(16_base3)s','%(256_yellow)s,underline','%(256_base3)s'
|
|
||||||
[[[authors]]]
|
|
||||||
normal = 'default,underline','default','%(16_blue)s','%(16_base3)s','%(256_blue)s','%(256_base3)s'
|
|
||||||
focus = 'default,underline','default','%(16_blue)s,underline','%(16_base3)s','%(256_blue)s,underline','%(256_base3)s'
|
|
||||||
width = 'fit',0,30
|
|
||||||
[[[subject]]]
|
|
||||||
normal = 'default','default','%(16_base00)s','%(16_base3)s','%(256_base00)s','%(256_base3)s'
|
|
||||||
focus = 'default','default','%(16_base00)s,underline','%(16_base3)s','%(256_base00)s,underline','%(256_base3)s'
|
|
||||||
width = 'weight',1
|
|
||||||
[[[content]]]
|
|
||||||
normal = 'default','default','%(16_base1)s','%(16_base3)s','%(256_base1)s','%(256_base3)s'
|
|
||||||
focus = 'default','default','%(16_base1)s,underline','%(16_base3)s','%(256_base1)s,underline','%(256_base3)s'
|
|
||||||
[[threadline-unread]]
|
|
||||||
normal = 'default','default','%(16_base01)s,bold','%(16_base2)s','%(256_base01)s,bold','%(256_base2)s'
|
|
||||||
tagged_with = 'unread'
|
|
||||||
[[[date]]]
|
|
||||||
normal = 'default','default','%(16_base01)s,bold','%(16_base2)s','%(256_base01)s,bold','%(256_base2)s'
|
|
||||||
[[[mailcount]]]
|
|
||||||
normal = 'default','default','%(16_base01)s,bold','%(16_base2)s','%(256_base01)s,bold','%(256_base2)s'
|
|
||||||
[[[tags]]]
|
|
||||||
normal = 'bold','default','%(16_yellow)s','%(16_base2)s','%(256_yellow)s','%(256_base2)s'
|
|
||||||
[[[authors]]]
|
|
||||||
normal = 'default,underline','default','%(16_violet)s','%(16_base2)s','%(256_violet)s','%(256_base2)s'
|
|
||||||
[[[subject]]]
|
|
||||||
normal = 'default','default','%(16_base02)s,bold','%(16_base2)s','%(256_base02)s,bold','%(256_base2)s'
|
|
||||||
[[[content]]]
|
|
||||||
normal = 'default','default','%(16_base1)s,bold','%(16_base2)s','%(256_base1)s,bold','%(256_base2)s'
|
|
||||||
'';
|
|
||||||
|
|
||||||
# enable html emails
|
# enable html emails
|
||||||
home-manager.users.mainUser.home.file.".mailcap".text = ''
|
home-manager.users.mainUser.home.file.".mailcap".text = ''
|
||||||
text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput;
|
text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput;
|
||||||
|
@ -428,9 +232,15 @@ in {
|
||||||
''
|
''
|
||||||
} %r |"
|
} %r |"
|
||||||
|
|
||||||
virtual-mailboxes "INBOX" "notmuch://?query=(tag:inbox or (tag:sent and not tag:archive)) AND NOT tag:discourse"
|
virtual-mailboxes "INBOX" "notmuch://?query=(tag:inbox or (tag:sent and not tag:archive)) AND NOT tag:discourse AND NOT tag:muted"
|
||||||
virtual-mailboxes "Unread" "notmuch://?query=tag:unread"
|
virtual-mailboxes "Unread" "notmuch://?query=(tag:unread AND NOT tag:muted)"
|
||||||
virtual-mailboxes "Discourse" "notmuch://?query=tag:discourse"
|
virtual-mailboxes "Discourse.all" "notmuch://?query=(tag:discourse AND NOT tag:muted)"
|
||||||
|
virtual-mailboxes "Discourse.development" "notmuch://?query=(tag:discourse AND tag:development AND NOT tag:muted)"
|
||||||
|
virtual-mailboxes "Discourse.announcements" "notmuch://?query=(tag:discourse AND tag:announcements AND NOT tag:muted)"
|
||||||
|
virtual-mailboxes "Discourse.links" "notmuch://?query=(tag:discourse AND tag:links AND NOT tag:muted)"
|
||||||
|
virtual-mailboxes "Discourse.games" "notmuch://?query=(tag:discourse AND tag:games AND NOT tag:muted)"
|
||||||
|
virtual-mailboxes "Discourse.meta" "notmuch://?query=(tag:discourse AND tag:meta AND NOT tag:muted)"
|
||||||
|
virtual-mailboxes "Discourse.events" "notmuch://?query=(tag:discourse AND tag:events AND NOT tag:muted)"
|
||||||
virtual-mailboxes "Starred" "notmuch://?query=tag:flagged"
|
virtual-mailboxes "Starred" "notmuch://?query=tag:flagged"
|
||||||
virtual-mailboxes "Archive" "notmuch://?query=tag:archive"
|
virtual-mailboxes "Archive" "notmuch://?query=tag:archive"
|
||||||
virtual-mailboxes "Sent" "notmuch://?query=tag:sent"
|
virtual-mailboxes "Sent" "notmuch://?query=tag:sent"
|
||||||
|
@ -440,7 +250,7 @@ in {
|
||||||
tag-transforms "junk" "k" \
|
tag-transforms "junk" "k" \
|
||||||
"unread" "u" \
|
"unread" "u" \
|
||||||
"replied" "↻" \
|
"replied" "↻" \
|
||||||
"TODO" "T" \
|
"TODO" "T"
|
||||||
|
|
||||||
# notmuch bindings
|
# notmuch bindings
|
||||||
bind index \\\\ noop
|
bind index \\\\ noop
|
||||||
|
|
Loading…
Reference in a new issue