tangled
alpha
login
or
join now
pluie.me
/
flake
2
fork
atom
All my system configs and packages in one repo
2
fork
atom
overview
issues
pulls
pipelines
hjemify
pluie.me
10 months ago
dfde4c0a
29fd919c
verified
This commit was signed with the committer's
known signature
.
pluie.me
SSH Key Fingerprint:
SHA256:YtI1D7vlcZ4obaiJ4tQihtswcMhHKdfYZuc4whOX2y8=
+991
-2378
68 changed files
expand all
collapse all
unified
split
.envrc
.gitignore
flake.lock
flake.nix
hm-modules
ctp-plus
default.nix
default.nix
hm-plus
default.nix
programs
1password.nix
default.nix
discord.nix
fcitx5
default.nix
rime.nix
git.nix
modules
hjem-ctp
plasma.nix
vencord.nix
hjem-ext
README.md
programs
direnv.nix
git.nix
hyfetch.nix
jujutsu.nix
moar.nix
vesktop.nix
packages
catppuccin-fcitx5
package.nix
catppuccin-fish
package.nix
roles
audio
default.nix
nixos.nix
base
default.nix
nixos.nix
boot
default.nix
lanzaboote
default.nix
nixos.nix
darwin.nix
default.nix
email
default.nix
fish
default.nix
nixos.nix
fonts
darwin.nix
default.nix
nixos.nix
mirrors
default.nix
networking
default.nix
nixos.nix
nix
default.nix
nixos.nix
nixos.nix
plasma
default.nix
nixos.nix
rust
default.nix
systems
common.nix
default.nix
fettuccine
default.nix
users
leah
appearance.nix
default.nix
presets
plasma
default.nix
settings
default.nix
programs
1password.nix
default.nix
discord
default.nix
fcitx5
default.nix
fcitx5.nix
firefox
default.nix
fish.nix
ghostty.nix
helix
default.nix
helix.nix
jj
default.nix
steam.nix
vcs.nix
+1
.envrc
···
1
1
+
has nix && use flake
+2
-1
.gitignore
···
1
1
-
result
1
1
+
result/
2
2
+
.direnv/
+14
-456
flake.lock
···
1
1
{
2
2
"nodes": {
3
3
-
"blender-bin": {
4
4
-
"inputs": {
5
5
-
"nixpkgs": [
6
6
-
"nixpkgs"
7
7
-
]
8
8
-
},
9
9
-
"locked": {
10
10
-
"dir": "blender",
11
11
-
"lastModified": 1742939360,
12
12
-
"narHash": "sha256-YeM/A4SWHlz2trSNjriPi4QR5zsYMC8vkQawSlRw2+w=",
13
13
-
"owner": "edolstra",
14
14
-
"repo": "nix-warez",
15
15
-
"rev": "c9d2d5c61a37f2217e9241ccfa6c394ed2f3e52b",
16
16
-
"type": "github"
17
17
-
},
18
18
-
"original": {
19
19
-
"id": "blender-bin",
20
20
-
"type": "indirect"
21
21
-
}
22
22
-
},
23
23
-
"catppuccin": {
24
24
-
"inputs": {
25
25
-
"nixpkgs": "nixpkgs"
26
26
-
},
27
27
-
"locked": {
28
28
-
"lastModified": 1744447794,
29
29
-
"narHash": "sha256-z5uK5BDmFg0L/0EW2XYLGr39FbQeXyNVnIEhkZrG8+Q=",
30
30
-
"owner": "catppuccin",
31
31
-
"repo": "nix",
32
32
-
"rev": "c44fe73ed8e5d5809eded7cc6156ca9c40044e42",
33
33
-
"type": "github"
34
34
-
},
35
35
-
"original": {
36
36
-
"owner": "catppuccin",
37
37
-
"repo": "nix",
38
38
-
"type": "github"
39
39
-
}
40
40
-
},
41
41
-
"crane": {
42
42
-
"locked": {
43
43
-
"lastModified": 1741148495,
44
44
-
"narHash": "sha256-EV8KUaIZ2/CdBXlutXrHoZYbWPeB65p5kKZk71gvDRI=",
45
45
-
"owner": "ipetkov",
46
46
-
"repo": "crane",
47
47
-
"rev": "75390a36cd0c2cdd5f1aafd8a9f827d7107f2e53",
48
48
-
"type": "github"
49
49
-
},
50
50
-
"original": {
51
51
-
"owner": "ipetkov",
52
52
-
"repo": "crane",
53
53
-
"type": "github"
54
54
-
}
55
55
-
},
56
56
-
"ctp-discord-compiled": {
57
57
-
"flake": false,
58
58
-
"locked": {
59
59
-
"lastModified": 1740810360,
60
60
-
"narHash": "sha256-Y1HDjEiw/MP+t2oqkdZT7mUvm09YmRUPQ9FFi1Hk26U=",
61
61
-
"owner": "catppuccin",
62
62
-
"repo": "discord",
63
63
-
"rev": "075f4e53795e336a77f922a61680d32d57b424f5",
64
64
-
"type": "github"
65
65
-
},
66
66
-
"original": {
67
67
-
"owner": "catppuccin",
68
68
-
"ref": "gh-pages",
69
69
-
"repo": "discord",
70
70
-
"type": "github"
71
71
-
}
72
72
-
},
73
73
-
"ctp-vscode-compiled": {
74
74
-
"flake": false,
75
75
-
"locked": {
76
76
-
"lastModified": 1713966373,
77
77
-
"narHash": "sha256-ODqdy+17MxSRLFzj2TYYSvG7xUXDYEDZfjW5SkzRGyA=",
78
78
-
"owner": "catppuccin",
79
79
-
"repo": "vscode",
80
80
-
"rev": "4b857d9b86cbb393e121f0f2544a6efb549dbbf4",
81
81
-
"type": "github"
82
82
-
},
83
83
-
"original": {
84
84
-
"owner": "catppuccin",
85
85
-
"ref": "catppuccin-vsc-v3.14.0",
86
86
-
"repo": "vscode",
87
87
-
"type": "github"
88
88
-
}
89
89
-
},
90
90
-
"fenix": {
91
91
-
"inputs": {
92
92
-
"nixpkgs": [
93
93
-
"nixpkgs"
94
94
-
],
95
95
-
"rust-analyzer-src": "rust-analyzer-src"
96
96
-
},
97
97
-
"locked": {
98
98
-
"lastModified": 1742452566,
99
99
-
"narHash": "sha256-sVuLDQ2UIWfXUBbctzrZrXM2X05YjX08K7XHMztt36E=",
100
100
-
"owner": "nix-community",
101
101
-
"repo": "fenix",
102
102
-
"rev": "7d9ba794daf5e8cc7ee728859bc688d8e26d5f06",
103
103
-
"type": "github"
104
104
-
},
105
105
-
"original": {
106
106
-
"owner": "nix-community",
107
107
-
"ref": "monthly",
108
108
-
"repo": "fenix",
109
109
-
"type": "github"
110
110
-
}
111
111
-
},
112
112
-
"firefox-addons": {
113
113
-
"inputs": {
114
114
-
"flake-utils": [
115
115
-
"flake-utils"
116
116
-
],
117
117
-
"nixpkgs": [
118
118
-
"nixpkgs"
119
119
-
]
120
120
-
},
121
121
-
"locked": {
122
122
-
"dir": "pkgs/firefox-addons",
123
123
-
"lastModified": 1742025179,
124
124
-
"narHash": "sha256-gxfMDCQeGZk3wZjqdl2boaGGm+yiAkaNFNp3x5vhuYg=",
125
125
-
"owner": "~rycee",
126
126
-
"repo": "nur-expressions",
127
127
-
"rev": "9b8d2f4a1e3a199878d1eb14d7e0f176052a8038",
128
128
-
"type": "sourcehut"
129
129
-
},
130
130
-
"original": {
131
131
-
"dir": "pkgs/firefox-addons",
132
132
-
"owner": "~rycee",
133
133
-
"repo": "nur-expressions",
134
134
-
"type": "sourcehut"
135
135
-
}
136
136
-
},
137
3
"flake-compat": {
138
4
"flake": false,
139
5
"locked": {
···
150
16
"type": "github"
151
17
}
152
18
},
153
153
-
"flake-compat_2": {
154
154
-
"flake": false,
155
155
-
"locked": {
156
156
-
"lastModified": 1733328505,
157
157
-
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
158
158
-
"owner": "edolstra",
159
159
-
"repo": "flake-compat",
160
160
-
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
161
161
-
"type": "github"
162
162
-
},
163
163
-
"original": {
164
164
-
"owner": "edolstra",
165
165
-
"repo": "flake-compat",
166
166
-
"type": "github"
167
167
-
}
168
168
-
},
169
19
"flake-parts": {
170
20
"inputs": {
171
21
"nixpkgs-lib": [
···
204
54
"type": "github"
205
55
}
206
56
},
207
207
-
"flake-utils_2": {
208
208
-
"inputs": {
209
209
-
"systems": "systems_2"
210
210
-
},
211
211
-
"locked": {
212
212
-
"lastModified": 1731533236,
213
213
-
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
214
214
-
"owner": "numtide",
215
215
-
"repo": "flake-utils",
216
216
-
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
217
217
-
"type": "github"
218
218
-
},
219
219
-
"original": {
220
220
-
"owner": "numtide",
221
221
-
"repo": "flake-utils",
222
222
-
"type": "github"
223
223
-
}
224
224
-
},
225
57
"ghostty": {
226
58
"inputs": {
227
59
"flake-compat": "flake-compat",
228
228
-
"flake-utils": "flake-utils_2",
60
60
+
"flake-utils": "flake-utils",
229
61
"nixpkgs-stable": [
230
62
"nixpkgs"
231
63
],
···
250
82
"type": "github"
251
83
}
252
84
},
253
253
-
"gitignore": {
254
254
-
"inputs": {
255
255
-
"nixpkgs": [
256
256
-
"lanzaboote",
257
257
-
"pre-commit-hooks-nix",
258
258
-
"nixpkgs"
259
259
-
]
260
260
-
},
261
261
-
"locked": {
262
262
-
"lastModified": 1709087332,
263
263
-
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
264
264
-
"owner": "hercules-ci",
265
265
-
"repo": "gitignore.nix",
266
266
-
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
267
267
-
"type": "github"
268
268
-
},
269
269
-
"original": {
270
270
-
"owner": "hercules-ci",
271
271
-
"repo": "gitignore.nix",
272
272
-
"type": "github"
273
273
-
}
274
274
-
},
275
85
"hjem": {
276
86
"inputs": {
277
87
"nixpkgs": [
···
299
109
]
300
110
},
301
111
"locked": {
302
302
-
"lastModified": 1745861051,
303
303
-
"narHash": "sha256-L1B2KkvbNHCtNbmYNli/DqCwEhshcwrt/p904iIYPNs=",
112
112
+
"lastModified": 1745973953,
113
113
+
"narHash": "sha256-s1ZHPUq9mi0VHVLI927tFdsMQqB5ClEBrYCwI8C7BMA=",
304
114
"owner": "snugnug",
305
115
"repo": "hjem-rum",
306
306
-
"rev": "1ad4898417031a6b280894f80f041118b6964432",
116
116
+
"rev": "d152f54bcd38dff8badc9449f6aa8f44944e1b17",
307
117
"type": "github"
308
118
},
309
119
"original": {
···
312
122
"type": "github"
313
123
}
314
124
},
315
315
-
"home-manager": {
316
316
-
"inputs": {
317
317
-
"nixpkgs": [
318
318
-
"nixpkgs"
319
319
-
]
320
320
-
},
321
321
-
"locked": {
322
322
-
"lastModified": 1744618730,
323
323
-
"narHash": "sha256-n3gN7aHwVRnnBZI64EDoKyJnWidNYJ0xezhqQtdjH2Q=",
324
324
-
"owner": "nix-community",
325
325
-
"repo": "home-manager",
326
326
-
"rev": "85dd758c703ffbf9d97f34adcef3a898b54b4014",
327
327
-
"type": "github"
328
328
-
},
329
329
-
"original": {
330
330
-
"owner": "nix-community",
331
331
-
"repo": "home-manager",
332
332
-
"type": "github"
333
333
-
}
334
334
-
},
335
335
-
"krunner-nix": {
336
336
-
"inputs": {
337
337
-
"nixpkgs": [
338
338
-
"nixpkgs"
339
339
-
]
340
340
-
},
341
341
-
"locked": {
342
342
-
"lastModified": 1696278906,
343
343
-
"narHash": "sha256-z2tbFXMC+nSN7vhn2WSoMVdViolucLeoDSfOfnRcmCE=",
344
344
-
"owner": "pluiedev",
345
345
-
"repo": "krunner-nix",
346
346
-
"rev": "8a819944620db8eab35e7dbb14d1916c9e7a478d",
347
347
-
"type": "github"
348
348
-
},
349
349
-
"original": {
350
350
-
"owner": "pluiedev",
351
351
-
"repo": "krunner-nix",
352
352
-
"type": "github"
353
353
-
}
354
354
-
},
355
355
-
"lanzaboote": {
356
356
-
"inputs": {
357
357
-
"crane": "crane",
358
358
-
"flake-compat": "flake-compat_2",
359
359
-
"flake-parts": [
360
360
-
"flake-parts"
361
361
-
],
362
362
-
"nixpkgs": [
363
363
-
"nixpkgs"
364
364
-
],
365
365
-
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
366
366
-
"rust-overlay": "rust-overlay"
367
367
-
},
368
368
-
"locked": {
369
369
-
"lastModified": 1741442524,
370
370
-
"narHash": "sha256-tVcxLDLLho8dWcO81Xj/3/ANLdVs0bGyCPyKjp70JWk=",
371
371
-
"owner": "nix-community",
372
372
-
"repo": "lanzaboote",
373
373
-
"rev": "d8099586d9a84308ffedac07880e7f07a0180ff4",
374
374
-
"type": "github"
375
375
-
},
376
376
-
"original": {
377
377
-
"owner": "nix-community",
378
378
-
"repo": "lanzaboote",
379
379
-
"type": "github"
380
380
-
}
381
381
-
},
382
382
-
"nix-darwin": {
383
383
-
"inputs": {
384
384
-
"nixpkgs": [
385
385
-
"nixpkgs"
386
386
-
]
387
387
-
},
388
388
-
"locked": {
389
389
-
"lastModified": 1744478979,
390
390
-
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
391
391
-
"owner": "LnL7",
392
392
-
"repo": "nix-darwin",
393
393
-
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
394
394
-
"type": "github"
395
395
-
},
396
396
-
"original": {
397
397
-
"owner": "LnL7",
398
398
-
"repo": "nix-darwin",
399
399
-
"type": "github"
400
400
-
}
401
401
-
},
402
125
"nix-index-database": {
403
126
"inputs": {
404
127
"nixpkgs": [
···
406
129
]
407
130
},
408
131
"locked": {
409
409
-
"lastModified": 1744518957,
410
410
-
"narHash": "sha256-RLBSWQfTL0v+7uyskC5kP6slLK1jvIuhaAh8QvB75m4=",
132
132
+
"lastModified": 1745725746,
133
133
+
"narHash": "sha256-iR+idGZJ191cY6NBXyVjh9QH8GVWTkvZw/w+1Igy45A=",
411
134
"owner": "nix-community",
412
135
"repo": "nix-index-database",
413
413
-
"rev": "4fc9ea78c962904f4ea11046f3db37c62e8a02fd",
136
136
+
"rev": "187524713d0d9b2d2c6f688b81835114d4c2a7c6",
414
137
"type": "github"
415
138
},
416
139
"original": {
···
421
144
},
422
145
"nixos-hardware": {
423
146
"locked": {
424
424
-
"lastModified": 1744366945,
425
425
-
"narHash": "sha256-OuLhysErPHl53BBifhesrRumJNhrlSgQDfYOTXfgIMg=",
147
147
+
"lastModified": 1745955289,
148
148
+
"narHash": "sha256-mmV2oPhQN+YF2wmnJzXX8tqgYmUYXUj3uUUBSTmYN5o=",
426
149
"owner": "NixOS",
427
150
"repo": "nixos-hardware",
428
428
-
"rev": "1fe3cc2bc5d2dc9c81cb4e63d2f67c1543340df1",
151
151
+
"rev": "72081c9fbbef63765ae82bff9727ea79cc86bd5b",
429
152
"type": "github"
430
153
},
431
154
"original": {
···
437
160
},
438
161
"nixpkgs": {
439
162
"locked": {
440
440
-
"lastModified": 1744098102,
441
441
-
"narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=",
442
442
-
"owner": "NixOS",
443
443
-
"repo": "nixpkgs",
444
444
-
"rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7",
445
445
-
"type": "github"
446
446
-
},
447
447
-
"original": {
448
448
-
"owner": "NixOS",
449
449
-
"ref": "nixos-unstable",
450
450
-
"repo": "nixpkgs",
451
451
-
"type": "github"
452
452
-
}
453
453
-
},
454
454
-
"nixpkgs_2": {
455
455
-
"locked": {
456
456
-
"lastModified": 1744463964,
457
457
-
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
163
163
+
"lastModified": 1745930157,
164
164
+
"narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=",
458
165
"owner": "NixOS",
459
166
"repo": "nixpkgs",
460
460
-
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
167
167
+
"rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae",
461
168
"type": "github"
462
169
},
463
170
"original": {
···
467
174
"type": "github"
468
175
}
469
176
},
470
470
-
"nixpkgs_3": {
471
471
-
"locked": {
472
472
-
"lastModified": 1735554305,
473
473
-
"narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
474
474
-
"owner": "nixos",
475
475
-
"repo": "nixpkgs",
476
476
-
"rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd",
477
477
-
"type": "github"
478
478
-
},
479
479
-
"original": {
480
480
-
"owner": "nixos",
481
481
-
"ref": "nixpkgs-unstable",
482
482
-
"repo": "nixpkgs",
483
483
-
"type": "github"
484
484
-
}
485
485
-
},
486
486
-
"plasma-manager": {
487
487
-
"inputs": {
488
488
-
"home-manager": [
489
489
-
"home-manager"
490
490
-
],
491
491
-
"nixpkgs": [
492
492
-
"nixpkgs"
493
493
-
]
494
494
-
},
495
495
-
"locked": {
496
496
-
"lastModified": 1742765550,
497
497
-
"narHash": "sha256-2vVIh2JrL6GAGfgCeY9e6iNKrBjs0Hw3bGQEAbwVs68=",
498
498
-
"owner": "nix-community",
499
499
-
"repo": "plasma-manager",
500
500
-
"rev": "b70be387276e632fe51232887f9e04e2b6ef8c16",
501
501
-
"type": "github"
502
502
-
},
503
503
-
"original": {
504
504
-
"owner": "nix-community",
505
505
-
"repo": "plasma-manager",
506
506
-
"type": "github"
507
507
-
}
508
508
-
},
509
509
-
"pre-commit-hooks-nix": {
510
510
-
"inputs": {
511
511
-
"flake-compat": [
512
512
-
"lanzaboote",
513
513
-
"flake-compat"
514
514
-
],
515
515
-
"gitignore": "gitignore",
516
516
-
"nixpkgs": [
517
517
-
"lanzaboote",
518
518
-
"nixpkgs"
519
519
-
]
520
520
-
},
521
521
-
"locked": {
522
522
-
"lastModified": 1740915799,
523
523
-
"narHash": "sha256-JvQvtaphZNmeeV+IpHgNdiNePsIpHD5U/7QN5AeY44A=",
524
524
-
"owner": "cachix",
525
525
-
"repo": "pre-commit-hooks.nix",
526
526
-
"rev": "42b1ba089d2034d910566bf6b40830af6b8ec732",
527
527
-
"type": "github"
528
528
-
},
529
529
-
"original": {
530
530
-
"owner": "cachix",
531
531
-
"repo": "pre-commit-hooks.nix",
532
532
-
"type": "github"
533
533
-
}
534
534
-
},
535
177
"root": {
536
178
"inputs": {
537
537
-
"blender-bin": "blender-bin",
538
538
-
"catppuccin": "catppuccin",
539
539
-
"ctp-discord-compiled": "ctp-discord-compiled",
540
540
-
"ctp-vscode-compiled": "ctp-vscode-compiled",
541
541
-
"fenix": "fenix",
542
542
-
"firefox-addons": "firefox-addons",
543
179
"flake-parts": "flake-parts",
544
544
-
"flake-utils": "flake-utils",
545
180
"ghostty": "ghostty",
546
181
"hjem": "hjem",
547
182
"hjem-rum": "hjem-rum",
548
548
-
"home-manager": "home-manager",
549
549
-
"krunner-nix": "krunner-nix",
550
550
-
"lanzaboote": "lanzaboote",
551
551
-
"nix-darwin": "nix-darwin",
552
183
"nix-index-database": "nix-index-database",
553
184
"nixos-hardware": "nixos-hardware",
554
554
-
"nixpkgs": "nixpkgs_2",
555
555
-
"plasma-manager": "plasma-manager",
556
556
-
"treefmt-nix": "treefmt-nix"
557
557
-
}
558
558
-
},
559
559
-
"rust-analyzer-src": {
560
560
-
"flake": false,
561
561
-
"locked": {
562
562
-
"lastModified": 1742296961,
563
563
-
"narHash": "sha256-gCpvEQOrugHWLimD1wTFOJHagnSEP6VYBDspq96Idu0=",
564
564
-
"owner": "rust-lang",
565
565
-
"repo": "rust-analyzer",
566
566
-
"rev": "15d87419f1a123d8f888d608129c3ce3ff8f13d4",
567
567
-
"type": "github"
568
568
-
},
569
569
-
"original": {
570
570
-
"owner": "rust-lang",
571
571
-
"ref": "nightly",
572
572
-
"repo": "rust-analyzer",
573
573
-
"type": "github"
574
574
-
}
575
575
-
},
576
576
-
"rust-overlay": {
577
577
-
"inputs": {
578
578
-
"nixpkgs": [
579
579
-
"lanzaboote",
580
580
-
"nixpkgs"
581
581
-
]
582
582
-
},
583
583
-
"locked": {
584
584
-
"lastModified": 1741228283,
585
585
-
"narHash": "sha256-VzqI+k/eoijLQ5am6rDFDAtFAbw8nltXfLBC6SIEJAE=",
586
586
-
"owner": "oxalica",
587
587
-
"repo": "rust-overlay",
588
588
-
"rev": "38e9826bc4296c9daf18bc1e6aa299f3e932a403",
589
589
-
"type": "github"
590
590
-
},
591
591
-
"original": {
592
592
-
"owner": "oxalica",
593
593
-
"repo": "rust-overlay",
594
594
-
"type": "github"
185
185
+
"nixpkgs": "nixpkgs"
595
186
}
596
187
},
597
188
"systems": {
···
606
197
"original": {
607
198
"owner": "nix-systems",
608
199
"repo": "default",
609
609
-
"type": "github"
610
610
-
}
611
611
-
},
612
612
-
"systems_2": {
613
613
-
"locked": {
614
614
-
"lastModified": 1681028828,
615
615
-
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
616
616
-
"owner": "nix-systems",
617
617
-
"repo": "default",
618
618
-
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
619
619
-
"type": "github"
620
620
-
},
621
621
-
"original": {
622
622
-
"owner": "nix-systems",
623
623
-
"repo": "default",
624
624
-
"type": "github"
625
625
-
}
626
626
-
},
627
627
-
"treefmt-nix": {
628
628
-
"inputs": {
629
629
-
"nixpkgs": "nixpkgs_3"
630
630
-
},
631
631
-
"locked": {
632
632
-
"lastModified": 1743748085,
633
633
-
"narHash": "sha256-uhjnlaVTWo5iD3LXics1rp9gaKgDRQj6660+gbUU3cE=",
634
634
-
"owner": "numtide",
635
635
-
"repo": "treefmt-nix",
636
636
-
"rev": "815e4121d6a5d504c0f96e5be2dd7f871e4fd99d",
637
637
-
"type": "github"
638
638
-
},
639
639
-
"original": {
640
640
-
"owner": "numtide",
641
641
-
"repo": "treefmt-nix",
642
200
"type": "github"
643
201
}
644
202
},
+51
-85
flake.nix
···
6
6
7
7
# NOTE: please keep this in alphabetical order.
8
8
9
9
-
blender-bin = {
10
10
-
url = "blender-bin";
11
11
-
inputs.nixpkgs.follows = "nixpkgs";
12
12
-
};
13
13
-
14
14
-
catppuccin.url = "github:catppuccin/nix";
15
15
-
16
16
-
ctp-discord-compiled = {
17
17
-
url = "github:catppuccin/discord/gh-pages";
18
18
-
flake = false;
19
19
-
};
20
20
-
21
21
-
ctp-vscode-compiled = {
22
22
-
url = "github:catppuccin/vscode/catppuccin-vsc-v3.14.0";
23
23
-
flake = false;
24
24
-
};
25
25
-
26
26
-
fenix = {
27
27
-
url = "github:nix-community/fenix/monthly";
28
28
-
inputs.nixpkgs.follows = "nixpkgs";
29
29
-
};
9
9
+
# ctp-discord-compiled = {
10
10
+
# url = "github:catppuccin/discord/gh-pages";
11
11
+
# flake = false;
12
12
+
# };
30
13
31
31
-
firefox-addons = {
32
32
-
url = "sourcehut:~rycee/nur-expressions?dir=pkgs/firefox-addons";
33
33
-
inputs = {
34
34
-
nixpkgs.follows = "nixpkgs";
35
35
-
flake-utils.follows = "flake-utils";
36
36
-
};
37
37
-
};
14
14
+
# ctp-vscode-compiled = {
15
15
+
# url = "github:catppuccin/vscode/catppuccin-vsc-v3.14.0";
16
16
+
# flake = false;
17
17
+
# };
38
18
39
19
flake-parts = {
40
20
url = "github:hercules-ci/flake-parts";
41
21
inputs.nixpkgs-lib.follows = "nixpkgs";
42
22
};
43
43
-
44
44
-
# Only for input deduplication
45
45
-
flake-utils.url = "github:numtide/flake-utils";
46
23
47
24
ghostty = {
48
25
url = "github:pluiedev/ghostty/edge";
···
53
30
};
54
31
55
32
hjem = {
56
56
-
url = "github:feel-co/hjem";
57
57
-
inputs.nixpkgs.follows = "nixpkgs";
33
33
+
url = "github:feel-co/hjem";
34
34
+
inputs.nixpkgs.follows = "nixpkgs";
58
35
};
59
36
60
37
hjem-rum = {
61
61
-
url = "github:snugnug/hjem-rum";
62
62
-
inputs.nixpkgs.follows = "nixpkgs";
63
63
-
};
64
64
-
65
65
-
krunner-nix = {
66
66
-
url = "github:pluiedev/krunner-nix";
38
38
+
url = "github:snugnug/hjem-rum";
67
39
inputs.nixpkgs.follows = "nixpkgs";
68
40
};
69
41
70
70
-
lanzaboote = {
71
71
-
url = "github:nix-community/lanzaboote";
72
72
-
inputs = {
73
73
-
flake-parts.follows = "flake-parts";
74
74
-
nixpkgs.follows = "nixpkgs";
75
75
-
};
76
76
-
};
77
77
-
78
78
-
home-manager = {
79
79
-
url = "github:nix-community/home-manager";
80
80
-
inputs.nixpkgs.follows = "nixpkgs";
81
81
-
};
42
42
+
# lanzaboote = {
43
43
+
# url = "github:nix-community/lanzaboote";
44
44
+
# inputs = {
45
45
+
# flake-parts.follows = "flake-parts";
46
46
+
# nixpkgs.follows = "nixpkgs";
47
47
+
# };
48
48
+
# };
82
49
83
83
-
nix-darwin = {
84
84
-
url = "github:LnL7/nix-darwin";
85
85
-
inputs.nixpkgs.follows = "nixpkgs";
86
86
-
};
50
50
+
# home-manager = {
51
51
+
# url = "github:nix-community/home-manager";
52
52
+
# inputs.nixpkgs.follows = "nixpkgs";
53
53
+
# };
87
54
88
55
nix-index-database = {
89
56
url = "github:nix-community/nix-index-database";
···
92
59
93
60
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
94
61
95
95
-
plasma-manager = {
96
96
-
url = "github:nix-community/plasma-manager";
97
97
-
inputs = {
98
98
-
home-manager.follows = "home-manager";
99
99
-
nixpkgs.follows = "nixpkgs";
100
100
-
};
101
101
-
};
102
102
-
103
103
-
treefmt-nix.url = "github:numtide/treefmt-nix";
62
62
+
# plasma-manager = {
63
63
+
# url = "github:nix-community/plasma-manager";
64
64
+
# inputs = {
65
65
+
# home-manager.follows = "home-manager";
66
66
+
# nixpkgs.follows = "nixpkgs";
67
67
+
# };
68
68
+
# };
104
69
};
105
70
106
71
outputs =
107
72
inputs:
108
73
let
74
74
+
inherit (inputs.nixpkgs) lib;
109
75
packages' =
110
76
pkgs':
111
77
pkgs'.lib.packagesFromDirectoryRecursive {
···
114
80
};
115
81
in
116
82
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
117
117
-
imports = [
118
118
-
./hm-modules
119
119
-
./systems
120
120
-
];
121
121
-
systems = [
122
122
-
"x86_64-linux"
123
123
-
"x86_64-darwin"
124
124
-
];
83
83
+
imports = [ ./systems ];
125
84
126
126
-
flake.overlays.default = _: packages';
85
85
+
systems = lib.systems.flakeExposed;
86
86
+
87
87
+
flake = {
88
88
+
overlays.default = _: packages';
89
89
+
hjemModules = {
90
90
+
hjem-ext.imports = lib.fileset.toList (
91
91
+
lib.fileset.fileFilter (file: file.hasExt "nix") ./modules/hjem-ext
92
92
+
);
93
93
+
hjem-ctp.imports = lib.fileset.toList (
94
94
+
lib.fileset.fileFilter (file: file.hasExt "nix") ./modules/hjem-ctp
95
95
+
);
96
96
+
};
97
97
+
};
127
98
128
99
perSystem =
129
100
{ pkgs, ... }:
130
101
{
131
102
packages = packages' pkgs;
132
132
-
};
133
103
134
134
-
# perSystem =
135
135
-
# { pkgs, ... }:
136
136
-
# let
137
137
-
# treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
138
138
-
# formatter = treefmt.config.build.wrapper;
139
139
-
# in
140
140
-
# {
141
141
-
# inherit formatter;
142
142
-
# devShells.default = pkgs.mkShell { packages = [ formatter ]; };
143
143
-
# checks.formatting = treefmt.config.build.check inputs.self;
144
144
-
# };
104
104
+
devShells.default = pkgs.mkShell {
105
105
+
packages = with pkgs; [
106
106
+
nil
107
107
+
nixfmt-rfc-style
108
108
+
];
109
109
+
};
110
110
+
};
145
111
};
146
112
}
-19
hm-modules/ctp-plus/default.nix
···
1
1
-
{ inputs, ... }:
2
2
-
{
3
3
-
config,
4
4
-
lib,
5
5
-
pkgs,
6
6
-
...
7
7
-
}@args:
8
8
-
let
9
9
-
args' = args // {
10
10
-
inherit inputs;
11
11
-
ctpLib = import "${inputs.catppuccin}/modules/lib" { inherit config lib pkgs; };
12
12
-
};
13
13
-
in
14
14
-
{
15
15
-
imports = map (p: import p args') [
16
16
-
./plasma.nix
17
17
-
./vencord.nix
18
18
-
];
19
19
-
}
hm-modules/ctp-plus/plasma.nix
modules/hjem-ctp/plasma.nix
hm-modules/ctp-plus/vencord.nix
modules/hjem-ctp/vencord.nix
-10
hm-modules/default.nix
···
1
1
-
{ flake-parts-lib, moduleWithSystem, inputs, ... }:
2
2
-
let
3
3
-
inherit (flake-parts-lib) importApply;
4
4
-
in
5
5
-
{
6
6
-
flake.hmModules = {
7
7
-
ctp-plus = importApply ./ctp-plus { inherit inputs; };
8
8
-
hm-plus = moduleWithSystem (import ./hm-plus);
9
9
-
};
10
10
-
}
hm-modules/hm-plus/README.md
modules/hjem-ext/README.md
-6
hm-modules/hm-plus/default.nix
···
1
1
-
{ inputs' }: {
2
2
-
imports = [
3
3
-
./programs
4
4
-
];
5
5
-
_module.args = { inherit inputs'; };
6
6
-
}
-48
hm-modules/hm-plus/programs/1password.nix
···
1
1
-
{
2
2
-
lib,
3
3
-
pkgs,
4
4
-
config,
5
5
-
...
6
6
-
}:
7
7
-
let
8
8
-
inherit (lib)
9
9
-
mkDefault
10
10
-
mkIf
11
11
-
mkEnableOption
12
12
-
mkPackageOption
13
13
-
optional
14
14
-
getExe'
15
15
-
;
16
16
-
17
17
-
cfg = config.programs._1password;
18
18
-
in
19
19
-
{
20
20
-
options.programs._1password = {
21
21
-
enable = mkEnableOption "1Password";
22
22
-
23
23
-
package = mkPackageOption pkgs "1Password" { default = [ "_1password-gui" ]; };
24
24
-
25
25
-
autostart = mkEnableOption "autostarting 1Password";
26
26
-
27
27
-
enableSshAgent = mkEnableOption "1Password's SSH agent";
28
28
-
};
29
29
-
config = mkIf cfg.enable {
30
30
-
home.packages =
31
31
-
[ cfg.package ]
32
32
-
++ optional cfg.autostart (
33
33
-
pkgs.makeAutostartItem {
34
34
-
name = "1password";
35
35
-
inherit (cfg) package;
36
36
-
}
37
37
-
);
38
38
-
39
39
-
programs = mkIf cfg.enableSshAgent {
40
40
-
git.signer = getExe' cfg.package "op-ssh-sign";
41
41
-
ssh.enable = mkDefault true;
42
42
-
ssh.extraConfig = "IdentityAgent ${config.home.homeDirectory}/.1password/agent.sock";
43
43
-
};
44
44
-
45
45
-
# Some tools like Jujutsu don't care about ~/.ssh/config, so we have to set this manually
46
46
-
home.sessionVariables.SSH_AUTH_SOCK = mkIf cfg.enableSshAgent "${config.home.homeDirectory}/.1password/agent.sock";
47
47
-
};
48
48
-
}
-10
hm-modules/hm-plus/programs/default.nix
···
1
1
-
{
2
2
-
imports = [
3
3
-
./1password.nix
4
4
-
./discord.nix
5
5
-
./fcitx5
6
6
-
./git.nix
7
7
-
./moar.nix
8
8
-
./vesktop.nix
9
9
-
];
10
10
-
}
-73
hm-modules/hm-plus/programs/discord.nix
···
1
1
-
{
2
2
-
config,
3
3
-
lib,
4
4
-
pkgs,
5
5
-
...
6
6
-
}:
7
7
-
let
8
8
-
inherit (lib)
9
9
-
mkEnableOption
10
10
-
mkPackageOption
11
11
-
mkOption
12
12
-
mkIf
13
13
-
optionalAttrs
14
14
-
types
15
15
-
;
16
16
-
cfg = config.programs.discord;
17
17
-
format = pkgs.formats.json { };
18
18
-
in
19
19
-
{
20
20
-
options.programs.discord = {
21
21
-
enable = mkEnableOption "Discord";
22
22
-
23
23
-
package = mkPackageOption pkgs "Discord" { default = [ "discord" ]; };
24
24
-
25
25
-
settings = mkOption {
26
26
-
inherit (format) type;
27
27
-
description = ''
28
28
-
Configuration written to {file}`$XDG_CONFIG_HOME/discord/settings.json`.
29
29
-
'';
30
30
-
default = { };
31
31
-
};
32
32
-
33
33
-
openAsar.enable = mkEnableOption "OpenASAR";
34
34
-
35
35
-
vencord = {
36
36
-
enable = mkEnableOption "Vencord";
37
37
-
38
38
-
settings = mkOption {
39
39
-
inherit (format) type;
40
40
-
description = ''
41
41
-
Configuration written to {file}`$XDG_CONFIG_HOME/Vencord/settings/settings.json`.
42
42
-
'';
43
43
-
default = { };
44
44
-
};
45
45
-
46
46
-
css = mkOption {
47
47
-
type = types.lines;
48
48
-
description = ''
49
49
-
Style sheet written to {file}`$XDG_CONFIG_HOME/Vencord/settings/quickCss.css`.
50
50
-
'';
51
51
-
default = "";
52
52
-
};
53
53
-
};
54
54
-
};
55
55
-
56
56
-
config = mkIf cfg.enable {
57
57
-
home.packages = [
58
58
-
(cfg.package.override {
59
59
-
withOpenASAR = cfg.openAsar.enable;
60
60
-
withVencord = cfg.vencord.enable;
61
61
-
})
62
62
-
];
63
63
-
64
64
-
xdg.configFile =
65
65
-
{
66
66
-
"discord/settings.json".source = format.generate "discord-settings.json" cfg.settings;
67
67
-
}
68
68
-
// optionalAttrs cfg.vencord.enable {
69
69
-
"Vencord/settings/settings.json".source = format.generate "vencord-settings.json" cfg.vencord.settings;
70
70
-
"Vencord/settings/quickCss.css".text = cfg.vencord.css;
71
71
-
};
72
72
-
};
73
73
-
}
-137
hm-modules/hm-plus/programs/fcitx5/default.nix
···
1
1
-
{
2
2
-
config,
3
3
-
osConfig,
4
4
-
lib,
5
5
-
pkgs,
6
6
-
...
7
7
-
}:
8
8
-
let
9
9
-
inherit (lib)
10
10
-
mkMerge
11
11
-
mkIf
12
12
-
mkOption
13
13
-
types
14
14
-
literalExpression
15
15
-
;
16
16
-
im = config.i18n.inputMethod;
17
17
-
cfg = im.fcitx5;
18
18
-
19
19
-
fcitx5Package =
20
20
-
if cfg.plasma6Support then
21
21
-
pkgs.qt6Packages.fcitx5-with-addons.override { inherit (cfg) addons; }
22
22
-
else
23
23
-
pkgs.libsForQt5.fcitx5-with-addons;
24
24
-
25
25
-
fcitx5Package' = fcitx5Package.override { inherit (cfg) addons; };
26
26
-
27
27
-
format = pkgs.formats.ini { };
28
28
-
formatWithGlobalSection = pkgs.formats.iniWithGlobalSection { };
29
29
-
in
30
30
-
{
31
31
-
imports = [ ./rime.nix ];
32
32
-
33
33
-
options.i18n.inputMethod.fcitx5 = {
34
34
-
plasma6Support = mkOption {
35
35
-
type = types.bool;
36
36
-
default = osConfig.services.desktopManager.plasma6.enable;
37
37
-
defaultText = literalExpression "config.services.desktopManager.plasma6.enable";
38
38
-
description = ''
39
39
-
Use qt6 versions of fcitx5 packages.
40
40
-
Required for configuring fcitx5 in KDE System Settings.
41
41
-
'';
42
42
-
};
43
43
-
quickPhrase = mkOption {
44
44
-
type = with types; attrsOf str;
45
45
-
default = { };
46
46
-
example = literalExpression ''
47
47
-
{
48
48
-
smile = "(・∀・)";
49
49
-
angry = "( ̄ー ̄)";
50
50
-
}
51
51
-
'';
52
52
-
description = "Quick phrases.";
53
53
-
};
54
54
-
quickPhraseFiles = mkOption {
55
55
-
type = with types; attrsOf path;
56
56
-
default = { };
57
57
-
example = literalExpression ''
58
58
-
{
59
59
-
words = ./words.mb;
60
60
-
numbers = ./numbers.mb;
61
61
-
}
62
62
-
'';
63
63
-
description = "Quick phrase files.";
64
64
-
};
65
65
-
settings = {
66
66
-
globalOptions = mkOption {
67
67
-
type = types.submodule { freeformType = format.type; };
68
68
-
default = { };
69
69
-
description = ''
70
70
-
The global options in `config` file in ini format.
71
71
-
'';
72
72
-
};
73
73
-
inputMethod = mkOption {
74
74
-
type = types.submodule { freeformType = format.type; };
75
75
-
default = { };
76
76
-
description = ''
77
77
-
The input method configure in `profile` file in ini format.
78
78
-
'';
79
79
-
};
80
80
-
addons = mkOption {
81
81
-
type = with types; (attrsOf anything);
82
82
-
default = { };
83
83
-
description = ''
84
84
-
The addon configures in `conf` folder in ini format with global sections.
85
85
-
Each item is written to the corresponding file.
86
86
-
'';
87
87
-
example = literalExpression "{ pinyin.globalSection.EmojiEnabled = \"True\"; }";
88
88
-
};
89
89
-
};
90
90
-
ignoreUserConfig = lib.mkOption {
91
91
-
type = lib.types.bool;
92
92
-
default = false;
93
93
-
description = ''
94
94
-
Ignore the user configures. **Warning**: When this is enabled, the
95
95
-
user config files are totally ignored and the user dict can't be saved
96
96
-
and loaded.
97
97
-
'';
98
98
-
};
99
99
-
};
100
100
-
101
101
-
config = mkIf (im.enabled == "fcitx5") {
102
102
-
# override HM defaults
103
103
-
i18n.inputMethod.package = lib.mkForce fcitx5Package';
104
104
-
105
105
-
i18n.inputMethod.fcitx5.addons =
106
106
-
lib.optionals (cfg.quickPhrase != { }) [
107
107
-
(pkgs.writeTextDir "share/fcitx5/data/QuickPhrase.mb" (
108
108
-
lib.concatStringsSep "\n" (lib.mapAttrsToList (name: value: "${name} ${value}") cfg.quickPhrase)
109
109
-
))
110
110
-
]
111
111
-
++ lib.optionals (cfg.quickPhraseFiles != { }) [
112
112
-
(pkgs.linkFarm "quickPhraseFiles" (
113
113
-
lib.mapAttrs' (
114
114
-
name: value: lib.nameValuePair "share/fcitx5/data/quickphrase.d/${name}.mb" value
115
115
-
) cfg.quickPhraseFiles
116
116
-
))
117
117
-
];
118
118
-
119
119
-
xdg.configFile =
120
120
-
let
121
121
-
optionalFile =
122
122
-
p: f: v:
123
123
-
lib.optionalAttrs (v != { }) { "fcitx5/${p}".source = f p v; };
124
124
-
in
125
125
-
lib.attrsets.mergeAttrsList [
126
126
-
(optionalFile "config" format cfg.settings.globalOptions)
127
127
-
(optionalFile "profile" format cfg.settings.inputMethod)
128
128
-
(lib.concatMapAttrs (
129
129
-
name: value: optionalFile "conf/${name}.conf" formatWithGlobalSection value
130
130
-
) cfg.settings.addons)
131
131
-
];
132
132
-
133
133
-
home.sessionVariables = mkMerge [
134
134
-
(mkIf cfg.ignoreUserConfig { SKIP_FCITX_USER_PATH = "1"; })
135
135
-
];
136
136
-
};
137
137
-
}
-46
hm-modules/hm-plus/programs/fcitx5/rime.nix
···
1
1
-
{
2
2
-
config,
3
3
-
lib,
4
4
-
pkgs,
5
5
-
...
6
6
-
}:
7
7
-
let
8
8
-
inherit (lib)
9
9
-
mkIf
10
10
-
mkEnableOption
11
11
-
mkOption
12
12
-
mapAttrs'
13
13
-
nameValuePair
14
14
-
types
15
15
-
;
16
16
-
cfg = config.i18n.inputMethod.fcitx5.rime;
17
17
-
format = pkgs.formats.yaml { };
18
18
-
in
19
19
-
{
20
20
-
options.i18n.inputMethod.fcitx5.rime = {
21
21
-
enable = mkEnableOption "the Rime input engine for Fcitx5";
22
22
-
23
23
-
dataPkgs = mkOption {
24
24
-
type = types.listOf types.package;
25
25
-
default = [ pkgs.rime-data ];
26
26
-
};
27
27
-
28
28
-
settings = mkOption {
29
29
-
inherit (format) type;
30
30
-
default = { };
31
31
-
example = {
32
32
-
default.patch.schema_list = [
33
33
-
{ schema = "luna_pinyin_simp"; }
34
34
-
{ schema = "luna_pinyin"; }
35
35
-
];
36
36
-
};
37
37
-
};
38
38
-
};
39
39
-
40
40
-
config = mkIf cfg.enable {
41
41
-
i18n.inputMethod.fcitx5.addons = [ (pkgs.fcitx5-rime.override { rimeDataPkgs = cfg.dataPkgs; }) ];
42
42
-
xdg.dataFile = mapAttrs' (
43
43
-
n: v: nameValuePair "fcitx5/rime/${n}.custom.yaml" { source = format.generate n v; }
44
44
-
) cfg.settings;
45
45
-
};
46
46
-
}
-45
hm-modules/hm-plus/programs/git.nix
···
1
1
-
{
2
2
-
lib,
3
3
-
pkgs,
4
4
-
config,
5
5
-
...
6
6
-
}:
7
7
-
let
8
8
-
inherit (lib)
9
9
-
getExe
10
10
-
getExe'
11
11
-
mkIf
12
12
-
mkOption
13
13
-
types
14
14
-
;
15
15
-
cfg = config.programs.git;
16
16
-
in
17
17
-
{
18
18
-
options.programs.git = {
19
19
-
signingFormat = mkOption {
20
20
-
type = types.enum [
21
21
-
"openpgp"
22
22
-
"ssh"
23
23
-
"x509"
24
24
-
];
25
25
-
default = "openpgp";
26
26
-
};
27
27
-
28
28
-
signer = mkOption {
29
29
-
type = types.path;
30
30
-
default =
31
31
-
{
32
32
-
openpgp = getExe' pkgs.gnupg "gpg2";
33
33
-
ssh = getExe pkgs.openssh;
34
34
-
x509 = getExe' pkgs.gnupg "gpgsm";
35
35
-
}
36
36
-
.${cfg.signingFormat};
37
37
-
};
38
38
-
};
39
39
-
config = mkIf cfg.enable {
40
40
-
programs.git.extraConfig.gpg = {
41
41
-
format = cfg.signingFormat;
42
42
-
${cfg.signingFormat}.program = cfg.signer;
43
43
-
};
44
44
-
};
45
45
-
}
+5
-4
hm-modules/hm-plus/programs/moar.nix
modules/hjem-ext/programs/moar.nix
···
5
5
...
6
6
}:
7
7
let
8
8
-
cfg = config.programs.moar;
8
8
+
cfg = config.ext.programs.moar;
9
9
10
10
toFlag = k: v: if lib.isBool v then
11
11
lib.optionalString (v) "-${k}"
···
16
16
17
17
in
18
18
{
19
19
-
options.programs.moar = {
19
19
+
options.ext.programs.moar = {
20
20
enable = lib.mkEnableOption "Moar";
21
21
22
22
package = lib.mkPackageOption pkgs "moar" {};
···
32
32
};
33
33
};
34
34
35
35
-
config = lib.mkIf (cfg.enable) {
36
36
-
home.sessionVariables = {
35
35
+
config = lib.mkIf cfg.enable {
36
36
+
packages = [ cfg.package ];
37
37
+
environment.sessionVariables = {
37
38
PAGER = "moar";
38
39
MOAR = lib.concatStringsSep " " (lib.mapAttrsToList toFlag cfg.settings);
39
40
};
+17
-9
hm-modules/hm-plus/programs/vesktop.nix
modules/hjem-ext/programs/vesktop.nix
···
13
13
types
14
14
optionalAttrs
15
15
;
16
16
-
cfg = config.programs.vesktop;
16
16
+
cfg = config.ext.programs.vesktop;
17
17
format = pkgs.formats.json { };
18
18
in
19
19
{
20
20
-
options.programs.vesktop = {
20
20
+
options.ext.programs.vesktop = {
21
21
enable = mkEnableOption "Vesktop";
22
22
23
23
package = mkPackageOption pkgs "Vesktop" { default = [ "vesktop" ]; };
···
58
58
};
59
59
60
60
config = mkIf cfg.enable {
61
61
-
home.packages = [ (cfg.package.override { withSystemVencord = cfg.vencord.useSystemPackage; }) ];
61
61
+
packages = [
62
62
+
(cfg.package.override {
63
63
+
withSystemVencord = cfg.vencord.useSystemPackage;
64
64
+
})
65
65
+
];
62
66
63
63
-
xdg.configFile = {
64
64
-
"vesktop/settings.json".source = format.generate "vesktop-settings.json" cfg.settings;
65
65
-
} // optionalAttrs cfg.vencord.enable {
66
66
-
"vesktop/settings/settings.json".source = format.generate "vencord-settings.json" cfg.vencord.settings;
67
67
-
"vesktop/settings/quickCss.css".text = cfg.vencord.css;
68
68
-
};
67
67
+
files =
68
68
+
{
69
69
+
".config/vesktop/settings.json".source = format.generate "vesktop-settings.json" cfg.settings;
70
70
+
}
71
71
+
// optionalAttrs cfg.vencord.enable {
72
72
+
".config/vesktop/settings/settings.json".source =
73
73
+
format.generate "vencord-settings.json" cfg.vencord.settings;
74
74
+
75
75
+
".config/vesktop/settings/quickCss.css".text = cfg.vencord.css;
76
76
+
};
69
77
};
70
78
}
+31
modules/hjem-ext/programs/direnv.nix
···
1
1
+
{
2
2
+
config,
3
3
+
pkgs,
4
4
+
lib,
5
5
+
...
6
6
+
}:
7
7
+
let
8
8
+
cfg = config.ext.programs.direnv;
9
9
+
in
10
10
+
{
11
11
+
options.ext.programs.direnv = {
12
12
+
enable = lib.mkEnableOption "direnv";
13
13
+
package = lib.mkPackageOption pkgs "direnv" { };
14
14
+
15
15
+
nix-direnv = {
16
16
+
enable = lib.mkEnableOption "nix-direnv";
17
17
+
package = lib.mkPackageOption pkgs "nix-direnv" { };
18
18
+
};
19
19
+
};
20
20
+
21
21
+
config = lib.mkIf cfg.enable {
22
22
+
packages = [ cfg.package ];
23
23
+
24
24
+
rum.programs.fish.earlyConfigFiles.direnv = ''
25
25
+
${lib.getExe cfg.package} hook fish | source
26
26
+
'';
27
27
+
28
28
+
files.".config/direnv/lib/hm-nix-direnv.sh".source =
29
29
+
lib.mkIf cfg.nix-direnv.enable "${cfg.nix-direnv.package}/share/nix-direnv/direnvrc";
30
30
+
};
31
31
+
}
+29
modules/hjem-ext/programs/git.nix
···
1
1
+
{
2
2
+
config,
3
3
+
pkgs,
4
4
+
lib,
5
5
+
...
6
6
+
}:
7
7
+
let
8
8
+
cfg = config.ext.programs.git;
9
9
+
format = pkgs.formats.gitIni { };
10
10
+
in
11
11
+
{
12
12
+
options.ext.programs.git = {
13
13
+
enable = lib.mkEnableOption "Git";
14
14
+
package = lib.mkPackageOption pkgs "git" { };
15
15
+
16
16
+
settings = lib.mkOption {
17
17
+
type = lib.types.submodule {
18
18
+
freeformType = format.type;
19
19
+
};
20
20
+
default = { };
21
21
+
};
22
22
+
};
23
23
+
24
24
+
config = lib.mkIf cfg.enable {
25
25
+
packages = [ cfg.package ];
26
26
+
files.".config/git/config".source = lib.mkIf (cfg.settings != { })
27
27
+
(format.generate "git-config" cfg.settings);
28
28
+
};
29
29
+
}
+44
modules/hjem-ext/programs/hyfetch.nix
···
1
1
+
{
2
2
+
config,
3
3
+
pkgs,
4
4
+
lib,
5
5
+
...
6
6
+
}:
7
7
+
let
8
8
+
cfg = config.ext.programs.hyfetch;
9
9
+
format = pkgs.formats.json { };
10
10
+
configFile = format.generate "hyfetch.json" cfg.settings;
11
11
+
in
12
12
+
{
13
13
+
options.ext.programs.hyfetch = {
14
14
+
enable = lib.mkEnableOption "Hyfetch";
15
15
+
package = lib.mkPackageOption pkgs "hyfetch" { };
16
16
+
17
17
+
settings = lib.mkOption {
18
18
+
type = lib.types.submodule {
19
19
+
freeformType = format.type;
20
20
+
21
21
+
options = {
22
22
+
backend = lib.mkOption {
23
23
+
type = lib.types.enum [
24
24
+
"neofetch"
25
25
+
"fastfetch"
26
26
+
"qwqfetch"
27
27
+
];
28
28
+
};
29
29
+
};
30
30
+
};
31
31
+
default = { };
32
32
+
};
33
33
+
};
34
34
+
35
35
+
config = lib.mkIf cfg.enable {
36
36
+
packages =
37
37
+
[ cfg.package ]
38
38
+
++ lib.optional (cfg.settings.backend == "fastfetch") pkgs.fastfetch
39
39
+
++ lib.optional (cfg.settings.backend == "neofetch") pkgs.neofetch;
40
40
+
# TODO: add qwqfetch when it's added to nixpkgs
41
41
+
42
42
+
files.".config/hyfetch.json".source = lib.mkIf (cfg.settings != { }) configFile;
43
43
+
};
44
44
+
}
+29
modules/hjem-ext/programs/jujutsu.nix
···
1
1
+
{
2
2
+
config,
3
3
+
pkgs,
4
4
+
lib,
5
5
+
...
6
6
+
}:
7
7
+
let
8
8
+
cfg = config.ext.programs.jujutsu;
9
9
+
format = pkgs.formats.toml { };
10
10
+
in
11
11
+
{
12
12
+
options.ext.programs.jujutsu = {
13
13
+
enable = lib.mkEnableOption "Jujutsu";
14
14
+
package = lib.mkPackageOption pkgs "jujutsu" { };
15
15
+
16
16
+
settings = lib.mkOption {
17
17
+
type = lib.types.submodule {
18
18
+
freeformType = format.type;
19
19
+
};
20
20
+
default = { };
21
21
+
};
22
22
+
};
23
23
+
24
24
+
config = lib.mkIf cfg.enable {
25
25
+
packages = [ cfg.package ];
26
26
+
files.".config/jj/config.toml".source = lib.mkIf (cfg.settings != { })
27
27
+
(format.generate "jj-config.toml" cfg.settings);
28
28
+
};
29
29
+
}
-19
packages/catppuccin-fcitx5/package.nix
···
1
1
-
{ stdenvNoCC, fetchFromGitHub }:
2
2
-
stdenvNoCC.mkDerivation {
3
3
-
pname = "catppuccin-fcitx5";
4
4
-
version = "2022-10-05";
5
5
-
6
6
-
src = fetchFromGitHub {
7
7
-
owner = "catppuccin";
8
8
-
repo = "fcitx5";
9
9
-
rev = "ce244cfdf43a648d984719fdfd1d60aab09f5c97";
10
10
-
hash = "sha256-uFaCbyrEjv4oiKUzLVFzw+UY54/h7wh2cntqeyYwGps=";
11
11
-
};
12
12
-
13
13
-
installPhase = ''
14
14
-
runHook preInstall
15
15
-
mkdir -p $out/share/fcitx5
16
16
-
cp -r src $out/share/fcitx5/themes
17
17
-
runHook postInstall
18
18
-
'';
19
19
-
}
+22
packages/catppuccin-fish/package.nix
···
1
1
+
{
2
2
+
stdenvNoCC,
3
3
+
fetchFromGitHub,
4
4
+
}:
5
5
+
stdenvNoCC.mkDerivation {
6
6
+
pname = "catppuccin-fish";
7
7
+
version = "0-unstable-2025-03-01";
8
8
+
9
9
+
src = fetchFromGitHub {
10
10
+
owner = "catppuccin";
11
11
+
repo = "fish";
12
12
+
rev = "6a85af2ff722ad0f9fbc8424ea0a5c454661dfed";
13
13
+
hash = "sha256-Oc0emnIUI4LV7QJLs4B2/FQtCFewRFVp7EDv8GawFsA=";
14
14
+
};
15
15
+
16
16
+
installPhase = ''
17
17
+
runHook preInstall
18
18
+
mkdir -p $out/share/fish
19
19
+
cp -r themes $out/share/fish/themes
20
20
+
runHook postInstall
21
21
+
'';
22
22
+
}
-9
roles/audio/default.nix
···
1
1
-
{ lib, ... }:
2
2
-
let
3
3
-
inherit (lib) mkEnableOption;
4
4
-
in
5
5
-
{
6
6
-
options.roles.audio.enable = mkEnableOption "audio support" // {
7
7
-
default = true;
8
8
-
};
9
9
-
}
-21
roles/audio/nixos.nix
···
1
1
-
{ config, lib, ... }:
2
2
-
let
3
3
-
cfg = config.roles.audio;
4
4
-
inherit (lib) mkIf;
5
5
-
in
6
6
-
{
7
7
-
config = mkIf cfg.enable {
8
8
-
services.pulseaudio.enable = false;
9
9
-
security.rtkit.enable = true;
10
10
-
11
11
-
roles.base.user.extraGroups = [ "rtkit" ];
12
12
-
13
13
-
services.pipewire = {
14
14
-
enable = true;
15
15
-
wireplumber.enable = true;
16
16
-
alsa.enable = true;
17
17
-
jack.enable = true;
18
18
-
pulse.enable = true;
19
19
-
};
20
20
-
};
21
21
-
}
-86
roles/base/default.nix
···
1
1
-
{ config, lib, ... }:
2
2
-
let
3
3
-
inherit (lib)
4
4
-
mkAliasOptionModule
5
5
-
mkEnableOption
6
6
-
mkOption
7
7
-
types
8
8
-
optional
9
9
-
;
10
10
-
11
11
-
cfg = config.roles.base;
12
12
-
in
13
13
-
{
14
14
-
options.roles.base = {
15
15
-
username = mkOption {
16
16
-
type = types.str;
17
17
-
example = "cavej";
18
18
-
description = "The primary user's internal user name.";
19
19
-
};
20
20
-
realName = mkOption {
21
21
-
type = types.nullOr types.str;
22
22
-
default = null;
23
23
-
example = "Cave";
24
24
-
description = "The primary user's real name.";
25
25
-
};
26
26
-
fullName = mkOption {
27
27
-
type = types.nullOr types.str;
28
28
-
default = null;
29
29
-
example = "Cave Johnson";
30
30
-
description = "The primary user's full name.";
31
31
-
};
32
32
-
publicKey = mkOption {
33
33
-
type = types.nullOr types.str;
34
34
-
default = null;
35
35
-
description = "The primary user's public key.";
36
36
-
};
37
37
-
38
38
-
canSudo = mkEnableOption "admin permissions for the primary user";
39
39
-
};
40
40
-
41
41
-
imports = [
42
42
-
(mkAliasOptionModule [ "hm" ] [
43
43
-
"home-manager"
44
44
-
"users"
45
45
-
cfg.username
46
46
-
])
47
47
-
(mkAliasOptionModule
48
48
-
[
49
49
-
"roles"
50
50
-
"base"
51
51
-
"user"
52
52
-
]
53
53
-
[
54
54
-
"users"
55
55
-
"users"
56
56
-
cfg.username
57
57
-
]
58
58
-
)
59
59
-
];
60
60
-
61
61
-
config = {
62
62
-
assertions = [
63
63
-
{
64
64
-
assertion = builtins.hasAttr "username" cfg;
65
65
-
message = "base role username has to be set";
66
66
-
}
67
67
-
];
68
68
-
69
69
-
nix.settings.trusted-users = optional cfg.canSudo cfg.username;
70
70
-
71
71
-
home-manager = {
72
72
-
backupFileExtension = "backup";
73
73
-
useGlobalPkgs = true;
74
74
-
useUserPackages = true;
75
75
-
};
76
76
-
77
77
-
hm = {
78
78
-
home = {
79
79
-
inherit (cfg) username;
80
80
-
homeDirectory = config.roles.base.user.home;
81
81
-
};
82
82
-
83
83
-
programs.home-manager.enable = true;
84
84
-
};
85
85
-
};
86
86
-
}
-18
roles/base/nixos.nix
···
1
1
-
{ config, lib, ... }:
2
2
-
let
3
3
-
inherit (lib.lists) optional;
4
4
-
5
5
-
cfg = config.roles.base;
6
6
-
in
7
7
-
{
8
8
-
config = {
9
9
-
roles.base.user = {
10
10
-
isNormalUser = true;
11
11
-
description = cfg.realName;
12
12
-
extraGroups = optional cfg.canSudo "wheel";
13
13
-
home = "/home/${cfg.username}";
14
14
-
};
15
15
-
16
16
-
hm.home.stateVersion = config.system.stateVersion;
17
17
-
};
18
18
-
}
-13
roles/boot/default.nix
···
1
1
-
{ lib, ... }:
2
2
-
let
3
3
-
inherit (lib) mkEnableOption;
4
4
-
in
5
5
-
{
6
6
-
imports = [ ./lanzaboote ];
7
7
-
8
8
-
options.roles.boot = {
9
9
-
enable = mkEnableOption "boot settings" // {
10
10
-
default = true;
11
11
-
};
12
12
-
};
13
13
-
}
-20
roles/boot/lanzaboote/default.nix
···
1
1
-
{
2
2
-
config,
3
3
-
lib,
4
4
-
inputs,
5
5
-
...
6
6
-
}:
7
7
-
{
8
8
-
imports = [ inputs.lanzaboote.nixosModules.lanzaboote ];
9
9
-
10
10
-
options.roles.boot.lanzaboote.enable = lib.mkEnableOption "Lanzaboote, a secure boot implementation for NixOS";
11
11
-
12
12
-
config = lib.mkIf config.roles.boot.lanzaboote.enable {
13
13
-
boot.lanzaboote = {
14
14
-
enable = true;
15
15
-
pkiBundle = "/etc/secureboot";
16
16
-
};
17
17
-
18
18
-
boot.loader.systemd-boot.enable = lib.mkForce false;
19
19
-
};
20
20
-
}
-17
roles/boot/nixos.nix
···
1
1
-
{ config, lib, ... }:
2
2
-
let
3
3
-
cfg = config.roles.boot;
4
4
-
in
5
5
-
{
6
6
-
config = lib.mkIf cfg.enable {
7
7
-
boot.loader = {
8
8
-
systemd-boot = {
9
9
-
enable = true;
10
10
-
editor = false;
11
11
-
consoleMode = "2";
12
12
-
configurationLimit = 10;
13
13
-
};
14
14
-
efi.canTouchEfiVariables = true;
15
15
-
};
16
16
-
};
17
17
-
}
-11
roles/darwin.nix
···
1
1
-
inputs@{ lib, ... }:
2
2
-
{
3
3
-
imports =
4
4
-
[ ./. ]
5
5
-
++ (lib.pipe (import ./. inputs).imports [
6
6
-
(map (s: /${s}/darwin.nix))
7
7
-
(builtins.filter builtins.pathExists)
8
8
-
]);
9
9
-
10
10
-
system.stateVersion = 4;
11
11
-
}
-8
roles/default.nix
···
1
1
-
{ lib, ... }:
2
2
-
{
3
3
-
imports = lib.pipe ./. [
4
4
-
builtins.readDir
5
5
-
(lib.filterAttrs (n: ty: ty == "directory" && builtins.pathExists ./${n}/default.nix))
6
6
-
(lib.mapAttrsToList (n: _: ./${n}))
7
7
-
];
8
8
-
}
-71
roles/email/default.nix
···
1
1
-
{ config, lib, ... }:
2
2
-
let
3
3
-
cfg = config.roles.email;
4
4
-
inherit (lib)
5
5
-
mkEnableOption
6
6
-
mkIf
7
7
-
mkOption
8
8
-
types
9
9
-
;
10
10
-
11
11
-
serverModule.options = {
12
12
-
host = mkOption {
13
13
-
type = types.str;
14
14
-
example = "imap.migadu.com";
15
15
-
};
16
16
-
port = mkOption {
17
17
-
type = types.port;
18
18
-
example = 143;
19
19
-
};
20
20
-
};
21
21
-
hostModule.options = {
22
22
-
imap = mkOption {
23
23
-
type = types.submodule serverModule;
24
24
-
example = {
25
25
-
host = "imap.migadu.com";
26
26
-
port = 993;
27
27
-
};
28
28
-
};
29
29
-
smtp = mkOption {
30
30
-
type = types.submodule serverModule;
31
31
-
example = {
32
32
-
host = "smtp.migadu.com";
33
33
-
port = 465;
34
34
-
};
35
35
-
};
36
36
-
};
37
37
-
emailModule.options = {
38
38
-
primary = mkOption {
39
39
-
type = types.bool;
40
40
-
default = false;
41
41
-
example = true;
42
42
-
};
43
43
-
realName = mkOption {
44
44
-
type = types.str;
45
45
-
example = "Leah";
46
46
-
};
47
47
-
host = mkOption { type = types.submodule hostModule; };
48
48
-
};
49
49
-
in
50
50
-
{
51
51
-
options.roles.email = {
52
52
-
enable = mkEnableOption "E-Mail configurations";
53
53
-
54
54
-
accounts = mkOption {
55
55
-
type = types.attrsOf (types.submodule emailModule);
56
56
-
default = { };
57
57
-
};
58
58
-
};
59
59
-
60
60
-
config.hm.accounts.email =
61
61
-
let
62
62
-
accounts = builtins.mapAttrs (address: account: rec {
63
63
-
inherit (account) primary realName;
64
64
-
inherit (account.host) imap smtp;
65
65
-
inherit address;
66
66
-
userName = address; # Use the address as the IMAP/SMTP username by default
67
67
-
thunderbird.enable = true;
68
68
-
}) cfg.accounts;
69
69
-
in
70
70
-
mkIf cfg.enable { inherit accounts; };
71
71
-
}
-7
roles/fish/default.nix
···
1
1
-
{ lib, ... }:
2
2
-
{
3
3
-
options.roles.fish = {
4
4
-
enable = lib.mkEnableOption "Fish shell";
5
5
-
defaultShell = lib.mkEnableOption "Fish shell as the user's default shell";
6
6
-
};
7
7
-
}
-18
roles/fish/nixos.nix
···
1
1
-
{
2
2
-
config,
3
3
-
lib,
4
4
-
pkgs,
5
5
-
...
6
6
-
}:
7
7
-
let
8
8
-
inherit (lib) mkIf;
9
9
-
cfg = config.roles.fish;
10
10
-
in
11
11
-
{
12
12
-
config = mkIf cfg.enable {
13
13
-
programs.fish.enable = true;
14
14
-
hm.programs.fish.enable = true;
15
15
-
16
16
-
roles.base.user.shell = mkIf cfg.defaultShell pkgs.fish;
17
17
-
};
18
18
-
}
-8
roles/fonts/darwin.nix
···
1
1
-
{ config, lib, ... }:
2
2
-
let
3
3
-
cfg = config.roles.fonts;
4
4
-
inherit (lib) mkIf;
5
5
-
in
6
6
-
{
7
7
-
config = mkIf cfg.enable { fonts.fonts = cfg.packages; };
8
8
-
}
-17
roles/fonts/default.nix
···
1
1
-
{ lib, ... }:
2
2
-
let
3
3
-
inherit (lib) mkEnableOption mkOption types;
4
4
-
in
5
5
-
{
6
6
-
options.roles.fonts = {
7
7
-
enable = mkEnableOption "default fonts";
8
8
-
packages = mkOption {
9
9
-
type = types.listOf types.package;
10
10
-
default = [ ];
11
11
-
};
12
12
-
defaults = mkOption {
13
13
-
type = types.attrsOf (types.listOf types.str);
14
14
-
default = { };
15
15
-
};
16
16
-
};
17
17
-
}
-18
roles/fonts/nixos.nix
···
1
1
-
{ config, lib, ... }:
2
2
-
let
3
3
-
cfg = config.roles.fonts;
4
4
-
inherit (lib) mkIf;
5
5
-
in
6
6
-
{
7
7
-
config = mkIf cfg.enable {
8
8
-
fonts = {
9
9
-
inherit (cfg) packages;
10
10
-
enableDefaultPackages = true;
11
11
-
12
12
-
fontconfig = {
13
13
-
enable = true;
14
14
-
defaultFonts = cfg.defaults;
15
15
-
};
16
16
-
};
17
17
-
};
18
18
-
}
-37
roles/mirrors/default.nix
···
1
1
-
{
2
2
-
config,
3
3
-
lib,
4
4
-
...
5
5
-
}:
6
6
-
let
7
7
-
inherit (lib)
8
8
-
mkEnableOption
9
9
-
mkIf
10
10
-
mkOption
11
11
-
types
12
12
-
;
13
13
-
14
14
-
cfg = config.roles.mirrors;
15
15
-
in
16
16
-
{
17
17
-
options.roles.mirrors.chinese = {
18
18
-
enable = mkEnableOption "Chinese mirror sites to speed up downloads in Mainland China";
19
19
-
20
20
-
sites = mkOption {
21
21
-
description = "A list of Chinese mirror sites to use.";
22
22
-
type = types.listOf types.str;
23
23
-
default = [
24
24
-
"https://mirrors.ustc.edu.cn"
25
25
-
"https://mirrors6.tuna.tsinghua.edu.cn"
26
26
-
"https://mirrors.tuna.tsinghua.edu.cn"
27
27
-
# "https://mirror.sjtu.edu.cn"
28
28
-
];
29
29
-
};
30
30
-
};
31
31
-
32
32
-
config = mkIf cfg.chinese.enable {
33
33
-
# cache.nixos.org is *unbearably* slow when accessed from Mainland China.
34
34
-
# Fortunately, mirror sites exist... Hooray(?)
35
35
-
nix.settings.substituters = map (url: "${url}/nix-channels/store") cfg.chinese.sites;
36
36
-
};
37
37
-
}
-11
roles/networking/default.nix
···
1
1
-
{ lib, ... }:
2
2
-
let
3
3
-
inherit (lib) mkEnableOption;
4
4
-
in
5
5
-
{
6
6
-
options.roles.networking = {
7
7
-
enable = mkEnableOption "Networking" // {
8
8
-
default = true;
9
9
-
};
10
10
-
};
11
11
-
}
-18
roles/networking/nixos.nix
···
1
1
-
{
2
2
-
config,
3
3
-
lib,
4
4
-
pkgs,
5
5
-
...
6
6
-
}:
7
7
-
let
8
8
-
inherit (lib) mkIf getExe;
9
9
-
cfg = config.roles.networking;
10
10
-
in
11
11
-
{
12
12
-
config = mkIf cfg.enable {
13
13
-
networking.networkmanager.enable = true;
14
14
-
roles.base.user.extraGroups = mkIf config.roles.base.canSudo [ "networkmanager" ];
15
15
-
16
16
-
hm.home.packages = [ pkgs.networkmanagerapplet ];
17
17
-
};
18
18
-
}
-39
roles/nix/default.nix
···
1
1
-
{ lib, inputs, self, ... }:
2
2
-
let
3
3
-
inherit (lib) mkDefault;
4
4
-
in
5
5
-
{
6
6
-
nix = {
7
7
-
registry = {
8
8
-
nixpkgs.flake = inputs.nixpkgs;
9
9
-
n.flake = inputs.nixpkgs;
10
10
-
};
11
11
-
nixPath =
12
12
-
let
13
13
-
toNixPath = input: "${input}=${inputs.${input}.outPath}";
14
14
-
in
15
15
-
[ (toNixPath "nixpkgs") ];
16
16
-
17
17
-
gc = {
18
18
-
automatic = mkDefault true;
19
19
-
dates = mkDefault "weekly";
20
20
-
options = mkDefault "--delete-older-than 7d";
21
21
-
};
22
22
-
23
23
-
settings = {
24
24
-
auto-optimise-store = true;
25
25
-
experimental-features = [
26
26
-
"nix-command"
27
27
-
"flakes"
28
28
-
"auto-allocate-uids"
29
29
-
];
30
30
-
trusted-users = [ "@wheel" ];
31
31
-
};
32
32
-
};
33
33
-
nixpkgs = {
34
34
-
# I'm not part of the FSF and I don't care
35
35
-
config.allowUnfree = true;
36
36
-
37
37
-
overlays = [ self.overlays.default ];
38
38
-
};
39
39
-
}
-28
roles/nix/nixos.nix
···
1
1
-
{
2
2
-
config,
3
3
-
pkgs,
4
4
-
lib,
5
5
-
self,
6
6
-
...
7
7
-
}:
8
8
-
{
9
9
-
system = {
10
10
-
# Thank @luishfonseca for this
11
11
-
# https://github.com/luishfonseca/dotfiles/blob/ab7625ec406b48493eda701911ad1cd017ce5bc1/modules/upgrade-diff.nix
12
12
-
activationScripts.diff = {
13
13
-
supportsDryActivation = true;
14
14
-
text = ''
15
15
-
${lib.getExe pkgs.nvd} --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
16
16
-
'';
17
17
-
};
18
18
-
19
19
-
# thanks to @getchoo
20
20
-
autoUpgrade = {
21
21
-
enable = true;
22
22
-
flake = "github:pluiedev/flake#${config.networking.hostName}";
23
23
-
flags = [ "--refresh" ];
24
24
-
};
25
25
-
26
26
-
configurationRevision = self.rev or self.dirtyRev or "unknown-dirty";
27
27
-
};
28
28
-
}
-11
roles/nixos.nix
···
1
1
-
inputs@{ lib, ... }:
2
2
-
{
3
3
-
imports =
4
4
-
[ ./. ]
5
5
-
++ (lib.pipe (import ./. inputs).imports [
6
6
-
(map (s: /${s}/nixos.nix))
7
7
-
(builtins.filter builtins.pathExists)
8
8
-
]);
9
9
-
10
10
-
system.stateVersion = "24.05";
11
11
-
}
-7
roles/plasma/default.nix
···
1
1
-
{ lib, ... }:
2
2
-
{
3
3
-
options.roles.plasma = {
4
4
-
enable = lib.mkEnableOption "Plasma";
5
5
-
krunner-nix.enable = lib.mkEnableOption "krunner-nix, a KRunner plugin that suggests Nix programs to run";
6
6
-
};
7
7
-
}
-42
roles/plasma/nixos.nix
···
1
1
-
{
2
2
-
config,
3
3
-
lib,
4
4
-
pkgs,
5
5
-
inputs,
6
6
-
inputs',
7
7
-
...
8
8
-
}:
9
9
-
let
10
10
-
cfg = config.roles.plasma;
11
11
-
inherit (lib) mkIf;
12
12
-
in
13
13
-
{
14
14
-
config = mkIf cfg.enable {
15
15
-
services = {
16
16
-
desktopManager.plasma6.enable = true;
17
17
-
displayManager = {
18
18
-
defaultSession = "plasma";
19
19
-
sddm = {
20
20
-
enable = true;
21
21
-
wayland.enable = true;
22
22
-
};
23
23
-
};
24
24
-
};
25
25
-
26
26
-
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
27
27
-
28
28
-
hm = {
29
29
-
imports = [ inputs.plasma-manager.homeManagerModules.plasma-manager ];
30
30
-
31
31
-
home.packages = lib.optional cfg.krunner-nix.enable inputs'.krunner-nix.packages.default;
32
32
-
33
33
-
# Janky workaround
34
34
-
# https://github.com/nix-community/home-manager/issues/1586
35
35
-
programs.firefox.package = pkgs.firefox.override {
36
36
-
cfg.nativeMessagingHosts.packages = [ pkgs.plasma6Packages.plasma-browser-integration ];
37
37
-
};
38
38
-
39
39
-
programs.plasma.enable = true;
40
40
-
};
41
41
-
};
42
42
-
}
-79
roles/rust/default.nix
···
1
1
-
{
2
2
-
lib,
3
3
-
pkgs,
4
4
-
config,
5
5
-
inputs',
6
6
-
...
7
7
-
}:
8
8
-
let
9
9
-
cfg = config.roles.rust;
10
10
-
inherit (lib)
11
11
-
mkIf
12
12
-
mkOption
13
13
-
mkEnableOption
14
14
-
types
15
15
-
;
16
16
-
in
17
17
-
{
18
18
-
options.roles.rust = {
19
19
-
enable = mkEnableOption "Rust";
20
20
-
21
21
-
package = mkOption {
22
22
-
type = types.package;
23
23
-
default =
24
24
-
let
25
25
-
fenix = inputs'.fenix.packages;
26
26
-
in
27
27
-
fenix.combine [
28
28
-
fenix.default.toolchain
29
29
-
fenix.rust-analyzer
30
30
-
];
31
31
-
description = "Version of Rust to install. Defaults to nightly with rust-analyzer";
32
32
-
};
33
33
-
34
34
-
linker = mkOption {
35
35
-
type = types.nullOr types.pathInStore;
36
36
-
default = lib.getExe' pkgs.mold "mold";
37
37
-
example = "lib.getExe' pkgs.lld \"lld\"";
38
38
-
description = "Linker to use when linking compiled Rust code";
39
39
-
};
40
40
-
41
41
-
settings = mkOption {
42
42
-
type = types.nullOr (types.attrsOf types.anything);
43
43
-
default = { };
44
44
-
};
45
45
-
46
46
-
rustfmt.settings = mkOption {
47
47
-
type = types.nullOr (types.attrsOf types.anything);
48
48
-
default = null;
49
49
-
example = {
50
50
-
hard_tabs = true;
51
51
-
tab_spaces = 4;
52
52
-
newline_style = "Unix";
53
53
-
};
54
54
-
};
55
55
-
};
56
56
-
57
57
-
config.hm =
58
58
-
let
59
59
-
toml = pkgs.formats.toml { };
60
60
-
linkerSettings = lib.optionalAttrs (cfg.linker != null) {
61
61
-
target.${pkgs.hostPlatform.rust.rustcTarget} = {
62
62
-
linker = "${lib.getExe pkgs.clang_16}";
63
63
-
rustflags = [
64
64
-
"-C"
65
65
-
"link-arg=-fuse-ld=${cfg.linker}"
66
66
-
];
67
67
-
};
68
68
-
};
69
69
-
in
70
70
-
mkIf cfg.enable {
71
71
-
home.packages = [ cfg.package ];
72
72
-
73
73
-
xdg.configFile."rustfmt/rustfmt.toml".source = mkIf (cfg.rustfmt.settings != null)
74
74
-
(toml.generate "rustfmt.toml" cfg.rustfmt.settings);
75
75
-
76
76
-
home.file.".cargo/config.toml".source = mkIf (cfg.settings != null)
77
77
-
(toml.generate "config.toml" (linkerSettings // cfg.settings));
78
78
-
};
79
79
-
}
+129
systems/common.nix
···
1
1
+
{
2
2
+
config,
3
3
+
self,
4
4
+
pkgs,
5
5
+
lib,
6
6
+
inputs,
7
7
+
...
8
8
+
}:
9
9
+
{
10
10
+
imports = [
11
11
+
inputs.hjem.nixosModules.hjem
12
12
+
];
13
13
+
14
14
+
hjem.extraModules = [
15
15
+
inputs.hjem-rum.hjemModules.default
16
16
+
self.hjemModules.hjem-ext
17
17
+
];
18
18
+
19
19
+
system.stateVersion = "24.11";
20
20
+
21
21
+
nix = {
22
22
+
# Add `n` as an alias of `nixpkgs`
23
23
+
registry.n.to = {
24
24
+
type = "path";
25
25
+
path = config.nixpkgs.flake.source;
26
26
+
};
27
27
+
28
28
+
gc = {
29
29
+
automatic = true;
30
30
+
dates = "weekly";
31
31
+
options = "--delete-older-than 7d";
32
32
+
};
33
33
+
34
34
+
settings = {
35
35
+
auto-optimise-store = true;
36
36
+
experimental-features = [
37
37
+
"nix-command"
38
38
+
"flakes"
39
39
+
"auto-allocate-uids"
40
40
+
"configurable-impure-env"
41
41
+
];
42
42
+
trusted-users = [ "@wheel" ];
43
43
+
impure-env = [ "all_proxy=http://127.0.0.1:2080" ];
44
44
+
};
45
45
+
};
46
46
+
47
47
+
nixpkgs = {
48
48
+
# I'm not part of the FSF and I don't care
49
49
+
config.allowUnfree = true;
50
50
+
flake.setNixPath = true;
51
51
+
52
52
+
overlays = [ self.overlays.default ];
53
53
+
};
54
54
+
55
55
+
boot = {
56
56
+
loader = {
57
57
+
systemd-boot = {
58
58
+
enable = true;
59
59
+
editor = false;
60
60
+
consoleMode = "2";
61
61
+
configurationLimit = 10;
62
62
+
};
63
63
+
efi.canTouchEfiVariables = true;
64
64
+
};
65
65
+
66
66
+
# Silence NixOS Stage 1 logs, jump straight into plymouth
67
67
+
consoleLogLevel = 0;
68
68
+
initrd.verbose = false;
69
69
+
plymouth.enable = true;
70
70
+
kernelParams = [
71
71
+
"quiet"
72
72
+
"splash"
73
73
+
"plymouth.use-simpledrm"
74
74
+
"i915.fastboot=1"
75
75
+
];
76
76
+
};
77
77
+
78
78
+
# Use native Wayland when possible
79
79
+
environment.variables = {
80
80
+
NIXOS_OZONE_WL = "1";
81
81
+
SDL_VIDEODRIVER = "wayland";
82
82
+
};
83
83
+
84
84
+
services = {
85
85
+
flatpak.enable = true;
86
86
+
87
87
+
desktopManager.plasma6.enable = true;
88
88
+
displayManager = {
89
89
+
defaultSession = "plasma";
90
90
+
sddm = {
91
91
+
enable = true;
92
92
+
wayland.enable = true;
93
93
+
};
94
94
+
};
95
95
+
96
96
+
pulseaudio.enable = false;
97
97
+
pipewire = {
98
98
+
enable = true;
99
99
+
wireplumber.enable = true;
100
100
+
alsa.enable = true;
101
101
+
jack.enable = true;
102
102
+
pulse.enable = true;
103
103
+
};
104
104
+
};
105
105
+
106
106
+
security.rtkit.enable = true;
107
107
+
108
108
+
networking.networkmanager.enable = true;
109
109
+
110
110
+
system = {
111
111
+
# Thank @luishfonseca for this
112
112
+
# https://github.com/luishfonseca/dotfiles/blob/ab7625ec406b48493eda701911ad1cd017ce5bc1/modules/upgrade-diff.nix
113
113
+
activationScripts.diff = {
114
114
+
supportsDryActivation = true;
115
115
+
text = ''
116
116
+
${lib.getExe pkgs.nvd} --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
117
117
+
'';
118
118
+
};
119
119
+
120
120
+
# thanks to @getchoo
121
121
+
autoUpgrade = {
122
122
+
enable = true;
123
123
+
flake = "github:pluiedev/flake#${config.networking.hostName}";
124
124
+
flags = [ "--refresh" ];
125
125
+
};
126
126
+
127
127
+
configurationRevision = self.rev or self.dirtyRev or "unknown-dirty";
128
128
+
};
129
129
+
}
+15
-46
systems/default.nix
···
1
1
-
{ withSystem, inputs, self, ... }:
2
2
-
let
3
3
-
mkMachine =
4
4
-
name: { system, modules, builder }:
5
5
-
withSystem system ({ inputs', self', ... }:
6
6
-
builder {
7
7
-
specialArgs = { inherit inputs inputs' self self'; };
8
8
-
modules = modules ++ [
9
9
-
./${name}
10
10
-
{
11
11
-
networking.hostName = name;
12
12
-
nixpkgs.hostPlatform = system;
13
13
-
}
14
14
-
];
15
15
-
}
16
16
-
);
17
17
-
18
18
-
mkMachines = builtins.mapAttrs mkMachine;
19
19
-
20
20
-
# Composable parts
21
21
-
personal = [
22
22
-
inputs.home-manager.nixosModules.home-manager
23
23
-
../users/personal.nix
24
24
-
];
25
25
-
nixos = [ ../roles/nixos.nix ];
26
26
-
darwin = [ ../roles/darwin.nix ];
27
27
-
28
28
-
# Presets
29
29
-
nixos-pc = {
30
30
-
system = "x86_64-linux";
31
31
-
modules = nixos ++ personal;
32
32
-
builder = inputs.nixpkgs.lib.nixosSystem;
33
33
-
};
34
34
-
darwin-pc = {
35
35
-
system = "x86_64-darwin";
36
36
-
modules = darwin ++ personal;
37
37
-
builder = inputs.nix-darwin.lib.darwinSystem;
38
38
-
};
39
39
-
in
1
1
+
{
2
2
+
inputs,
3
3
+
self,
4
4
+
...
5
5
+
}:
40
6
{
41
41
-
flake = {
42
42
-
nixosConfigurations = mkMachines {
43
43
-
fettuccine = nixos-pc;
44
44
-
tagliatelle = nixos-pc;
45
45
-
};
46
46
-
darwinConfigurations = mkMachines {
47
47
-
fromage = darwin-pc;
7
7
+
flake.nixosConfigurations = {
8
8
+
fettuccine = inputs.nixpkgs.lib.nixosSystem {
9
9
+
system = "x86_64-linux";
10
10
+
modules = [
11
11
+
./fettuccine
12
12
+
../users/leah
13
13
+
];
14
14
+
specialArgs = {
15
15
+
inherit inputs self;
16
16
+
};
48
17
};
49
18
};
50
19
}
+42
-19
systems/fettuccine/default.nix
···
1
1
{
2
2
-
lib,
2
2
+
config,
3
3
pkgs,
4
4
+
lib,
4
5
inputs,
5
5
-
config,
6
6
...
7
7
}:
8
8
{
9
9
imports = with inputs.nixos-hardware.nixosModules; [
10
10
+
../common.nix
10
11
./hardware-configuration.nix
11
12
12
13
common-hidpi
13
14
asus-zephyrus-gu603h
14
15
];
15
16
16
16
-
roles = {
17
17
-
# boot.lanzaboote.enable = true;
18
18
-
# nvidia.enable = true;
17
17
+
networking.hostName = "fettuccine";
18
18
+
19
19
+
boot = {
20
20
+
# Disable Nvidia's HDMI audio
21
21
+
blacklistedKernelModules = [ "snd_hda_codec_hdmi" ];
22
22
+
kernelPackages = pkgs.linuxPackages_xanmod_latest;
19
23
};
20
24
21
21
-
hardware.bluetooth.enable = true;
25
25
+
# Enable building and testing aarch64 packages for Nixpkgs dev
26
26
+
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
27
27
+
nix.settings.extra-platforms = [ "aarch64-linux" ];
28
28
+
29
29
+
hardware = {
30
30
+
bluetooth.enable = true;
31
31
+
32
32
+
nvidia = {
33
33
+
# PCI bus IDs are already conveniently set by nixos-hardware
34
34
+
prime.offload.enable = lib.mkForce true;
22
35
23
23
-
# Other Nvidia settings are set via nixos-hardware
36
36
+
# Beta can sometimes be more stable than, well, stable
37
37
+
package = config.boot.kernelPackages.nvidiaPackages.beta;
38
38
+
};
39
39
+
};
24
40
25
25
-
hardware.nvidia.prime.offload.enable = lib.mkForce true;
26
26
-
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
27
27
-
# Disable Nvidia's HDMI audio
28
28
-
boot.blacklistedKernelModules = [ "snd_hda_codec_hdmi" ];
41
41
+
# Nix can sometimes overload my poor, poor laptop CPU
42
42
+
# so much that it can freeze my entire system. Amazing.
43
43
+
# Please don't do that.
44
44
+
nix.daemonCPUSchedPolicy = "idle";
29
45
46
46
+
# This is an ASUS computer after all
30
47
services.asusd.enable = true;
31
48
32
32
-
specialisation.china.configuration = {
33
33
-
roles.mirrors.chinese.enable = true;
34
34
-
environment.variables.NIXOS_SPECIALISATION = "china";
49
49
+
networking.firewall = {
50
50
+
enable = true;
35
51
36
36
-
environment.systemPackages = [ pkgs.nekoray ];
52
52
+
# Allow previewing local Vite builds on other devices via LAN
53
53
+
allowedTCPPorts = [ 5173 ];
54
54
+
};
37
55
38
38
-
nix.settings = {
39
39
-
experimental-features = [ "configurable-impure-env" ];
40
40
-
impure-env = [ "all_proxy=http://127.0.0.1:2080" ];
41
41
-
};
56
56
+
specialisation.china.configuration = {
57
57
+
# cache.nixos.org is *unbearably* slow when accessed from Mainland China.
58
58
+
# Fortunately, mirror sites exist... Hooray(?)
59
59
+
nix.settings.substituters = map (url: "${url}/nix-channels/store") [
60
60
+
"https://mirrors.ustc.edu.cn"
61
61
+
"https://mirrors6.tuna.tsinghua.edu.cn"
62
62
+
"https://mirrors.tuna.tsinghua.edu.cn"
63
63
+
# "https://mirror.sjtu.edu.cn" # FIXME: buggy?
64
64
+
];
42
65
};
43
66
}
+43
-58
users/leah/appearance.nix
···
1
1
{
2
2
-
self,
3
3
-
inputs,
4
2
pkgs,
5
3
lib,
6
4
...
···
8
6
let
9
7
flavor = "mocha";
10
8
accent = "maroon";
9
9
+
10
10
+
mkUpper = str: (lib.toUpper (lib.substring 0 1 str)) + (lib.substring 1 (lib.stringLength str) str);
11
11
+
fcitx5ini = pkgs.formats.iniWithGlobalSection { };
11
12
in
12
13
{
13
13
-
imports = [ inputs.catppuccin.nixosModules.catppuccin ];
14
14
-
catppuccin = {
15
15
-
enable = true;
16
16
-
inherit flavor accent;
14
14
+
boot.plymouth = {
15
15
+
themePackages = [ pkgs.plymouth-blahaj-theme ];
16
16
+
theme = "blahaj";
17
17
};
18
18
19
19
-
catppuccin.plymouth.enable = false;
20
20
-
boot.plymouth.themePackages = [ pkgs.plymouth-blahaj-theme ];
21
21
-
boot.plymouth.theme = "blahaj";
19
19
+
hjem.users.leah = {
20
20
+
packages = [ pkgs.breezex-cursor ];
21
21
+
22
22
+
files = {
23
23
+
".local/share/fcitx5/themes/catppuccin-${flavor}-${accent}".source =
24
24
+
"${pkgs.catppuccin-fcitx5}/share/fcitx5/themes/catppuccin-${flavor}-${accent}";
22
25
23
23
-
hm.imports = [
24
24
-
inputs.catppuccin.homeModules.catppuccin
25
25
-
self.hmModules.ctp-plus
26
26
-
];
26
26
+
".config/fcitx5/conf/classicui.conf".source = fcitx5ini.generate "fcitx5-classicui.conf" {
27
27
+
globalSection = {
28
28
+
Theme = "catppuccin-${flavor}-${accent}";
29
29
+
};
30
30
+
};
27
31
28
28
-
hm.catppuccin = {
29
29
-
enable = true;
30
30
-
inherit flavor accent;
31
31
-
};
32
32
+
".config/fish/themes/Catppuccin ${mkUpper flavor}.theme".source =
33
33
+
"${pkgs.catppuccin-fish}/share/fish/themes/Catppuccin ${mkUpper flavor}.theme";
34
34
+
};
32
35
33
33
-
hm.programs.fish.interactiveShellInit = ''
34
34
-
set -x LS_COLORS (${lib.getExe pkgs.vivid} generate catppuccin-${flavor})
35
35
-
'';
36
36
+
rum.programs.fish.earlyConfigFiles.theme = ''
37
37
+
fish_config theme choose "Catppuccin ${mkUpper flavor}"
38
38
+
set -x LS_COLORS (${lib.getExe pkgs.vivid} generate catppuccin-${flavor})
39
39
+
'';
36
40
37
37
-
hm.programs.moar.settings.style = "catppuccin-${flavor}";
41
41
+
ext.programs.moar.settings.style = "catppuccin-${flavor}";
42
42
+
};
38
43
39
39
-
hm.programs.plasma.fonts =
40
40
-
let
41
41
-
rethink = {
42
42
-
family = "Rethink Sans";
43
43
-
pointSize = 12;
44
44
-
};
45
45
-
in
46
46
-
{
47
47
-
general = rethink // {
48
48
-
pointSize = 14;
49
49
-
};
50
50
-
fixedWidth = {
51
51
-
family = "Iosevka";
52
52
-
pointSize = 14;
53
53
-
};
54
54
-
small = rethink // {
55
55
-
pointSize = 11;
56
56
-
};
57
57
-
toolbar = rethink;
58
58
-
menu = rethink;
59
59
-
windowTitle = rethink;
60
60
-
};
44
44
+
fonts = {
45
45
+
enableDefaultPackages = true;
61
46
62
62
-
roles.fonts = {
63
63
-
enable = true;
64
47
packages = with pkgs; [
65
48
iosevka
66
49
noto-fonts-color-emoji
···
70
53
dm-sans-unstable
71
54
];
72
55
73
73
-
defaults = {
74
74
-
serif = [
75
75
-
"I.Ming"
76
76
-
];
77
77
-
sansSerif = [
78
78
-
"DM Sans"
79
79
-
"LXGW Neo XiHei"
80
80
-
];
81
81
-
emoji = [ "Noto Color Emoji" ];
82
82
-
monospace = [
83
83
-
"Iosevka"
84
84
-
"LXGW Neo XiHei"
85
85
-
];
56
56
+
fontconfig = {
57
57
+
defaultFonts = {
58
58
+
serif = [
59
59
+
"I.Ming"
60
60
+
];
61
61
+
sansSerif = [
62
62
+
"DM Sans"
63
63
+
"LXGW Neo XiHei"
64
64
+
];
65
65
+
emoji = [ "Noto Color Emoji" ];
66
66
+
monospace = [
67
67
+
"Iosevka"
68
68
+
"LXGW Neo XiHei"
69
69
+
];
70
70
+
};
86
71
};
87
72
};
88
73
}
+20
-66
users/leah/default.nix
···
1
1
{
2
2
config,
3
3
-
pkgs,
4
4
-
self,
3
3
+
inputs,
5
4
...
6
5
}:
7
6
{
8
7
imports = [
9
8
./appearance.nix
10
10
-
./presets/plasma
9
9
+
# ./presets/plasma
11
10
./programs
11
11
+
12
12
+
inputs.hjem.nixosModules.hjem
13
13
+
inputs.nix-index-database.nixosModules.nix-index
12
14
];
13
15
14
14
-
hm.imports = [ self.hmModules.hm-plus ];
15
15
-
16
16
-
boot = {
17
17
-
binfmt.emulatedSystems = [ "aarch64-linux" ];
18
18
-
kernelParams = [ "plymouth.use-simpledrm" ];
19
19
-
kernelPackages = pkgs.linuxPackages_xanmod_latest;
20
20
-
};
21
21
-
22
22
-
nix = {
23
23
-
settings.extra-platforms = [ "aarch64-linux" ];
24
24
-
daemonCPUSchedPolicy = "idle";
25
25
-
};
16
16
+
hjem.extraModules = [
17
17
+
inputs.hjem-rum.hjemModules.default
18
18
+
];
26
19
27
20
i18n.supportedLocales = [ "all" ];
28
21
29
29
-
roles.base = {
30
30
-
username = "leah";
31
31
-
realName = "Leah";
32
32
-
fullName = "Leah Amelia Chen";
33
33
-
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7uJGE2/25M4a3DIVxtnTA5INqWsFGw+49qHXaN/kqy";
34
34
-
canSudo = true;
35
35
-
};
36
36
-
37
37
-
roles.email =
38
38
-
let
39
39
-
realName = config.roles.base.fullName;
40
40
-
host = {
41
41
-
imap = {
42
42
-
host = "imap.migadu.com";
43
43
-
port = 993;
44
44
-
};
45
45
-
smtp = {
46
46
-
host = "smtp.migadu.com";
47
47
-
port = 465;
48
48
-
};
49
49
-
};
50
50
-
in
51
51
-
{
52
52
-
enable = true;
53
53
-
accounts = {
54
54
-
"hi@pluie.me" = {
55
55
-
inherit realName host;
56
56
-
primary = true;
57
57
-
};
58
58
-
"acc@pluie.me" = {
59
59
-
inherit host;
60
60
-
realName = "${realName} [accounts]";
61
61
-
};
62
62
-
};
63
63
-
};
64
64
-
65
65
-
roles.fish = {
66
66
-
enable = true;
67
67
-
defaultShell = true;
22
22
+
users.users.leah = {
23
23
+
isNormalUser = true;
24
24
+
description = "Leah C";
25
25
+
extraGroups = [
26
26
+
"wheel" # 1984 powers
27
27
+
"rtkit" # Some apps may need to adjust audio priority at runtime
28
28
+
"networkmanager" # Manage networks
29
29
+
];
30
30
+
home = "/home/leah";
68
31
};
69
32
70
70
-
environment.variables = {
71
71
-
NIXOS_OZONE_WL = "1";
72
72
-
SDL_VIDEODRIVER = "wayland";
73
73
-
};
33
33
+
# Name and directory should be populated by users.users
34
34
+
hjem.users.leah.enable = true;
74
35
75
75
-
networking.firewall = {
76
76
-
enable = true;
77
77
-
allowedTCPPorts = [
78
78
-
80
79
79
-
443
80
80
-
5173
81
81
-
];
82
82
-
};
36
36
+
hjem.clobberByDefault = true;
83
37
}
-13
users/leah/presets/plasma/default.nix
···
4
4
./sddm.nix
5
5
./settings
6
6
];
7
7
-
8
8
-
boot.plymouth.enable = true;
9
9
-
roles.plasma = {
10
10
-
enable = true;
11
11
-
krunner-nix.enable = true;
12
12
-
};
13
13
-
14
14
-
# KDE manages GTK stuff by itself
15
15
-
#hm.gtk.enable = lib.mkForce false;
16
16
-
17
17
-
hm.home.packages = with pkgs; [
18
18
-
wl-clipboard
19
19
-
];
20
7
}
-2
users/leah/presets/plasma/settings/default.nix
···
2
2
{
3
3
imports = [ ./panels.nix ];
4
4
5
5
-
hm.programs.konsole.enable = true;
6
6
-
7
5
hm.programs.plasma = {
8
6
enable = true;
9
7
+29
users/leah/programs/1password.nix
···
1
1
+
{
2
2
+
config,
3
3
+
pkgs,
4
4
+
lib,
5
5
+
...
6
6
+
}:
7
7
+
{
8
8
+
programs = {
9
9
+
_1password.enable = true;
10
10
+
_1password-gui = {
11
11
+
enable = true;
12
12
+
package = pkgs._1password-gui-beta;
13
13
+
14
14
+
# Unlock 1Pass via PolKit
15
15
+
polkitPolicyOwners = [ "leah" ];
16
16
+
};
17
17
+
};
18
18
+
19
19
+
# Add 1Pass as SSH agent
20
20
+
hjem.users.leah = {
21
21
+
files.".ssh/config".text = ''
22
22
+
Host *
23
23
+
IdentityAgent ${config.hjem.users.leah.directory}/.1password/agent.sock
24
24
+
'';
25
25
+
26
26
+
ext.programs.git.settings.gpg.ssh.program =
27
27
+
lib.getExe' config.programs._1password-gui.package "op-ssh-sign";
28
28
+
};
29
29
+
}
+45
-130
users/leah/programs/default.nix
···
1
1
{
2
2
-
config,
3
2
pkgs,
4
4
-
lib,
5
5
-
inputs,
6
6
-
inputs',
7
3
...
8
4
}:
9
5
{
10
6
imports = [
7
7
+
./1password.nix
11
8
./discord
12
12
-
./fcitx5
9
9
+
./fcitx5.nix
13
10
./firefox
14
14
-
./ghostty
15
15
-
./helix
16
16
-
./jj
17
17
-
./rust
18
18
-
];
19
19
-
20
20
-
hm.imports = [ inputs.nix-index-database.hmModules.nix-index ];
21
21
-
22
22
-
hm.home.packages = with pkgs; [
23
23
-
# Apps
24
24
-
inputs'.blender-bin.packages.default
25
25
-
chromium
26
26
-
gimp
27
27
-
inkscape-with-extensions
28
28
-
vlc
29
29
-
30
30
-
# Command-line apps
31
31
-
just
32
32
-
fastfetch
33
33
-
nix-output-monitor
34
34
-
nurl
35
35
-
xclip
36
36
-
moar
37
37
-
38
38
-
(inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix).config.build.wrapper
39
39
-
];
40
40
-
41
41
-
services.touchegg.enable = true;
42
42
-
43
43
-
xdg.icons.enable = true;
44
44
-
environment.systemPackages = [
45
45
-
pkgs.nekoray
46
46
-
pkgs.adwaita-icon-theme
11
11
+
./fish.nix
12
12
+
./ghostty.nix
13
13
+
./helix.nix
14
14
+
./vcs.nix
15
15
+
./steam.nix
47
16
];
48
48
-
49
49
-
services.flatpak.enable = true;
50
17
51
18
programs = {
52
52
-
appimage.enable = true;
53
19
gamemode.enable = true;
54
20
localsend.enable = true;
55
55
-
56
56
-
steam = {
57
57
-
enable = true;
58
58
-
extraCompatPackages = [ pkgs.proton-ge-bin ];
59
59
-
extraPackages = [
60
60
-
pkgs.ncurses6 # Crusader Kings III
61
61
-
];
62
62
-
remotePlay.openFirewall = true;
63
63
-
};
64
64
-
nix-ld.enable = true;
21
21
+
nix-index-database.comma.enable = true;
65
22
};
66
23
24
24
+
hjem.users.leah = {
25
25
+
packages = with pkgs; [
26
26
+
# Apps
27
27
+
nekoray
28
28
+
prismlauncher
29
29
+
vlc
30
30
+
thunderbird
31
31
+
telegram-desktop
67
32
68
68
-
hm.programs = {
69
69
-
bat = {
70
70
-
enable = true;
71
71
-
config = {
72
72
-
map-syntax = [ "flake.lock:JSON" ];
73
73
-
};
74
74
-
syntaxes = {
75
75
-
just = {
76
76
-
src = lib.cleanSourceWith {
77
77
-
filter =
78
78
-
name: type:
79
79
-
lib.cleanSourceFilter name type
80
80
-
&& !builtins.elem (baseNameOf name) [
81
81
-
"ShellScript (for Just).sublime-syntax"
82
82
-
"Python (for Just).sublime-syntax"
83
83
-
];
33
33
+
# Command-line apps
34
34
+
just
35
35
+
nix-output-monitor
36
36
+
ripgrep
37
37
+
starship
38
38
+
wl-clipboard
39
39
+
eza
40
40
+
];
84
41
85
85
-
src = pkgs.fetchFromGitHub {
86
86
-
owner = "nk9";
87
87
-
repo = "just_sublime";
88
88
-
rev = "352bae277961d41e2a1795a834dbf22661c8910f";
89
89
-
hash = "sha256-QCp6ypSBhgGZG4T7fNiFfCgZIVJoDSoJBkpcdw3aiuQ=";
90
90
-
};
91
91
-
};
92
92
-
file = "Syntax/Just.sublime-syntax";
93
93
-
};
94
94
-
};
95
95
-
};
96
96
-
97
97
-
eza = {
98
98
-
enable = true;
99
99
-
git = true;
100
100
-
icons = "auto";
101
101
-
};
102
102
-
direnv = {
103
103
-
enable = true;
104
104
-
nix-direnv.enable = true;
105
105
-
};
106
106
-
107
107
-
gh = {
108
108
-
enable = true;
109
109
-
settings.git_protocol = "ssh";
110
110
-
};
111
111
-
112
112
-
git = {
113
113
-
enable = true;
114
114
-
userName = config.roles.base.fullName;
115
115
-
userEmail = "hi@pluie.me";
42
42
+
files.".config/starship.toml".source = ./starship.toml;
116
43
117
117
-
signing.key = config.roles.base.publicKey;
118
118
-
signingFormat = "ssh";
44
44
+
rum.programs.obs-studio.enable = true;
119
45
120
120
-
extraConfig = {
121
121
-
init.defaultBranch = "main";
122
122
-
push.autoSetupRemote = true;
123
123
-
url."https://github.com/".insteadOf = "gh:";
46
46
+
ext.programs = {
47
47
+
direnv = {
48
48
+
enable = true;
49
49
+
nix-direnv.enable = true;
124
50
};
125
125
-
};
126
51
127
127
-
hyfetch = {
128
128
-
enable = true;
129
129
-
settings = {
130
130
-
preset = "lesbian";
131
131
-
mode = "rgb";
132
132
-
lightness = 0.6;
133
133
-
color_align.mode = "horizontal";
134
134
-
backend = "fastfetch";
52
52
+
hyfetch = {
53
53
+
enable = true;
54
54
+
settings = {
55
55
+
preset = "lesbian";
56
56
+
mode = "rgb";
57
57
+
lightness = 0.6;
58
58
+
color_align.mode = "horizontal";
59
59
+
backend = "fastfetch";
60
60
+
};
135
61
};
136
136
-
};
137
62
138
138
-
moar = {
139
139
-
enable = true;
140
140
-
settings = {
141
141
-
style = "catppuccin-mocha";
142
142
-
no-statusbar = true;
143
143
-
wrap = true;
63
63
+
moar = {
64
64
+
enable = true;
65
65
+
settings = {
66
66
+
no-statusbar = true;
67
67
+
wrap = true;
68
68
+
};
144
69
};
145
145
-
};
146
146
-
147
147
-
nix-index-database.comma.enable = true;
148
148
-
149
149
-
obs-studio.enable = true;
150
150
-
ripgrep.enable = true;
151
151
-
152
152
-
starship = {
153
153
-
enable = true;
154
154
-
settings = builtins.fromTOML (builtins.readFile ./starship.toml);
155
70
};
156
71
};
157
72
}
+2
-2
users/leah/programs/discord/default.nix
···
1
1
{
2
2
-
hm.catppuccin.vesktop.splashTheming = true;
2
2
+
# hm.catppuccin.vesktop.splashTheming = true;
3
3
4
4
-
hm.programs.vesktop = {
4
4
+
hjem.users.leah.ext.programs.vesktop = {
5
5
enable = true;
6
6
7
7
settings = {
+41
users/leah/programs/fcitx5.nix
···
1
1
+
{ pkgs, ... }:
2
2
+
let
3
3
+
luna_pinyin = yaml.generate "luna_pinyin.yaml" {
4
4
+
patch."speller/algebra" = [
5
5
+
"erase/^xx$/"
6
6
+
"derive/in$/ing/" # in/ing 不分
7
7
+
"derive/ing$/in/"
8
8
+
9
9
+
# 非标拼写就
10
10
+
"derive/^([nl])ve$/$1ue/" # nve = nue, lve = lue
11
11
+
"derive/^([jqxy])v/$1u/" # ju = jv
12
12
+
"derive/uen$/un/" # gun = guen
13
13
+
"derive/uei$/ui/" # gui = guei
14
14
+
"derive/iou$/iu/" # jiu = jiou
15
15
+
];
16
16
+
};
17
17
+
18
18
+
yaml = pkgs.formats.yaml { };
19
19
+
in
20
20
+
{
21
21
+
i18n.inputMethod = {
22
22
+
enable = true;
23
23
+
type = "fcitx5";
24
24
+
fcitx5.addons = with pkgs; [
25
25
+
fcitx5-mozc
26
26
+
fcitx5-rime
27
27
+
];
28
28
+
};
29
29
+
30
30
+
hjem.users.leah.files = {
31
31
+
".local/share/fcitx5/rime/default.custom.yaml".source = yaml.generate "default.yaml" {
32
32
+
patch.schema_list = [
33
33
+
{ schema = "luna_pinyin_simp"; }
34
34
+
{ schema = "luna_pinyin"; }
35
35
+
];
36
36
+
};
37
37
+
".local/share/fcitx5/rime/luna_pinyin.custom.yaml".source = luna_pinyin;
38
38
+
".local/share/fcitx5/rime/luna_pinyin_simp.custom.yaml".source = luna_pinyin;
39
39
+
};
40
40
+
41
41
+
}
-48
users/leah/programs/fcitx5/default.nix
···
1
1
-
{ pkgs, ... }:
2
2
-
{
3
3
-
hm.catppuccin.fcitx5.enable = false; # TODO
4
4
-
5
5
-
hm.i18n.inputMethod = {
6
6
-
enabled = "fcitx5";
7
7
-
fcitx5 = {
8
8
-
addons = [ pkgs.fcitx5-mozc ];
9
9
-
10
10
-
# settings.groups = [
11
11
-
# {
12
12
-
# name = "Default";
13
13
-
# defaultLayout = "us";
14
14
-
# defaultIM = "keyboard-us";
15
15
-
# items = map (name: {inherit name;}) ["keyboard-us" "rime" "mozc"];
16
16
-
# }
17
17
-
# ];
18
18
-
19
19
-
rime = {
20
20
-
enable = true;
21
21
-
22
22
-
settings =
23
23
-
let
24
24
-
luna_pinyin.patch."speller/algebra" = [
25
25
-
"erase/^xx$/"
26
26
-
"derive/in$/ing/" # in/ing 不分
27
27
-
"derive/ing$/in/"
28
28
-
29
29
-
# 非标拼写
30
30
-
"derive/^([nl])ve$/$1ue/" # nve = nue, lve = lue
31
31
-
"derive/^([jqxy])v/$1u/" # ju = jv
32
32
-
"derive/uen$/un/" # gun = guen
33
33
-
"derive/uei$/ui/" # gui = guei
34
34
-
"derive/iou$/iu/" # jiu = jiou
35
35
-
];
36
36
-
in
37
37
-
{
38
38
-
default.patch.schema_list = [
39
39
-
{ schema = "luna_pinyin_simp"; }
40
40
-
{ schema = "luna_pinyin"; }
41
41
-
];
42
42
-
inherit luna_pinyin;
43
43
-
luna_pinyin_simp = luna_pinyin;
44
44
-
};
45
45
-
};
46
46
-
};
47
47
-
};
48
48
-
}
+47
-135
users/leah/programs/firefox/default.nix
···
1
1
{
2
2
-
config,
3
2
lib,
4
3
pkgs,
5
5
-
inputs',
6
4
...
7
5
}:
8
8
-
{
9
9
-
hm.programs.firefox = {
10
10
-
enable = true;
6
6
+
let
7
7
+
json = pkgs.formats.json { };
8
8
+
wrappedFirefox = pkgs.firefox.override {
9
9
+
extraPoliciesFiles = [(json.generate "firefox-policies.json" policies)];
10
10
+
};
11
11
12
12
-
profiles.${config.roles.base.username} = {
13
13
-
isDefault = true;
14
14
-
name = config.roles.base.realName;
12
12
+
addons = [
13
13
+
# Styling
14
14
+
"addon@darkreader.org" # Dark Reader
15
15
+
"{85860b32-02a8-431a-b2b1-40fbd64c9c69}" # File Icons for Git{Hub,Lab}
16
16
+
"FirefoxColor@mozilla.com" # Firefox Color
17
17
+
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" # Stylus
18
18
+
"{a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad}" # Refined GitHub
19
19
+
"{72742915-c83b-4485-9023-b55dc5a1e730}" # Wide GitHub
15
20
16
16
-
extensions.packages =
17
17
-
let
18
18
-
# FIXME: firefox-addons currently receives free-only nixpkgs,
19
19
-
# and so unfree plugins are blocked from evaluation.
20
20
-
# Use this one dirty trick to make the FSF mad! :trolley:
21
21
-
gaslight = pkgs: pkgs.overrideAttrs { meta.license.free = true; };
22
22
-
in
23
23
-
with inputs'.firefox-addons.packages;
24
24
-
map gaslight [
25
25
-
# Essentials
26
26
-
auto-tab-discard
27
27
-
onepassword-password-manager
28
28
-
ublock-origin
21
21
+
# Privacy
22
22
+
"gdpr@cavi.au.dk" # Consent-O-Matic
23
23
+
"addon@fastforward.team" # FastForward
24
24
+
"{6d96bb5e-1175-4ebf-8ab5-5f56f1c79f65}" # Google Analytics Opt-out
25
25
+
"{6d85dea2-0fb4-4de3-9f8c-264bce9a2296}" # Link Cleaner
26
26
+
"uBlock0@raymondhill.net" # uBlock Origin
29
27
30
30
-
# Avoid annoyances
31
31
-
consent-o-matic
32
32
-
don-t-fuck-with-paste
33
33
-
enhanced-h264ify
34
34
-
fastforwardteam
35
35
-
faststream
36
36
-
gaoptout
37
37
-
istilldontcareaboutcookies
38
38
-
link-cleaner
39
39
-
musescore-downloader
40
40
-
native-mathml
41
41
-
privacy-possum
42
42
-
re-enable-right-click
43
43
-
sponsorblock
44
44
-
terms-of-service-didnt-read
45
45
-
youtube-nonstop
46
46
-
47
47
-
# Redirectors
48
48
-
indie-wiki-buddy
49
49
-
libredirect
50
50
-
localcdn
51
51
-
modrinthify
52
52
-
53
53
-
# Augmentations
54
54
-
augmented-steam
55
55
-
github-file-icons
56
56
-
octolinker
57
57
-
protondb-for-steam
58
58
-
refined-github
59
59
-
widegithub
60
60
-
wikiwand-wikipedia-modernized
61
61
-
62
62
-
# Language
63
63
-
furiganaize
64
64
-
immersive-translate
65
65
-
languagetool
66
66
-
67
67
-
# Styling
68
68
-
darkreader
69
69
-
firefox-color
70
70
-
stylus
71
71
-
72
72
-
# Dev
73
73
-
a11ycss
74
74
-
header-editor
75
75
-
rust-search-extension
76
76
-
77
77
-
disconnect
78
78
-
pronoundb
79
79
-
search-by-image
80
80
-
unpaywall
81
81
-
wayback-machine
82
82
-
];
28
28
+
# "Stop Websites from Doing Stupid Things I Don't Want"
29
29
+
"{278b0ae0-da9d-4cc6-be81-5aa7f3202672}" # Allow Right Click
30
30
+
"DontFuckWithPaste@raim.ist" # Don't Fuck With Paste
83
31
84
84
-
search =
85
85
-
let
86
86
-
mkParams = lib.mapAttrsToList lib.nameValuePair;
87
87
-
nixIcon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
88
88
-
nixosSearch = path: aliases: {
89
89
-
urls = [ { template = "https://nixpkgs.dev${path}/{searchTerms}"; } ];
90
90
-
icon = nixIcon;
91
91
-
definedAliases = aliases;
92
92
-
};
32
32
+
# YouTube
33
33
+
"{9a41dee2-b924-4161-a971-7fb35c053a4a}" # enhanced-h264ify
34
34
+
"sponsorBlocker@ajay.app" # SponsorBlock for YouTube
35
35
+
"{0d7cafdd-501c-49ca-8ebb-e3341caaa55e}" # YouTube NonStop
36
36
+
37
37
+
# Utilities
38
38
+
"{d634138d-c276-4fc8-924b-40a0ea21d284}" # 1Password
39
39
+
"{c2c003ee-bd69-42a2-b0e9-6f34222cb046}" # Auto Tab Discard
40
40
+
"{cb31ec5d-c49a-4e5a-b240-16c767444f62}" # Indie Wiki Buddy
41
41
+
"octolinker@stefanbuck.com" # OctoLinker
42
42
+
"firefox-addon@pronoundb.org" # PronounDB
43
43
+
"wayback_machine@mozilla.org" # Wayback Machine
44
44
+
];
93
45
94
94
-
search = path: queryKey: {
95
95
-
template = path;
96
96
-
params = mkParams { ${queryKey} = "{searchTerms}"; };
97
97
-
};
98
98
-
in
99
99
-
{
100
100
-
default = "ddg";
101
101
-
force = true;
102
102
-
engines = {
103
103
-
"Nixpkgs" = nixosSearch "" [ "@np" ];
104
104
-
"NixOS Options" = nixosSearch "/option" [
105
105
-
"@ns"
106
106
-
"@no"
107
107
-
];
108
108
-
"NixOS Wiki" = {
109
109
-
urls = [ (search "https://wiki.nixos.org/index.php" "search") ];
110
110
-
icon = nixIcon;
111
111
-
definedAliases = [ "@nw" ];
112
112
-
};
113
113
-
"Nixpkgs PR Tracker" = {
114
114
-
urls = [ (search "https://nixpk.gs/pr-tracker.html" "pr") ];
115
115
-
icon = nixIcon;
116
116
-
definedAliases = [ "@npr" ];
117
117
-
};
118
118
-
"Home Manager Settings" = {
119
119
-
urls = [ (search "https://home-manager-options.extranix.com" "query") ];
120
120
-
icon = nixIcon;
121
121
-
definedAliases = [ "@hm" ];
122
122
-
};
123
123
-
"Wiktionary" = {
124
124
-
urls = [ (search "https://en.wiktionary.org/wiki/Special:Search" "search") ];
125
125
-
icon = "https://en.wiktionary.org/favicon.ico";
126
126
-
definedAliases = [ "@wkt" ];
127
127
-
};
128
128
-
"GitHub" = {
129
129
-
urls = [ (search "https://github.com/search" "q") ];
130
130
-
icon = "https://github.com/favicon.ico";
131
131
-
definedAliases = [ "@gh" ];
132
132
-
};
133
133
-
"docs.rs" = {
134
134
-
urls = [ (search "https://docs.rs/releases/search" "query") ];
135
135
-
icon = "https://docs.rs/-/static/favicon.ico";
136
136
-
definedAliases = [ "@rs" ];
137
137
-
};
138
138
-
"lib.rs" = {
139
139
-
urls = [ (search "https://lib.rs/search" "q") ];
140
140
-
icon = "https://lib.rs/favicon.ico";
141
141
-
definedAliases = [ "@lrs" ];
142
142
-
};
143
143
-
};
144
144
-
};
145
145
-
};
46
46
+
policies = {
47
47
+
ExtensionSettings = lib.listToAttrs (
48
48
+
map (id: lib.nameValuePair id {
49
49
+
installation_mode = "normal_installed";
50
50
+
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${id}/latest.xpi";
51
51
+
}) addons);
146
52
};
53
53
+
54
54
+
# TODO: Specifying custom search engines is *very* cursed.
55
55
+
# I've seen how HM does it, and I don't think it's worth it at all...
56
56
+
in
57
57
+
{
58
58
+
hjem.users.leah.packages = [ wrappedFirefox ];
147
59
}
+23
users/leah/programs/fish.nix
···
1
1
+
{
2
2
+
config,
3
3
+
...
4
4
+
}:
5
5
+
{
6
6
+
7
7
+
programs.fish.enable = true;
8
8
+
users.users.leah.shell = config.programs.fish.package;
9
9
+
10
10
+
hjem.users.leah.rum.programs.fish = {
11
11
+
enable = true;
12
12
+
inherit (config.programs.fish) package;
13
13
+
14
14
+
functions.eza = "eza --git --icons=auto";
15
15
+
abbrs = {
16
16
+
ls = "eza";
17
17
+
ll = "eza -l";
18
18
+
la = "eza -a";
19
19
+
lt = "eza --tree";
20
20
+
lla = "eza -la";
21
21
+
};
22
22
+
};
23
23
+
}
+4
-6
users/leah/programs/ghostty/default.nix
users/leah/programs/ghostty.nix
···
1
1
{
2
2
-
inputs',
2
2
+
inputs,
3
3
+
pkgs,
3
4
...
4
5
}:
5
6
{
6
6
-
hm.programs.ghostty = {
7
7
+
hjem.users.leah.rum.programs.ghostty = {
7
8
enable = true;
8
8
-
9
9
-
package = inputs'.ghostty.packages.default;
10
10
-
11
11
-
enableFishIntegration = true;
9
9
+
package = inputs.ghostty.packages.${pkgs.system}.default;
12
10
13
11
settings = {
14
12
font-family = "Iosevka";
+185
users/leah/programs/helix.nix
···
1
1
+
{
2
2
+
hjem.users.leah = {
3
3
+
environment.sessionVariables.EDITOR = "hx";
4
4
+
5
5
+
# TODO: upstream this
6
6
+
files.".config/helix/ignore".text = ''
7
7
+
flake.lock
8
8
+
'';
9
9
+
10
10
+
rum.programs.helix = {
11
11
+
enable = true;
12
12
+
13
13
+
settings = {
14
14
+
theme = "catppuccin_mocha_plus";
15
15
+
16
16
+
editor = {
17
17
+
line-number = "relative";
18
18
+
bufferline = "multiple";
19
19
+
cursorline = true;
20
20
+
color-modes = true;
21
21
+
text-width = 100;
22
22
+
popup-border = "all";
23
23
+
rulers = [ 100 ];
24
24
+
25
25
+
end-of-line-diagnostics = "hint";
26
26
+
inline-diagnostics = {
27
27
+
cursor-line = "info";
28
28
+
other-lines = "error";
29
29
+
};
30
30
+
31
31
+
soft-wrap.enable = true;
32
32
+
33
33
+
cursor-shape = {
34
34
+
insert = "bar";
35
35
+
normal = "block";
36
36
+
select = "underline";
37
37
+
};
38
38
+
39
39
+
statusline = {
40
40
+
left = [
41
41
+
"mode"
42
42
+
"spacer"
43
43
+
"spinner"
44
44
+
];
45
45
+
right = [
46
46
+
"read-only-indicator"
47
47
+
"file-modification-indicator"
48
48
+
"file-name"
49
49
+
"separator"
50
50
+
"file-type"
51
51
+
"position-percentage"
52
52
+
"spacer"
53
53
+
"separator"
54
54
+
"position"
55
55
+
];
56
56
+
mode = {
57
57
+
normal = "NORMAL";
58
58
+
insert = "INSERT";
59
59
+
select = "VISUAL";
60
60
+
};
61
61
+
};
62
62
+
63
63
+
lsp = {
64
64
+
display-messages = true;
65
65
+
display-progress-messages = true;
66
66
+
display-inlay-hints = true;
67
67
+
};
68
68
+
69
69
+
auto-save = {
70
70
+
focus-lost = true; # Ghostty supports it :)
71
71
+
after-delay.enable = true;
72
72
+
};
73
73
+
74
74
+
whitespace.render = {
75
75
+
space = "none";
76
76
+
tab = "all";
77
77
+
};
78
78
+
79
79
+
indent-guides.render = true;
80
80
+
81
81
+
gutters.layout = [
82
82
+
"diff"
83
83
+
"diagnostics"
84
84
+
"line-numbers"
85
85
+
"spacer"
86
86
+
];
87
87
+
};
88
88
+
keys = {
89
89
+
normal = {
90
90
+
"C-s" = ":w";
91
91
+
"tab" = "move_parent_node_end";
92
92
+
"S-tab" = "move_parent_node_start";
93
93
+
"A-h" = "goto_previous_buffer";
94
94
+
"A-l" = "goto_next_buffer";
95
95
+
};
96
96
+
insert = {
97
97
+
"S-tab" = "move_parent_node_start";
98
98
+
};
99
99
+
select = {
100
100
+
"tab" = "move_parent_node_end";
101
101
+
"S-tab" = "move_parent_node_start";
102
102
+
};
103
103
+
};
104
104
+
};
105
105
+
themes.catppuccin_mocha_plus = {
106
106
+
inherits = "catppuccin_mocha";
107
107
+
108
108
+
"ui.statusline" = {
109
109
+
fg = "subtext0";
110
110
+
bg = "mantle";
111
111
+
};
112
112
+
"ui.statusline.normal" = {
113
113
+
fg = "mantle";
114
114
+
bg = "rosewater";
115
115
+
modifiers = [ "bold" ];
116
116
+
};
117
117
+
"ui.statusline.insert" = {
118
118
+
fg = "mantle";
119
119
+
bg = "maroon";
120
120
+
modifiers = [ "bold" ];
121
121
+
};
122
122
+
"ui.statusline.select" = {
123
123
+
fg = "mantle";
124
124
+
bg = "mauve";
125
125
+
modifiers = [ "bold" ];
126
126
+
};
127
127
+
128
128
+
"ui.cursor.primary.normal" = {
129
129
+
fg = "base";
130
130
+
bg = "rosewater";
131
131
+
};
132
132
+
"ui.cursor.primary.insert" = {
133
133
+
fg = "base";
134
134
+
bg = "maroon";
135
135
+
};
136
136
+
"ui.cursor.primary.select" = {
137
137
+
fg = "base";
138
138
+
bg = "mauve";
139
139
+
};
140
140
+
141
141
+
# Underlines are gross
142
142
+
"ui.bufferline" = {
143
143
+
fg = "subtext0";
144
144
+
bg = "mantle";
145
145
+
modifiers = [ "dim" ];
146
146
+
};
147
147
+
"ui.bufferline.active" = {
148
148
+
fg = "text";
149
149
+
bg = "base";
150
150
+
modifiers = [ "bold" ];
151
151
+
};
152
152
+
153
153
+
# Mimick VS Code
154
154
+
"ui.virtual.inlay-hint" = {
155
155
+
fg = "overlay0";
156
156
+
bg = "base";
157
157
+
};
158
158
+
159
159
+
"ui.popup".fg = "rosewater";
160
160
+
"ui.popup.info".fg = "maroon";
161
161
+
"ui.help".fg = "maroon";
162
162
+
"ui.menu".fg = "text";
163
163
+
"ui.menu.selected" = {
164
164
+
fg = "maroon";
165
165
+
modifiers = [ "bold" ];
166
166
+
};
167
167
+
"ui.menu.scroll".fg = "maroon";
168
168
+
"ui.background".bg = ""; # Transparent
169
169
+
170
170
+
# Why the heck is it *blue*?;
171
171
+
"diff.delta" = "yellow";
172
172
+
173
173
+
# Maroon itself is already eye-catching enough, no need to italicize
174
174
+
"variable.parameter" = "maroon";
175
175
+
# Teal is wayyyyyy too obtrusive in Nix
176
176
+
"variable.other.member" = "subtext1";
177
177
+
"variable.builtin" = "peach";
178
178
+
179
179
+
# Fix ${} in Nix
180
180
+
"punctuation.special" = "maroon";
181
181
+
"operator" = "maroon";
182
182
+
};
183
183
+
};
184
184
+
};
185
185
+
}
-210
users/leah/programs/helix/default.nix
···
1
1
-
{
2
2
-
pkgs,
3
3
-
...
4
4
-
}:
5
5
-
{
6
6
-
hm.catppuccin.helix.enable = false;
7
7
-
8
8
-
hm.programs.helix = {
9
9
-
enable = true;
10
10
-
defaultEditor = true;
11
11
-
12
12
-
ignores = [
13
13
-
"flake.lock"
14
14
-
];
15
15
-
settings = {
16
16
-
theme = "catppuccin_mocha_plus";
17
17
-
18
18
-
editor = {
19
19
-
line-number = "relative";
20
20
-
bufferline = "multiple";
21
21
-
cursorline = true;
22
22
-
color-modes = true;
23
23
-
text-width = 100;
24
24
-
popup-border = "all";
25
25
-
rulers = [ 100 ];
26
26
-
27
27
-
end-of-line-diagnostics = "hint";
28
28
-
inline-diagnostics = {
29
29
-
cursor-line = "info";
30
30
-
other-lines = "error";
31
31
-
};
32
32
-
33
33
-
soft-wrap.enable = true;
34
34
-
35
35
-
cursor-shape = {
36
36
-
insert = "bar";
37
37
-
normal = "block";
38
38
-
select = "underline";
39
39
-
};
40
40
-
41
41
-
statusline = {
42
42
-
left = [
43
43
-
"mode"
44
44
-
"spacer"
45
45
-
"spinner"
46
46
-
];
47
47
-
right = [
48
48
-
"read-only-indicator"
49
49
-
"file-modification-indicator"
50
50
-
"file-name"
51
51
-
"separator"
52
52
-
"file-type"
53
53
-
"position-percentage"
54
54
-
"spacer"
55
55
-
"separator"
56
56
-
"position"
57
57
-
];
58
58
-
mode = {
59
59
-
normal = "NORMAL";
60
60
-
insert = "INSERT";
61
61
-
select = "VISUAL";
62
62
-
};
63
63
-
};
64
64
-
65
65
-
lsp = {
66
66
-
display-messages = true;
67
67
-
display-progress-messages = true;
68
68
-
display-inlay-hints = true;
69
69
-
};
70
70
-
71
71
-
auto-save = {
72
72
-
focus-lost = true; # Ghostty supports it :)
73
73
-
after-delay.enable = true;
74
74
-
};
75
75
-
76
76
-
whitespace.render = {
77
77
-
space = "none";
78
78
-
tab = "all";
79
79
-
};
80
80
-
81
81
-
indent-guides.render = true;
82
82
-
83
83
-
gutters.layout = [
84
84
-
"diff"
85
85
-
"diagnostics"
86
86
-
"line-numbers"
87
87
-
"spacer"
88
88
-
];
89
89
-
};
90
90
-
keys = {
91
91
-
normal = {
92
92
-
"C-s" = ":w";
93
93
-
"tab" = "move_parent_node_end";
94
94
-
"S-tab" = "move_parent_node_start";
95
95
-
"A-h" = "goto_previous_buffer";
96
96
-
"A-l" = "goto_next_buffer";
97
97
-
};
98
98
-
insert = {
99
99
-
"S-tab" = "move_parent_node_start";
100
100
-
};
101
101
-
select = {
102
102
-
"tab" = "move_parent_node_end";
103
103
-
"S-tab" = "move_parent_node_start";
104
104
-
};
105
105
-
};
106
106
-
};
107
107
-
themes.catppuccin_mocha_plus = {
108
108
-
inherits = "catppuccin_mocha";
109
109
-
110
110
-
"ui.statusline" = {
111
111
-
fg = "subtext0";
112
112
-
bg = "mantle";
113
113
-
};
114
114
-
"ui.statusline.normal" = {
115
115
-
fg = "mantle";
116
116
-
bg = "rosewater";
117
117
-
modifiers = [ "bold" ];
118
118
-
};
119
119
-
"ui.statusline.insert" = {
120
120
-
fg = "mantle";
121
121
-
bg = "maroon";
122
122
-
modifiers = [ "bold" ];
123
123
-
};
124
124
-
"ui.statusline.select" = {
125
125
-
fg = "mantle";
126
126
-
bg = "mauve";
127
127
-
modifiers = [ "bold" ];
128
128
-
};
129
129
-
130
130
-
"ui.cursor.primary.normal" = {
131
131
-
fg = "base";
132
132
-
bg = "rosewater";
133
133
-
};
134
134
-
"ui.cursor.primary.insert" = {
135
135
-
fg = "base";
136
136
-
bg = "maroon";
137
137
-
};
138
138
-
"ui.cursor.primary.select" = {
139
139
-
fg = "base";
140
140
-
bg = "mauve";
141
141
-
};
142
142
-
143
143
-
# Underlines are gross
144
144
-
"ui.bufferline" = {
145
145
-
fg = "subtext0";
146
146
-
bg = "mantle";
147
147
-
modifiers = [ "dim" ];
148
148
-
};
149
149
-
"ui.bufferline.active" = {
150
150
-
fg = "text";
151
151
-
bg = "base";
152
152
-
modifiers = [ "bold" ];
153
153
-
};
154
154
-
155
155
-
# Mimick VS Code
156
156
-
"ui.virtual.inlay-hint" = {
157
157
-
fg = "overlay0";
158
158
-
bg = "base";
159
159
-
};
160
160
-
161
161
-
"ui.popup".fg = "rosewater";
162
162
-
"ui.popup.info".fg = "maroon";
163
163
-
"ui.help".fg = "maroon";
164
164
-
"ui.menu".fg = "text";
165
165
-
"ui.menu.selected" = {
166
166
-
fg = "maroon";
167
167
-
modifiers = [ "bold" ];
168
168
-
};
169
169
-
"ui.menu.scroll".fg = "maroon";
170
170
-
"ui.background".bg = ""; # Transparent
171
171
-
172
172
-
# Why the heck is it *blue*?;
173
173
-
"diff.delta" = "yellow";
174
174
-
175
175
-
# Maroon itself is already eye-catching enough, no need to italicize
176
176
-
"variable.parameter" = "maroon";
177
177
-
# Teal is wayyyyyy too obtrusive in Nix
178
178
-
"variable.other.member" = "subtext1";
179
179
-
"variable.builtin" = "peach";
180
180
-
181
181
-
# Fix ${} in Nix
182
182
-
"punctuation.special" = "maroon";
183
183
-
"operator" = "maroon";
184
184
-
};
185
185
-
};
186
186
-
187
187
-
hm.home.packages = with pkgs; [
188
188
-
# Language servers
189
189
-
lua-language-server
190
190
-
nil
191
191
-
basedpyright
192
192
-
oxlint
193
193
-
ruff-lsp
194
194
-
typescript-language-server
195
195
-
vscode-langservers-extracted
196
196
-
zls
197
197
-
198
198
-
# Formatters
199
199
-
black
200
200
-
nixfmt-rfc-style
201
201
-
prettierd
202
202
-
shfmt
203
203
-
stylua
204
204
-
205
205
-
tree-sitter
206
206
-
];
207
207
-
# ++ (with pkgs.nodePackages_latest; [
208
208
-
# svelte-language-server
209
209
-
# ]);
210
210
-
}
-61
users/leah/programs/jj/default.nix
···
1
1
-
{ pkgs, config, ... }:
2
2
-
{
3
3
-
hm.programs.git.difftastic.enable = true;
4
4
-
5
5
-
hm.home.packages = with pkgs; [
6
6
-
watchman
7
7
-
meld
8
8
-
];
9
9
-
10
10
-
hm.programs.jujutsu = {
11
11
-
enable = true;
12
12
-
settings = {
13
13
-
user = {
14
14
-
name = config.roles.base.fullName;
15
15
-
email = "hi@pluie.me";
16
16
-
};
17
17
-
ui = {
18
18
-
default-command = ["log"];
19
19
-
diff.tool = [
20
20
-
"difft"
21
21
-
"--color=always"
22
22
-
"$left"
23
23
-
"$right"
24
24
-
];
25
25
-
pager = "moar -no-linenumbers";
26
26
-
diff-editor = "meld";
27
27
-
merge-editor = "meld";
28
28
-
log-word-wrap = true;
29
29
-
editor = "hx";
30
30
-
};
31
31
-
template-aliases = {
32
32
-
"format_short_id(id)" = ''id.shortest(12).prefix() ++ "[" ++ id.shortest(12).rest() ++ "]"'';
33
33
-
"format_timestamp(timestamp)" = "timestamp.ago()";
34
34
-
"format_short_signature(signature)" = "signature";
35
35
-
};
36
36
-
37
37
-
fix.tools = {
38
38
-
nixfmt = {
39
39
-
command = [ "nixfmt" ];
40
40
-
patterns = [ "glob:'**/*.nix'" ];
41
41
-
};
42
42
-
};
43
43
-
44
44
-
signing = {
45
45
-
behavior = "drop";
46
46
-
backend = "ssh";
47
47
-
key = config.roles.base.publicKey;
48
48
-
};
49
49
-
50
50
-
git = {
51
51
-
sign-on-push = true;
52
52
-
private-commits = "description(glob:'wip:*')";
53
53
-
};
54
54
-
55
55
-
core = {
56
56
-
fsmonitor = "watchman";
57
57
-
watchman.register-snapshot-trigger = true;
58
58
-
};
59
59
-
};
60
60
-
};
61
61
-
}
+40
users/leah/programs/steam.nix
···
1
1
+
{
2
2
+
config,
3
3
+
pkgs,
4
4
+
lib,
5
5
+
...
6
6
+
}:
7
7
+
let
8
8
+
# Helper script for running Steam games with
9
9
+
# a *reasonable* preset
10
10
+
steam-assist =
11
11
+
lib.optionalString config.hardware.nvidia.prime.offload.enable ''
12
12
+
export __NV_PRIME_RENDER_OFFLOAD=1
13
13
+
export __GLX_VENDOR_LIBRARY_NAME=nvidia
14
14
+
'' + ''
15
15
+
${lib.getExe' pkgs.gamemode "gamemoderun"} $@
16
16
+
'';
17
17
+
in
18
18
+
{
19
19
+
programs.gamemode.enable = true;
20
20
+
21
21
+
programs.steam = {
22
22
+
enable = true;
23
23
+
24
24
+
# Install Proton GE by default
25
25
+
extraCompatPackages = [ pkgs.proton-ge-bin ];
26
26
+
27
27
+
# Some native Linux games *assume* the distro has
28
28
+
# certain packages that may not be present on NixOS.
29
29
+
extraPackages = [
30
30
+
pkgs.ncurses6 # Crusader Kings III
31
31
+
];
32
32
+
33
33
+
protontricks.enable = true;
34
34
+
remotePlay.openFirewall = true;
35
35
+
};
36
36
+
37
37
+
hjem.users.leah.packages = [
38
38
+
(pkgs.writeShellScriptBin "steam-assist" steam-assist)
39
39
+
];
40
40
+
}
+81
users/leah/programs/vcs.nix
···
1
1
+
{
2
2
+
pkgs,
3
3
+
lib,
4
4
+
...
5
5
+
}:
6
6
+
{
7
7
+
hjem.users.leah.packages = with pkgs; [
8
8
+
jujutsu
9
9
+
difftastic
10
10
+
watchman
11
11
+
];
12
12
+
13
13
+
hjem.users.leah.ext.programs = {
14
14
+
git = {
15
15
+
enable = true;
16
16
+
settings = {
17
17
+
diff.external = "${lib.getExe pkgs.difftastic} --color auto --background light --display side-by-side";
18
18
+
19
19
+
init.defaultBranch = "main";
20
20
+
push.autoSetupRemote = true;
21
21
+
url."https://github.com/".insteadOf = "gh:";
22
22
+
gpg.format = "ssh";
23
23
+
24
24
+
user = {
25
25
+
name = "Leah Amelia Chen";
26
26
+
email = "hi@pluie.me";
27
27
+
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7uJGE2/25M4a3DIVxtnTA5INqWsFGw+49qHXaN/kqy";
28
28
+
};
29
29
+
};
30
30
+
};
31
31
+
32
32
+
jujutsu = {
33
33
+
enable = true;
34
34
+
settings = {
35
35
+
user = {
36
36
+
name = "Leah Amelia Chen";
37
37
+
email = "hi@pluie.me";
38
38
+
};
39
39
+
ui = {
40
40
+
default-command = [ "log" ];
41
41
+
diff.tool = [
42
42
+
"${lib.getExe pkgs.difftastic}"
43
43
+
"--color=always"
44
44
+
"$left"
45
45
+
"$right"
46
46
+
];
47
47
+
pager = "${lib.getExe pkgs.moar} -no-linenumbers";
48
48
+
log-word-wrap = true;
49
49
+
};
50
50
+
template-aliases = {
51
51
+
"format_short_id(id)" = ''id.shortest(12).prefix() ++ "[" ++ id.shortest(12).rest() ++ "]"'';
52
52
+
"format_timestamp(timestamp)" = "timestamp.ago()";
53
53
+
"format_short_signature(signature)" = "signature";
54
54
+
};
55
55
+
56
56
+
fix.tools = {
57
57
+
nixfmt = {
58
58
+
command = [ "nixfmt" ];
59
59
+
patterns = [ "glob:'**/*.nix'" ];
60
60
+
};
61
61
+
};
62
62
+
63
63
+
signing = {
64
64
+
behavior = "drop";
65
65
+
backend = "ssh";
66
66
+
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7uJGE2/25M4a3DIVxtnTA5INqWsFGw+49qHXaN/kqy";
67
67
+
};
68
68
+
69
69
+
git = {
70
70
+
sign-on-push = true;
71
71
+
private-commits = "description(glob:'wip:*')";
72
72
+
};
73
73
+
74
74
+
core = {
75
75
+
fsmonitor = "watchman";
76
76
+
watchman.register-snapshot-trigger = true;
77
77
+
};
78
78
+
};
79
79
+
};
80
80
+
};
81
81
+
}