1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: add more mail accounts to thunderbird

This commit is contained in:
oddlama 2024-01-30 21:33:17 +01:00
parent 498cf29a70
commit f8c7193bd6
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 10 additions and 30 deletions

View file

@ -28,12 +28,6 @@ in
mode = "640"; mode = "640";
}; };
age.secrets.mailpw-206fd3b8 = {
rekeyFile = ./secrets/mailpw-206fd3b8.age;
group = myuser;
mode = "640";
};
home-manager.users.${myuser} = { home-manager.users.${myuser} = {
imports = [ imports = [
../modules ../modules

View file

@ -1,31 +1,17 @@
{ {
config, config,
lib, lib,
nixosConfig,
pkgs,
... ...
}: let }: {
rageWrapper = pkgs.writeShellScript "rage-decrypt-yubikey" '' accounts.email.accounts = lib.flip lib.mapAttrs' config.userSecrets.accounts.email (_n: v:
export PATH="${pkgs.age-plugin-yubikey}:$PATH" lib.nameValuePair v.address (
exec ${pkgs.rage}/bin/rage lib.recursiveUpdate v {
''; thunderbird = {
in { enable = true;
accounts.email.accounts = profiles = ["personal"];
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));
programs.thunderbird = { programs.thunderbird = {
enable = true; enable = true;

Binary file not shown.