blob: 89ffc005b938bee37280ce6af40a657b645ffba8 (
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
{ config, lib, pkgs, ... }:
let
cfg = config.personal.profiles;
mkEnableProfileOption = name: lib.mkEnableOption "${name} profile";
mkEnableIdentityOption = name: lib.mkEnableOption "${name} identity";
in {
options.personal.profiles = {
dev = mkEnableProfileOption "development";
social = {
enable = mkEnableProfileOption "social";
identities = {
personal = mkEnableIdentityOption "personal";
work = mkEnableIdentityOption "work";
};
};
syncing = mkEnableProfileOption "syncing";
multimedia = mkEnableProfileOption "video";
};
config = lib.mkMerge [
(lib.mkIf cfg.dev {
home.packages = with pkgs; [ gnupg python3 ];
programs = {
alacritty.enable = lib.mkDefault config.personal.gui.enable;
direnv.enable = lib.mkDefault true;
emacs.enable = lib.mkDefault true;
git.enable = lib.mkDefault true;
};
home.shellAliases = {
mkenv = ''
cp ~/.config/venv-manager/shell-template.nix ./shell.nix ;
echo "use_nix" >> .envrc ;
direnv allow ;
$EDITOR shell.nix ;
'';
};
home.file = {
".config/latexmkrc".text =
builtins.readFile config.personal.home.dotfiles.latexmkrc;
".config/venv-manager/config/default.nix".source =
lib.mkDefault config.personal.home.dotfiles.venv-manager;
};
})
(lib.mkIf cfg.multimedia {
home.packages = with pkgs; [ pavucontrol transmission-gtk vlc ];
personal = {
gui.enable = lib.mkForce true;
firefox.webapps = [
{
name = "Netflix";
genericName = "Streaming service";
icon = "${pkgs.personal.static.icons.netflix}";
comment = "Unlimited movies, TV shows, and more.";
url = "https://www.netflix.com/fr-en/login";
categories = [ "AudioVideo" "Video" "Player" ];
}
{
name = "MUBI";
genericName = "Streaming service";
icon = "${pkgs.personal.static.icons.mubi}";
comment = "Watch hand-picked cinema.";
url = "https://mubi.com";
categories = [ "AudioVideo" "Video" "Player" ];
}
{
name = "Deezer";
genericName = "Streaming service";
icon = "${pkgs.personal.static.icons.deezer}";
comment = "Listen to music online";
url = "https://deezer.com/login";
categories = [ "AudioVideo" "Audio" "Player" "Music" ];
}
];
};
})
(lib.mkIf cfg.social.enable {
home.packages = with pkgs;
lib.optionals
(config.personal.gui.enable && cfg.social.identities.personal)
[ signal-desktop ];
programs.thunderbird.enable = lib.mkDefault config.personal.gui.enable;
services.gpg-agent = {
enable = true;
enableSshSupport = true;
};
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.social.identities.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 = thunderbirdSettings;
};
};
work = lib.mkIf cfg.social.identities.work {
inherit gpg;
address = "quentin.aristote@ens.fr";
userName = "qaristote";
realName = "Quentin Aristote";
aliases = [
"quentin.aristote@ens.psl.eu"
"qaristote@clipper.ens.fr"
"qaristote@clipper.ens.psl.eu"
];
folders = {
drafts = "Drafts";
inbox = "Inbox";
sent = "Sent";
trash = "Trash";
};
imap = {
host = "clipper.ens.fr";
port = 993;
};
smtp = {
host = "clipper.ens.fr";
port = 465;
};
thunderbird = {
enable = true;
profiles = [ "default" ];
settings = thunderbirdSettings;
};
};
};
})
(lib.mkIf cfg.syncing {
services = {
kdeconnect.enable = lib.mkDefault true;
syncthing.enable = lib.mkDefault true;
};
})
];
}
|