blob: 51288b6dfcb465612160c15be66fe2739be68cad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
{
config,
lib,
pkgs,
...
}: let
cfg = config.personal.identities;
mkEnableIdentityOption = name: lib.mkEnableOption "${name} identity";
in {
options.personal.identities = {
personal = mkEnableIdentityOption "personal";
work = mkEnableIdentityOption "work";
};
config = lib.mkMerge [
{
accounts.email.accounts = let
gpg = {
key = "DFC1660846EEA97C059F18534EF515441E635D36";
signByDefault = true;
};
thunderbirdSettings = id: {
"mail.identity.id_${id}.fcc_folder_picker_mode" = 0;
};
in {
personal = lib.mkIf cfg.personal {
inherit gpg;
address = "quentin@aristote.fr";
userName = "quentin@aristote.fr";
realName = "Quentin Aristote";
folders = {
drafts = "INBOX/Brouillons";
inbox = "INBOX";
sent = "INBOX/Envoyés";
trash = "INBOX/Corbeille";
};
imap = {
host = "ssl0.ovh.net";
port = 993;
};
smtp = {
host = "ssl0.ovh.net";
port = 465;
};
thunderbird = {
enable = true;
profiles = ["default"];
settings = id:
thunderbirdSettings id
// {
"mail.identity.id_${id}.draft_folder" = "imap://quentin%40aristote.fr@ssl0.ovh.net/INBOX/Brouillons";
"mail.identity.id_${id}.fcc_folder" = "imap://quentin%40aristote.fr@ssl0.ovh.net/INBOX/Envoy&AOk-s";
"mail.identity.id_${id}.archive_folder" = "imap://quentin%40aristote.fr@ssl0.ovh.net/INBOX/Archive";
"mail.server.server_${id}.trash_folder_name" = "INBOX/Corbeille";
};
};
};
work = lib.mkIf cfg.work {
inherit gpg;
address = "quentin.aristote@irif.fr";
userName = "aristote";
realName = "Quentin Aristote";
aliases = ["aristote@irif.fr"];
folders = {
drafts = "Drafts";
inbox = "Inbox";
sent = "Sent";
trash = "Trash";
};
imap = {
host = "imap.irif.fr";
port = 993;
};
smtp = {
host = "smtp.irif.fr";
port = 465;
};
thunderbird = {
enable = true;
profiles = ["default"];
settings = id:
thunderbirdSettings id
// {
"mail.identity.id_${id}.archive_folder" = "imap://aristote@imap.irif.fr/Archive";
"mail.server.server_${id}.trash_folder_name" = "Trash";
};
};
};
};
}
(lib.mkIf cfg.work {
home = {
packages = with pkgs; [zotero evince zulip];
file.".latexmkrc".source =
lib.mkDefault config.personal.home.dotfiles.latexmkrc;
};
xdg.mimeApps.defaultApplications."application/pdf" = ["org.gnome.Evince.desktop"];
programs.firefox.profiles = let
addFloccus = {
extensions.packages = [pkgs.personal.firefoxAddons.floccus];
};
in {
default = addFloccus;
videoconferencing = addFloccus;
};
})
];
}
|