forked from mirrors_public/oddlama_nix-config
feat: add repo-like user secrets, rudimentary config of thunderbird
This commit is contained in:
parent
0994bba279
commit
926787528b
10 changed files with 115 additions and 3 deletions
53
users/myuser/graphical/thunderbird.nix
Normal file
53
users/myuser/graphical/thunderbird.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
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));
|
||||
|
||||
# TODO dont send html setting
|
||||
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
|
||||
profiles.personal = {
|
||||
isDefault = true;
|
||||
withExternalGnupg = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.persistence."/state".directories = [
|
||||
".cache/thunderbird"
|
||||
];
|
||||
|
||||
home.persistence."/persist".directories = [
|
||||
".thunderbird"
|
||||
];
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"x-scheme-handler/mailto" = ["thunderbird.desktop"];
|
||||
"message/rfc822" = ["thunderbird.desktop"];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue