feat: install proton bridge and aerc for email
This commit is contained in:
parent
1562d5c30b
commit
eeae2e69f3
5 changed files with 110 additions and 0 deletions
|
|
@ -9,7 +9,9 @@ in
|
|||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
# keep-sorted start
|
||||
aerc.enable = true;
|
||||
kitty.enable = true;
|
||||
mail.enable = true;
|
||||
obsidian.enable = true;
|
||||
zellij.enable = true;
|
||||
# keep-sorted end
|
||||
|
|
|
|||
20
modules/home-manager/features/aerc.nix
Normal file
20
modules/home-manager/features/aerc.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "aerc";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
programs.aerc = {
|
||||
enable = true;
|
||||
extraConfig.general.unsafe-accounts-conf = true;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
70
modules/home-manager/features/mail.nix
Normal file
70
modules/home-manager/features/mail.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
feature = "mail";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.${feature}.enable {
|
||||
accounts.email =
|
||||
let
|
||||
certificatesFile = config.age.secrets.protonmail-cert.path;
|
||||
in
|
||||
{
|
||||
inherit certificatesFile;
|
||||
accounts =
|
||||
let
|
||||
# keep-sorted start block=yes
|
||||
address = "willholdsworth@pm.me";
|
||||
authentication = "login";
|
||||
host = "127.0.0.1";
|
||||
tls = {
|
||||
enable = false;
|
||||
useStartTls = true;
|
||||
inherit certificatesFile;
|
||||
};
|
||||
# keep-sorted end
|
||||
in
|
||||
{
|
||||
personal = {
|
||||
enable = true;
|
||||
# keep-sorted start block=yes
|
||||
aerc = {
|
||||
enable = true;
|
||||
};
|
||||
imap = {
|
||||
port = 1143;
|
||||
inherit tls;
|
||||
inherit authentication;
|
||||
inherit host;
|
||||
};
|
||||
inherit address;
|
||||
passwordCommand = "cat ${config.age.secrets.protonmail-password.path}";
|
||||
primary = true;
|
||||
realName = "Will Holdsworth";
|
||||
smtp = {
|
||||
port = 1025;
|
||||
inherit tls;
|
||||
inherit authentication;
|
||||
inherit host;
|
||||
};
|
||||
userName = address;
|
||||
# keep-sorted end
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
# keep-sorted start
|
||||
"protonmail-cert".file = ../../../secrets/protonmail-cert.age;
|
||||
"protonmail-password".file = ../../../secrets/protonmail-password.age;
|
||||
# keep-sorted end
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ];
|
||||
|
||||
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue