-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
442 lines (394 loc) · 10.7 KB
/
default.nix
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
{ pkgs
, ...
}:
let
wrapperDir = "/run/wrappers/";
mkOnedriverService = { pkgs, mountpoint }: {
Unit = {
Description = "onedriver";
};
Service = {
ExecStart = "${pkgs.onedriver}/bin/onedriver ${mountpoint}";
ExecStopPost = "${wrapperDir}/bin/fusermount3 -uz ${mountpoint}";
Restart = "on-abnormal";
RestartSec = "3";
RestartForceExitStatus = "2";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
catppuccin-backgrounds = pkgs.stdenvNoCC.mkDerivation {
pname = "catppuccin-backgrounds";
version = "2024-11-07";
nativeBuildInputs = [ pkgs.unzip ];
src = pkgs.fetchurl {
url = "https://github.com/VipinVIP/wallpapers/archive/refs/heads/main.zip";
hash = "sha256-9v5VZc0nZf7N12HUKaY78DQKbjadyM6NcD3EWYFpqY4=";
};
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out
unzip -d $out $src
'';
};
terminalFont = rec {
name = "Comic Mono";
italic = "0xProto Italic";
bold = "${name} Bold";
size = 12;
};
in
{
my-modules = {
fonts = {
enable = true;
typefonts = false;
families = {
extra = with pkgs; [
monaspace
ibm-plex
recursive
_0xproto
comic-mono
];
};
};
gleeter.enable = true;
coding = {
enable = true;
languages = {
c = false;
c_sharp = true;
gleam = true;
go = true;
haskell = false;
javascript = true;
java = true;
json = true;
kotlin = false;
lua = true;
misc = true;
nix = true;
purescript = true;
racket = false;
rust = true;
scripting = true;
terraform = true;
yaml = true;
typst = true;
};
};
fish = {
enable = true;
configuration = {
extraShellAbbrs = {
j = "just";
mk = "make";
};
};
};
gaming = {
enable = true;
dwarfFortress = {
enable = false;
config = {
theme = with pkgs.dwarf-fortress-packages; themes.ironhand;
enableDwarfTherapist = false;
enableLegendsBrowser = false;
};
};
nethack = {
enable = true;
options = {
permInvent = true;
petType = "cat";
msgWindow = "reversed";
litCorridor = true;
};
};
};
im.enable = true;
neovim = {
enable = true;
configuration.package = pkgs.neovim-unwrapped;
defaultEditor = true;
gui = {
enable = false;
font = {
inherit (terminalFont) name size;
features = [
{ name = "Recursive Mn Csl St"; features = [ "+liga" "+dlig" "+ss10" "+ss20" ]; }
];
};
};
};
git = {
enable = true;
workRepository = {
enabled = true;
workRoot = "~/Development/Work/";
workEmail = "massimo.gengarelli@alten.com";
};
};
zellij = {
enable = true;
configuration = {
autoAttach = false;
autoExit = false;
enableFishIntegration = false;
};
};
devops = {
enable = true;
k9s.enable = true;
kubernetes = {
enable = true;
colored = true;
};
terraform = {
enable = true;
flavour = "terraform";
};
azure-cli = {
enable = false;
extensions = with pkgs.azure-cli-extensions; [ k8s-extension ];
};
};
zed = {
enable = false;
settings = {
buffer_font_size = 12;
buffer_font_family = terminalFont.name;
};
};
kitty = {
enable = true;
font = {
inherit (terminalFont) name size;
packages = with pkgs; [ comic-mono _0xproto ];
italic = "0xProto Italic";
};
};
};
programs = {
google-chrome = {
enable = true;
package = pkgs.google-chrome;
};
direnv = {
enable = true;
nix-direnv.enable = true;
config = {
global.disable_stdin = true;
global.strict_env = true;
whitelist.prefix = let home = "/home/massi"; in [
"${home}/dev"
"${home}/Development"
"${home}/.config/nvim"
"${home}/.config/nixos"
];
};
};
command-not-found.enable = false;
# Let Home Manager install and manage itself.
home-manager.enable = true;
gh = {
enable = true;
settings = {
git_protocol = "ssh";
editor = "nvim";
};
};
};
dconf.settings = {
"org/gnome/desktop/interface" = {
show-battery-percentage = false;
clock-show-date = true;
clock-show-weekday = true;
monospace-font-name = "${terminalFont.name} ${builtins.toString terminalFont.size}";
};
"org/gnome/desktop/background" = rec {
picture-uri = "${catppuccin-backgrounds}/wallpapers-main/misc/feet-on-the-dashboard.png";
picture-uri-dark = picture-uri;
picture-options = "zoom";
};
"org/gnome/desktop/peripherals/touchpad" = {
disable-while-typing = true;
tap-to-click = true;
tap-and-drag = true;
two-finger-scrolling-enabled = true;
accel-profile = "adaptive";
};
"org/gnome/shell" = {
allow-extension-installation = true;
enabled-extensions = [
"appindicatorsupport@rgcjonas.gmail.com"
"blur-my-shell@aunetx"
"colosseum@sereneblue"
"dash-to-dock@micxgx.gmail.com"
"emoji-copy@felipeftn"
"fullscreen-avoider@noobsai.github.com"
"grand-theft-focus@zalckos.github.com"
"mprisLabel@moon-0xff.github.com"
"nothing-to-say@extensions.gnome.wouter.bolsterl.ee"
"peek-top-bar-on-fullscreen@marcinjahn.com"
"unblank@sun.wxg@gmail.com"
"upower-battery@codilia.com"
"quick-settings-avatar@d-go"
"auto-move-windows@gnome-shell-extensions.gcampax.github.com"
"gsconnect@andyholmes.github.io"
"drive-menu@gnome-shell-extensions.gcampax.github.com"
"screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com"
"system-monitor@gnome-shell-extensions.gcampax.github.com"
"user-theme@gnome-shell-extensions.gcampax.github.com"
"windowsNavigator@gnome-shell-extensions.gcampax.github.com"
];
};
"org/gnome/shell/extensions/auto-move-windows".application-list = [
"org.telegram.desktop.desktop:2"
"webcord.desktop:2"
"com.rtosta.zapzap.desktop:2"
];
"org/gnome/shell/extensions/colosseum" = {
compact-mode = true;
fifawc-enabled = true;
seriea-enabled = true;
seriea-int = true;
seriea-roma = true;
seriea-bol = true;
uefachampions-enabled = true;
uefaeuro-enabled = true;
};
"org/gnome/desktop/wm/preferences".button-layout = "close,minimize,maximize:appmenu";
};
services.syncthing = {
enable = false;
tray.enable = false;
};
services.flameshot = {
enable = true;
package = pkgs.flameshot;
settings = {
General = {
showDesktopNotification = true;
savePathFixed = false;
};
};
};
# Fix for Flameshot service requiring a non-existing target
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager system tray";
Requires = [ "graphical-session-pre.target" ];
};
};
services.protrans = {
enable = true;
configuration.nat.portLifeTime = 60;
};
home.sessionVariables = { };
home.packages = with pkgs; [
# Only for Teams PWA
just
powertop
(microsoft-edge.override { commandLineArgs = "--ozone-platform=wayland --force-dark-mode"; })
pbpctrl
dconf-editor
gnome-tweaks
spotify
spotube
onedriver
tana
protonvpn-gui
slack
hypnotix
inkscape-with-extensions
(transmission_4.override { enableGTK3 = true; })
libnatpmp
proton-pass
unzip
stremio
] ++ (with pkgs.gnomeExtensions; [
appindicator
blur-my-shell
colosseum
dash-to-dock
emoji-copy
fullscreen-avoider
grand-theft-focus
media-controls
nothing-to-say
peek-top-bar-on-fullscreen
unblank
upower-battery
user-avatar-in-quick-settings
auto-move-windows
gsconnect
removable-drive-menu
screenshot-window-sizer
system-monitor
user-themes
windownavigator
]);
systemd.user.startServices = "sd-switch";
# Automount Onedriver
systemd.user.services = {
"onedriver@home-massi-OneDrive" = mkOnedriverService {
inherit pkgs;
mountpoint = "\${HOME}/OneDrive";
};
};
xdg = {
enable = true;
mime.enable = true;
# Patch to allow Kitty to use Monaspace font
configFile."fontconfig/conf.d/99-monaspace-monospace.conf".text = ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- https://sw.kovidgoyal.net/kitty/faq/#kitty-is-not-able-to-use-my-favorite-font -->
<fontconfig>
<match target="scan">
<test name="family"><string>Monaspace Argon Var</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
<match target="scan">
<test name="family"><string>Monaspace Argon</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
<match target="scan">
<test name="family"><string>Monaspace Krypton Var</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
<match target="scan">
<test name="family"><string>Monaspace Krypton</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
<match target="scan">
<test name="family"><string>Monaspace Neon Var</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
<match target="scan">
<test name="family"><string>Monaspace Neon</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
<match target="scan">
<test name="family"><string>Monaspace Radon Var</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
<match target="scan">
<test name="family"><string>Monaspace Radon</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
<match target="scan">
<test name="family"><string>Monaspace Xenon Var</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
<match target="scan">
<test name="family"><string>Monaspace Xenon</string></test>
<edit name="spacing"><int>100</int></edit>
</match>
</fontconfig>
'';
};
}