[thunderbird] Move into user config

This commit is contained in:
Tibo De Peuter 2023-10-20 19:26:31 +02:00
parent 16dde9fc33
commit addf2c6c22
4 changed files with 136 additions and 131 deletions

View file

@ -1,6 +1,5 @@
{ {
imports = [ imports = [
./firefox ./firefox
./thunderbird
]; ];
} }

View file

@ -1,130 +0,0 @@
{ inputs, lib, config, pkgs, ... }:
let
signatures = {
default = ''
Met vriendelijke groeten
Tibo De Peuter
'';
UGent = ''
Met vriendelijke groeten
Tibo De Peuter
Student 2Ba Informatica
'';
MrFortem = ''
Kind regards
MrFortem Fiducia
'';
};
in
{
home-manager.users.tdpeuter = {
accounts.email.accounts = {
Telenet = {
address = "tibo.depeuter@telenet.be";
userName = "tibo.depeuter@telenet.be";
imap = {
host = "imap.telenet.be";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.telenet.be";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
realName = "Tibo De Peuter";
signature = {
showSignature = "append";
text = signatures.default;
};
primary = true;
thunderbird = {
enable = true;
settings = id: {
"mail.identity.id_${id}.htmlSigText" = signatures.default;
};
};
};
UGent = {
flavor = "outlook.office365.com";
address = "tibo.depeuter@ugent.be";
realName = "Tibo De Peuter";
signature = {
showSignature = "append";
text = signatures.UGent;
};
thunderbird = {
enable = true;
settings = id: {
"mail.server.server_${id}.authMethod" = 10;
"mail.smtpserver.smtp_${id}.authMethod" = 10;
"mail.identity.id_${id}.htmlSigText" = signatures.UGent;
};
};
};
Gmail = {
flavor = "gmail.com";
address = "tibo.depeuter@gmail.com";
realName = "Tibo De Peuter";
signature = {
showSignature = "append";
text = signatures.default;
};
thunderbird = {
enable = true;
settings = id: {
"mail.identity.id_${id}.htmlSigText" = signatures.default;
};
};
};
MrFortem = {
flavor = "gmail.com";
address = "fortemfiducia@gmail.com";
realName = "Fortem Fiducia";
signature = {
showSignature = "attach";
text = ''
Kind regards
MrFortem Fiducia
'';
};
thunderbird = {
enable = true;
settings = id: {
"mail.server.server_${id}.directory" = ".thunderbird/tdpeuter/ImapMail/imap.gmail.com-mrfortem";
"mail.server.server_${id}.directory-rel" = "[ProfD]ImapMail/imap.gmail.com-mrfortem";
"mail.identity.id_${id}.htmlSigText" = signatures.MrFortem;
};
};
};
};
programs = {
thunderbird = {
enable = true;
profiles.tdpeuter = {
isDefault = true;
settings = {
"mailnews.default_sort_order" = 2; # Sort descending
"mailnews.mark_message_read.delay" = true;
"mailnews.start_page.enabled" = false;
"mail.pane_config.dynamic" = 2; # Vertical view
};
};
};
};
};
}

View file

@ -8,6 +8,7 @@ let
in { in {
imports = [ imports = [
./dotfiles.nix ./dotfiles.nix
./mail.nix
./secrets.nix ./secrets.nix
]; ];

View file

@ -0,0 +1,135 @@
{ config, lib, pkgs, pkgs-unstable, ... }:
let
cfg = config.sisyphus.users.tdpeuter;
user = config.users.users.tdpeuter.name;
signatures = {
default = ''
Met vriendelijke groeten
Tibo De Peuter
'';
UGent = ''
Met vriendelijke groeten
Tibo De Peuter
Student 2Ba Informatica
'';
MrFortem = ''
Kind regards
MrFortem Fiducia
'';
};
in {
config = lib.mkIf cfg.enable {
home-manager.users.tdpeuter = lib.mkIf config.sisyphus.programs.home-manager.enable {
home = {
accounts.email.accounts = {
Telenet = {
address = "tibo.depeuter@telenet.be";
userName = "tibo.depeuter@telenet.be";
imap = {
host = "imap.telenet.be";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.telenet.be";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
realName = "Tibo De Peuter";
signature = {
showSignature = "append";
text = signatures.default;
};
primary = true;
thunderbird = {
enable = true;
settings = id: {
"mail.identity.id_${id}.htmlSigText" = signatures.default;
};
};
};
UGent = {
flavor = "outlook.office365.com";
address = "tibo.depeuter@ugent.be";
realName = "Tibo De Peuter";
signature = {
showSignature = "append";
text = signatures.UGent;
};
thunderbird = {
enable = true;
settings = id: {
"mail.server.server_${id}.authMethod" = 10;
"mail.smtpserver.smtp_${id}.authMethod" = 10;
"mail.identity.id_${id}.htmlSigText" = signatures.UGent;
};
};
};
Gmail = {
flavor = "gmail.com";
address = "tibo.depeuter@gmail.com";
realName = "Tibo De Peuter";
signature = {
showSignature = "append";
text = signatures.default;
};
thunderbird = {
enable = true;
settings = id: {
"mail.identity.id_${id}.htmlSigText" = signatures.default;
};
};
};
MrFortem = {
flavor = "gmail.com";
address = "fortemfiducia@gmail.com";
realName = "Fortem Fiducia";
signature = {
showSignature = "attach";
text = ''
Kind regards
MrFortem Fiducia
'';
};
thunderbird = {
enable = true;
settings = id: {
"mail.server.server_${id}.directory" = ".thunderbird/tdpeuter/ImapMail/imap.gmail.com-mrfortem";
"mail.server.server_${id}.directory-rel" = "[ProfD]ImapMail/imap.gmail.com-mrfortem";
"mail.identity.id_${id}.htmlSigText" = signatures.MrFortem;
};
};
};
};
programs = {
thunderbird = {
enable = true;
profiles.tdpeuter = {
isDefault = true;
settings = {
"mailnews.default_sort_order" = 2; # Sort descending
"mailnews.mark_message_read.delay" = true;
"mailnews.start_page.enabled" = false;
"mail.pane_config.dynamic" = 2; # Vertical view
};
};
};
};
};
};
};
}