Add dodona mail account
Some checks failed
Cachix / build (kholinar) (push) Waiting to run
Cachix / build (marabethia) (push) Waiting to run
Cachix / build (elendel) (push) Has been cancelled

This commit is contained in:
Charlotte Van Petegem 2025-06-28 14:41:19 +02:00
parent b6bd5a4c8b
commit 395e91768c
Signed by: chvp
SSH key fingerprint: SHA256:s9rb8jBVfdahqWHuBAcHCBP1wmj4eYQXZfqgz4H3E9E
3 changed files with 33 additions and 3 deletions

View file

@ -13,7 +13,7 @@ let
${pkgs.libnotify}/bin/notify-send -t 5000 'New ${name} mail arrived' "$unseen_count unseen mails" ${pkgs.libnotify}/bin/notify-send -t 5000 'New ${name} mail arrived' "$unseen_count unseen mails"
fi fi
''; '';
makeAccount = { name, address, host ? "", imapHost ? host, smtpHost ? host, useStartTls ? false, secretToolId, extraConfig ? { }, oauth ? false }: (lib.recursiveUpdate makeAccount = { name, address, host ? "", imapHost ? host, smtpHost ? host, useStartTls ? false, secretToolId ? "", extraConfig ? { }, oauth ? false }: (lib.recursiveUpdate
{ {
inherit address; inherit address;
gpg = { gpg = {
@ -45,7 +45,7 @@ let
extraConfig = lib.mkIf oauth { auth = "xoauth2"; }; extraConfig = lib.mkIf oauth { auth = "xoauth2"; };
}; };
mu.enable = true; mu.enable = true;
passwordCommand = if oauth then "${pkgs.mfauth}/bin/mfauth access ${name}" else "${passwordScript} ${secretToolId}"; passwordCommand = if oauth then "${pkgs.oauth2ms}/bin/oauth2ms" else "${passwordScript} ${secretToolId}";
realName = "Charlotte Van Petegem"; realName = "Charlotte Van Petegem";
signature = { signature = {
showSignature = "none"; showSignature = "none";
@ -213,7 +213,7 @@ in
zfs.homeLinks = [ zfs.homeLinks = [
{ path = "mail"; type = "data"; } { path = "mail"; type = "data"; }
{ path = ".cache/mu"; type = "cache"; } { path = ".cache/mu"; type = "cache"; }
{ path = ".cache/mfauth"; type = "cache"; } { path = ".local/share/oauth2ms"; type = "cache"; }
]; ];
}; };
}; };
@ -249,6 +249,17 @@ in
folders = { drafts = "Drafts"; inbox = "INBOX"; sent = "INBOX"; trash = "Trash"; }; folders = { drafts = "Drafts"; inbox = "INBOX"; sent = "INBOX"; trash = "Trash"; };
}; };
}; };
dodona = makeAccount {
name = "dodona";
address = "charlotte.vanpetegem@dodona.be";
imapHost = "outlook.office365.com";
smtpHost = "smtp-mail.outlook.com";
extraConfig = {
folders = { drafts = "Drafts"; inbox = "INBOX"; sent = "INBOX"; trash = "Deleted Items"; };
};
oauth = true;
useStartTls = true;
};
rodekruis-eerstehulp = makeAccount { rodekruis-eerstehulp = makeAccount {
name = "rodekruis-eerstehulp"; name = "rodekruis-eerstehulp";
address = "eerstehulp@gent.rodekruis.be"; address = "eerstehulp@gent.rodekruis.be";
@ -272,6 +283,7 @@ in
}; };
}; };
}; };
home.packages = [ pkgs.oauth2ms ];
programs = { programs = {
mbsync.enable = true; mbsync.enable = true;
msmtp.enable = true; msmtp.enable = true;
@ -314,5 +326,10 @@ in
}; };
}; };
}; };
age.secrets."files/programs/oauth2ms" = {
file = ../../../../secrets/files/programs/oauth2ms.age;
owner = "charlotte";
path = "/home/charlotte/.config/oauth2ms/config.json";
};
}; };
} }

View file

@ -43,6 +43,8 @@ in
"secrets/files/programs/vpn/local.age".publicKeys = personals ++ users; "secrets/files/programs/vpn/local.age".publicKeys = personals ++ users;
"secrets/files/programs/vpn/global.age".publicKeys = personals ++ users; "secrets/files/programs/vpn/global.age".publicKeys = personals ++ users;
"secrets/files/programs/oauth2ms.age".publicKeys = nixosPersonals ++ users;
"secrets/passwords/services/accentor.age".publicKeys = [ elendel ] ++ users; "secrets/passwords/services/accentor.age".publicKeys = [ elendel ] ++ users;
"secrets/passwords/services/entrance-exam.age".publicKeys = [ marabethia ] ++ users; "secrets/passwords/services/entrance-exam.age".publicKeys = [ marabethia ] ++ users;

View file

@ -0,0 +1,11 @@
age-encryption.org/v1
-> ssh-ed25519 aUd9Ng fdV2UseozIVtcOME/lfJTdZ74CcRgzcTyapTNyMbYEQ
94MgHDTUkp0NElEsN6v5YNbitQBSto1/Do8oyvKr/r0
-> ssh-ed25519 s9rb8g 5pY8e5UB7FgaSL/LKY5kqxQp0tGVfjCALiXdDDgOGxE
2PiiDQk73OLpsdHwFTVCc5Df6Soz3QVbTiiik6Lr6XQ
-> ssh-ed25519 +xxExQ ILoi0qC8liv+HID/1ClxP2fLmZjY4i5qb2LBk6jDTBk
akXCDWam1Rg5hfO3djEGnPsUrZi8xUJoRHpHqCFlkog
--- QE3m2INgFSMc0XY3ZEzAvhZjtH9TEYIyABdpI8Lrexw
ZružÜÍŒv;²º<C2B2>àíy]·@èž:m2ƒ`ÀZ6èÞQôt8©$;èÇÿ¡å×®ì6^QùqÂv1F™å æl¦Nwók|L‰âÊ N>ÝA©àô:ÍNeÈš€U®ˆ}XhT`þ7àXã=SoùÆ8×T°Ä"Ï.ꙞuQZëeßø7O÷~hs¨Û~ë¬IBØ;˜æ L:=¸èeâ°Üäòéºë½×DË2¹¹Ë>g¹²ýÃÚ³5ݱ~ë…åfÁŸL](Ï…w£mð€ê¢H^¹Ü¨·Rþ£º2=<“d—]ž2]³`1¦PMA5%cLÃä׬P=w`ìמ"'25†>Wô¡t»' aŸo+É‘–íå™ ¨¡˜‡·õ‡tæ2aòY£»K"ÕMv˜½¶¦|.?fie¿á£<C3A1>Ä-ÊÞ‡5*8B¯ë?ÏðèZGŒŠ(&
uÑ_
ãKî+[*rA³ <20>Š·Å“ºöج˜ìÖ—!Ã]0µÿÓá<E280A0>)´nZx