forked from mirrors_public/oddlama_nix-config
feat: add more mail accounts to thunderbird
This commit is contained in:
parent
498cf29a70
commit
f8c7193bd6
3 changed files with 10 additions and 30 deletions
|
@ -1,31 +1,17 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
nixosConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
rageWrapper = pkgs.writeShellScript "rage-decrypt-yubikey" ''
|
||||
export PATH="${pkgs.age-plugin-yubikey}:$PATH"
|
||||
exec ${pkgs.rage}/bin/rage
|
||||
'';
|
||||
in {
|
||||
accounts.email.accounts =
|
||||
lib.flip lib.mapAttrs' config.userSecrets.accounts.email
|
||||
(_n: v:
|
||||
lib.nameValuePair v.address ({
|
||||
# TODO genericize
|
||||
passwordCommand =
|
||||
[rageWrapper.out "-d"]
|
||||
++ lib.concatMap (x: ["-i" x]) nixosConfig.age.rekey.masterIdentities
|
||||
++ [nixosConfig.age.secrets.mailpw-206fd3b8.path];
|
||||
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles = ["personal"];
|
||||
};
|
||||
}
|
||||
// v));
|
||||
}: {
|
||||
accounts.email.accounts = lib.flip lib.mapAttrs' config.userSecrets.accounts.email (_n: v:
|
||||
lib.nameValuePair v.address (
|
||||
lib.recursiveUpdate v {
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles = ["personal"];
|
||||
};
|
||||
}
|
||||
));
|
||||
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue