-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
16786 lines (15250 loc) · 587 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2024-12-31 Di 21:56 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SwarselSystems: NixOS + Emacs Configuration</title>
<meta name="author" content="Leon Schwarzäugl" />
<meta name="generator" content="Org Mode" />
<style type="text/css">
#content { max-width: 60em; margin: auto; }
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #e6e6e6;
border-radius: 3px;
background-color: #f2f2f2;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: auto;
}
pre.src:before {
display: none;
position: absolute;
top: -8px;
right: 12px;
padding: 3px;
color: #555;
background-color: #f2f2f299;
}
pre.src:hover:before { display: inline; margin-top: 14px;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-authinfo::before { content: 'Authinfo'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
display: table;
text-align: center;
width: 100%;
}
.equation {
vertical-align: middle;
}
.equation-label {
display: table-cell;
text-align: right;
vertical-align: middle;
}
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { }
</style>
</head>
<body>
<div id="content" class="content">
<h1 class="title">SwarselSystems: NixOS + Emacs Configuration</h1>
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#h:a86fe971-f169-4052-aacf-15e0f267c6cd">1. Introduction (no code)</a></li>
<li><a href="#h:c7588c0d-2528-485d-b2df-04d6336428d7">2. flake.nix</a>
<ul>
<li><a href="#h:aee5ec75-7ca6-40d8-b6ac-a3e7e33a474b">2.1. flake.nix skeleton</a></li>
<li><a href="#h:8a411ee2-a58e-4b5b-99bd-4ba772f8f0a2">2.2. Inputs</a></li>
<li><a href="#h:df0072bc-853f-438f-bd85-bfc869501015">2.3. let</a></li>
<li><a href="#h:54cd8f65-a3ba-43c3-ae37-5f04383fe720">2.4. General (outputs)</a></li>
<li><a href="#h:cbd5002c-e0fa-434a-951b-e05b179e4e3f">2.5. Pre-commit-hooks (Checks)</a></li>
<li><a href="#org8c1f77d">2.6. Templates</a></li>
<li><a href="#h:9c9b9e3b-8771-44fa-ba9e-5056ae809655">2.7. nixosConfigurations</a></li>
<li><a href="#h:f881aa05-a670-48dd-a57b-2916abdcb692">2.8. darwinConfigurations</a></li>
<li><a href="#h:f881aa05-a670-48dd-a57b-2916abdcb692">2.9. homeConfigurations</a></li>
<li><a href="#h:5f6ef553-59f9-4239-b6f3-63d33b57f335">2.10. nixOnDroidConfigurations</a></li>
<li><a href="#h:1337e267-bca3-4c65-863f-9f44b753dee4">2.11. topologyConfigurations</a></li>
</ul>
</li>
<li><a href="#h:02cd20be-1ffa-4904-9d5a-da5a89ba1421">3. System</a>
<ul>
<li><a href="#h:88bf4b90-e94b-46fb-aaf1-a381a512860d">3.1. System specific configuration</a>
<ul>
<li><a href="#h:373bd9e8-616e-434e-bfab-c216ce4470e9">3.1.1. Template</a>
<ul>
<li><a href="#h:859aec97-65a2-4633-b7d8-73d4ccf89cc5">3.1.1.1. Main Configuration</a></li>
<li><a href="#h:24757d1e-6e88-4843-ab20-5e0c1b7ae29e">3.1.1.2. disko</a></li>
</ul>
</li>
<li><a href="#h:58dc6384-0d19-4f71-9043-4014bd033ba2">3.1.2. Physical hosts</a>
<ul>
<li><a href="#h:6c6e9261-dfa1-42d8-ab2a-8b7c227be6d9">3.1.2.1. nbl-imba-2 (Framework Laptop 16)</a>
<ul>
<li><a href="#h:567c0055-f5f7-4e53-8f13-d767d7166e9d">3.1.2.1.1. Main Configuration</a></li>
<li><a href="#h:25115a54-c634-4896-9a41-254064ce9fcc">3.1.2.1.2. hardware-configuration</a></li>
<li><a href="#h:e0da04c7-4199-44b0-b525-6cfc64072b45">3.1.2.1.3. disko</a></li>
</ul>
</li>
<li><a href="#h:932ef6b0-4c14-4200-8e3f-2e208e748746">3.1.2.2. Winters (Server)</a>
<ul>
<li><a href="#h:8ad68406-4a75-45ba-97ad-4c310b921124">3.1.2.2.1. Main Configuration</a></li>
<li><a href="#h:0fdefb4f-ce53-4caf-89ed-5d79646f70f0">3.1.2.2.2. hardware-configuration</a></li>
</ul>
</li>
<li><a href="#h:28e1a7eb-356b-4015-83f7-9c552c8c0e9d">3.1.2.3. nbm-imba-166 (MacBook Pro)</a></li>
<li><a href="#h:729af373-37e7-4379-9a3d-b09792219415">3.1.2.4. Magicant (Phone)</a></li>
</ul>
</li>
<li><a href="#h:4dc59747-9598-4029-aa7d-92bf186d6c06">3.1.3. Virtual hosts</a>
<ul>
<li><a href="#h:4c5febb0-fdf6-44c5-8d51-7ea0f8930abf">3.1.3.1. Sync (OCI)</a></li>
</ul>
</li>
<li><a href="#h:89ce533d-4856-4988-b456-0951d4453db8">3.1.4. Utility hosts</a>
<ul>
<li><a href="#h:6b495f0e-fc11-44c8-a9e8-83f3d95c8857">3.1.4.1. Toto (Physical/VM)</a>
<ul>
<li><a href="#h:4e53b40b-98b2-4615-b1b0-3696a75edd6e">3.1.4.1.1. Main Configuration</a></li>
<li><a href="#h:cec82b06-39ca-4c0e-b4f5-c1fda9b14e6d">3.1.4.1.2. disko</a></li>
</ul>
</li>
<li><a href="#h:8583371d-5d47-468b-84ba-210aad7e2c90">3.1.4.2. drugstore (ISO)</a></li>
<li><a href="#h:7056b9a0-f38b-4bca-b2ba-ab34e2d73493">3.1.4.3. Home-manager only (default non-NixOS)</a></li>
<li><a href="#h:e1498bef-ec67-483d-bf02-76264e30be8e">3.1.4.4. ChaosTheatre (Demo Physical/VM)</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#h:ab272ab4-3c93-48b1-8f1e-f710aa9aae5d">3.2. Additions and modifications</a>
<ul>
<li><a href="#h:64a5cc16-6b16-4802-b421-c67ccef853e1">3.2.1. Packages</a>
<ul>
<li><a href="#h:4fce458d-7c9c-4bcd-bd90-76b745fe5ce3">3.2.1.1. pass-fuzzel</a></li>
<li><a href="#h:799579f3-ddd3-4f76-928a-a8c665980476">3.2.1.2. cura5</a></li>
<li><a href="#h:e6612cff-0804-47ef-9f2b-d2cc6d81a896">3.2.1.3. hm-specialisation</a></li>
<li><a href="#h:73b14c7a-5444-4fed-b7ac-d65542cdeda3">3.2.1.4. cdw</a></li>
<li><a href="#h:5ad99997-e54c-4f0b-9ab7-15f76b1e16e1">3.2.1.5. cdb</a></li>
<li><a href="#h:03b1b77b-3ca8-4a8f-8e28-9f29004d96d3">3.2.1.6. bak</a></li>
<li><a href="#h:3c72d263-411c-44f0-90ff-55f14d4d9d49">3.2.1.7. timer</a></li>
<li><a href="#h:1834df06-9238-4efa-9af6-851dafe66c68">3.2.1.8. e</a></li>
<li><a href="#h:10268005-a9cd-4a00-967c-cbe975c552fa">3.2.1.9. command-not-found</a></li>
<li><a href="#h:82f4f414-749b-4d5a-aaaa-6e3ec15fbc3d">3.2.1.10. swarselcheck</a></li>
<li><a href="#h:f93f66f9-6b8b-478e-b139-b2f382c1f25e">3.2.1.11. waybarupdate</a></li>
<li><a href="#h:a1d94db2-837a-40c4-bbd8-81ce847440ee">3.2.1.12. opacitytoggle</a></li>
<li><a href="#h:7c4e41b3-8c1e-4f71-87a6-30d40baed6a0">3.2.1.13. fs-diff</a></li>
<li><a href="#h:4d864147-f9ef-46da-9b4f-4e7996a65157">3.2.1.14. update-checker</a></li>
<li><a href="#h:a9398c4e-4d3b-4942-b03c-192f9c0517e5">3.2.1.15. github-notifications</a></li>
<li><a href="#h:960e539c-2a5a-4e21-b3d4-bcdfc8be8fda">3.2.1.16. screenshare</a></li>
<li><a href="#h:74db57ae-0bb9-4257-84be-eddbc85130dd">3.2.1.17. swarsel-bootstrap</a></li>
<li><a href="#h:1eabdc59-8832-44ca-a22b-11f848ab150a">3.2.1.18. swarsel-rebuild</a></li>
<li><a href="#h:fbd8aaf2-9dca-4ca3-aca1-19d0d188a435">3.2.1.19. swarsel-install</a></li>
<li><a href="#h:c98a7615-e5da-4f47-8ed1-2b2ea65519e9">3.2.1.20. swarsel-postinstall</a></li>
<li><a href="#h:5ad99997-e54c-4f0b-9ab7-15f76b1e16e1">3.2.1.21. t2ts</a></li>
<li><a href="#h:5ad99997-e54c-4f0b-9ab7-15f76b1e16e1">3.2.1.22. ts2t</a></li>
<li><a href="#h:7806b129-a4a5-4d10-af27-6cbeafbcb294">3.2.1.23. vershell</a></li>
<li><a href="#h:9fda7829-09a4-4b8f-86f6-08b078ab2874">3.2.1.24. eontimer</a></li>
<li><a href="#org56f9a91">3.2.1.25. project</a></li>
</ul>
</li>
<li><a href="#h:5e3e21e0-57af-4dad-b32f-6400af9b7aab">3.2.2. Overlays (additions, overrides, nixpkgs-stable)</a></li>
<li><a href="#h:f0f1c961-3e7a-47b8-99ab-1654bb45dffc">3.2.3. Modules</a>
<ul>
<li><a href="#h:14e68518-8ec7-48ec-b208-0e3d6d49954d">3.2.3.1. NixOS</a>
<ul>
<li><a href="#h:bd7517c6-0e0a-4063-bc81-e62cd24e7170">3.2.3.1.1. Wallpaper</a></li>
<li><a href="#h:c6a138ff-f07f-4cae-95b9-b6daa2b11463">3.2.3.1.2. Hardware</a></li>
<li><a href="#h:f4f22166-e345-43e6-b15f-b7f5bb886554">3.2.3.1.3. Setup</a></li>
<li><a href="#h:d10f8aaf-2f71-4e80-ba05-37bfc98c99b6">3.2.3.1.4. Server</a></li>
<li><a href="#h:45188d3c-9910-480b-beec-d5fd713b05fb">3.2.3.1.5. Input</a></li>
</ul>
</li>
<li><a href="#h:ced5841f-c088-4d88-b3a1-7d62aad8837b">3.2.3.2. home-manager</a>
<ul>
<li><a href="#h:ec08cd7e-4a9a-419f-a0a7-6cc4576302a1">3.2.3.2.1. Laptop</a></li>
<li><a href="#h:5f0bf0e2-a096-4b07-affb-6beba7786fab">3.2.3.2.2. Hardware</a></li>
<li><a href="#h:a9530c81-1976-442b-b597-0b4bed6baf25">3.2.3.2.3. Waybar</a></li>
<li><a href="#h:dfd5c190-f213-45e1-b17c-e650b7b94b38">3.2.3.2.4. Monitors</a></li>
<li><a href="#h:880df388-4050-4955-9663-9c1c197f5ae9">3.2.3.2.5. Input</a></li>
<li><a href="#h:e4a9e96f-ff9f-4fc2-8fc0-9913e03bd568">3.2.3.2.6. Nixos</a></li>
<li><a href="#h:79f7150f-b162-4f57-abdf-07f40dffd932">3.2.3.2.7. darwin</a></li>
<li><a href="#h:0809445e-9a24-4700-8675-03fb8f4beab8">3.2.3.2.8. System startup</a></li>
<li><a href="#h:21e344a8-8212-463f-9c01-7dbca28515b6">3.2.3.2.9. Wallpaper</a></li>
<li><a href="#h:c4982d06-1962-439c-9eed-cdec52491dee">3.2.3.2.10. Filesystem</a></li>
<li><a href="#h:e7f98ad8-74a6-4860-a368-cce154285ff0">3.2.3.2.11. firefox</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#h:4d38c9f7-2680-4c02-a1f4-ed8db0d55ce4">3.2.4. Library functions</a></li>
</ul>
</li>
<li><a href="#h:6da812f5-358c-49cb-aff2-0a94f20d70b3">3.3. NixOS</a>
<ul>
<li><a href="#h:1c1250cd-e9b4-4715-8d9f-eb09e64bfc7f">3.3.1. Common</a>
<ul>
<li><a href="#h:4acbe063-188b-42e7-b75c-b6d2e232e784">3.3.1.1. Imports, non-server settings</a></li>
<li><a href="#h:24c9146f-2147-4fd5-bafc-d5853e15cf12">3.3.1.2. General NixOS settings (stateVersion)</a></li>
<li><a href="#h:0e7e8bea-ec58-499c-9731-09dddfc39532">3.3.1.3. System Packages</a></li>
<li><a href="#h:7f6d6908-4d02-4907-9c70-f802f4358520">3.3.1.4. Setup home-manager</a></li>
<li><a href="#h:7248f338-8cad-4443-9060-deae7955b26f">3.3.1.5. Setup login keymap</a></li>
<li><a href="#h:48959890-fbc7-4d28-b33c-f33e028ab473">3.3.1.6. User setup, Make users non-mutable</a></li>
<li><a href="#h:f4006367-0965-4b4f-a3b0-45f63b07d2b8">3.3.1.7. Environment setup</a></li>
<li><a href="#h:e2d40df9-0026-4caa-8476-9dc2353055a1">3.3.1.8. Security</a></li>
<li><a href="#h:9a3b7f1f-d0c3-417e-a262-c920fb25f3ee">3.3.1.9. Enable automatic garbage collection</a></li>
<li><a href="#h:97a2b9f7-c835-4db8-a0e9-e923bab69ee8">3.3.1.10. Enable automatic store optimisation</a></li>
<li><a href="#h:12858442-c129-4aa1-9c9c-a0916e36b302">3.3.1.11. Reduce systemd timeouts</a></li>
<li><a href="#h:1fa7cf61-5c03-43a3-a7f0-3d6ee246b31b">3.3.1.12. Hardware settings</a></li>
<li><a href="#h:aa433f5e-a455-4414-b76b-0a2692fa06aa">3.3.1.13. Pipewire</a></li>
<li><a href="#h:7d696b64-debe-4a95-80b5-1e510156a6c6">3.3.1.14. Common network settings</a></li>
<li><a href="#h:852d59ab-63c3-4831-993d-b5e23b877796">3.3.1.15. Time, locale settings</a></li>
<li><a href="#h:d87d80fd-2ac7-4f29-b338-0518d06b4deb">3.3.1.16. sops</a></li>
<li><a href="#h:e6e44705-94af-49fe-9ca0-0629d0f7d932">3.3.1.17. Theme (stylix)</a></li>
<li><a href="#h:2bbf5f31-246d-4738-925f-eca40681f7b6">3.3.1.18. Programs (including zsh setup)</a>
<ul>
<li><a href="#h:7daa06ff-d3b0-4491-97ce-770b749c52f9">3.3.1.18.1. zsh</a></li>
<li><a href="#h:1e6d3d56-e415-43a2-8e80-3bad8062ecf8">3.3.1.18.2. syncthing</a></li>
</ul>
</li>
<li><a href="#h:79f3258f-ed9d-434d-b50a-e58d57ade2a7">3.3.1.19. Services</a>
<ul>
<li><a href="#h:b91df05b-113d-4d09-93d1-b271e5b76810">3.3.1.19.1. blueman</a></li>
<li><a href="#h:73ed28cb-2f82-47b2-8bc5-208278b55788">3.3.1.19.2. Network devices</a>
<ul>
<li><a href="#h:fae5939e-22ac-4532-a10e-0b86013d20ce">3.3.1.19.2.1. Scanners</a></li>
<li><a href="#h:8c13df62-c6d9-4a0a-83be-d77e71628f0b">3.3.1.19.2.2. Printers</a></li>
<li><a href="#h:80decee9-9151-4892-967e-73d103205770">3.3.1.19.2.3. Avahi (device discovery)</a></li>
</ul>
</li>
<li><a href="#h:f101daa2-604d-4553-99e2-f64b9c207f51">3.3.1.19.3. enable GVfs</a></li>
<li><a href="#h:08d213d5-a9f4-4309-8635-ba557b01dc7d">3.3.1.19.4. interception-tools: Make CAPS work as ESC/CTRL</a></li>
<li><a href="#h:82fbba41-3a46-4db7-aade-49e4c23fc475">3.3.1.19.5. power-profiles-daemon</a></li>
</ul>
</li>
<li><a href="#h:7a89b5e3-b700-4167-8b14-2b8172f33936">3.3.1.20. Hardware compatibility settings (Yubikey, Ledger, Keyboards) - udev rules</a></li>
<li><a href="#h:eae45839-223a-4027-bce3-e26e092c9096">3.3.1.21. System Login</a></li>
<li><a href="#h:404cc18b-b5f8-48d9-a407-a0fd70d57f46">3.3.1.22. nix-ld</a></li>
<li><a href="#h:e7668594-fa8b-4d36-a695-a58222478988">3.3.1.23. Impermanence</a></li>
<li><a href="#h:b751d77d-246c-4bd6-b689-3467d82bf9c3">3.3.1.24. Summary of nixos-rebuild diff</a></li>
<li><a href="#h:ce50eb90-8bf4-4203-b502-c3165d2fbf1f">3.3.1.25. gnome-keyring</a></li>
<li><a href="#h:f78ffdd3-232b-4313-bd89-d6fb331fef22">3.3.1.26. Sway</a></li>
<li><a href="#h:872d5f46-2ffd-4076-9a2c-98783dd29434">3.3.1.27. xdg-portal</a></li>
<li><a href="#h:d33c93f5-0ac8-44e5-8756-02dc0e6975e4">3.3.1.28. safeeyes</a></li>
<li><a href="#h:1bef3914-a258-4585-b232-e0fbe9e7a9b5">3.3.1.29. Podmam (distrobox)</a></li>
<li><a href="#h:a5a0d84e-c7b3-4164-a4c7-2e2d8ada69cd">3.3.1.30. Handle lid switch correctly</a></li>
<li><a href="#h:adf894d7-b3c6-4b8b-b13f-c28b3a5e1e17">3.3.1.31. Low battery notification</a></li>
<li><a href="#h:d9a89071-b3ba-44d1-b5e0-e9ca6270d377">3.3.1.32. Lanzaboote</a></li>
</ul>
</li>
<li><a href="#h:e492c24a-83a0-4bcb-a084-706f49318651">3.3.2. Server</a>
<ul>
<li><a href="#h:4e64e564-b7cb-469f-bd79-cd3efb3caa62">3.3.2.1. Imports</a></li>
<li><a href="#h:dc365e83-f6c8-4d05-a390-b5f2d01649b4">3.3.2.2. General NixOS Server settings</a></li>
<li><a href="#h:6f2967d9-7e32-4605-bb5c-5e27770bec0f">3.3.2.3. System Packages</a></li>
<li><a href="#h:313f7940-e8bb-4b5d-97cb-e2fea4e665e4">3.3.2.4. sops</a></li>
<li><a href="#h:d6840d31-110c-465f-93fa-0306f755de28">3.3.2.5. nfs/samba (smb)</a></li>
<li><a href="#h:302468d2-106a-41c8-b2bc-9fdc40064a9c">3.3.2.6. NGINX</a></li>
<li><a href="#h:f3db197d-1d03-4bf8-b59f-f9891b358f0b">3.3.2.7. ssh</a></li>
<li><a href="#h:d33f5982-dfe6-42d0-9cf2-2cd8c7b04295">3.3.2.8. kavita</a></li>
<li><a href="#h:e0d4c16e-ab64-48ac-9734-1ab62953ad4b">3.3.2.9. jellyfin</a></li>
<li><a href="#h:f347f3ad-5100-4c4f-8616-cfd7f8e14a72">3.3.2.10. navidrome</a></li>
<li><a href="#h:ec9c5a7d-ea8b-46d5-809c-163c917f5c41">3.3.2.11. spotifyd</a></li>
<li><a href="#h:baa4149b-3788-4b05-87ec-0ee9d0726117">3.3.2.12. mpd</a></li>
<li><a href="#h:ce6a4371-e44f-419a-be9e-e17c7abdaf3a">3.3.2.13. pipewire</a></li>
<li><a href="#h:1e68d84a-8f99-422f-89ac-78f664ac0013">3.3.2.14. matrix</a></li>
<li><a href="#h:d11ad8d5-25d7-4691-b319-61c16ccef715">3.3.2.15. nextcloud</a></li>
<li><a href="#h:33bad8ad-b362-4bf1-8a49-b9df92329aed">3.3.2.16. immich</a></li>
<li><a href="#h:89638fb5-0593-4420-9567-f85f0223e341">3.3.2.17. paperless</a></li>
<li><a href="#h:5afeb311-ab86-4029-be53-2160f6d836c3">3.3.2.18. transmission</a></li>
<li><a href="#h:ad2787a2-7b1c-4326-aeff-9d8d6c3f591d">3.3.2.19. syncthing</a></li>
<li><a href="#h:b73ac8bf-b721-4563-9eff-973925c99a39">3.3.2.20. restic</a></li>
<li><a href="#h:a31c7192-e11d-4a26-915d-1bbc38e373d3">3.3.2.21. monitoring</a></li>
<li><a href="#h:23452a18-a0a1-4515-8612-ceb19bb5fc22">3.3.2.22. Jenkins</a></li>
<li><a href="#h:4e6824bc-c3db-485d-b543-4072e6283b62">3.3.2.23. Emacs elfeed (RSS Server)</a></li>
<li><a href="#h:9da3df74-6fc5-4ee1-a345-23ab4e8a613d">3.3.2.24. FreshRSS</a></li>
<li><a href="#h:a9965660-4358-4b9a-8c46-d55f28598344">3.3.2.25. forgejo (git server)</a></li>
<li><a href="#h:cb3f6552-7751-4f9a-b4c7-8d8ba5b255c4">3.3.2.26. Anki Sync Server</a></li>
</ul>
</li>
<li><a href="#h:ac0cd8b3-06cf-4dca-ba73-6100c8fedb47">3.3.3. Darwin</a>
<ul>
<li><a href="#h:25a95a30-8e4f-4fe3-9b8e-508a82e0a1b4">3.3.3.1. Imports</a></li>
</ul>
</li>
<li><a href="#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589">3.3.4. Optional</a>
<ul>
<li><a href="#h:fb3f3e01-7df4-4b06-9e91-aa9cac61a431">3.3.4.1. gaming</a></li>
<li><a href="#h:b3523246-14e9-4284-ba22-cebc5ca36732">3.3.4.2. VirtualBox</a></li>
<li><a href="#h:34db28fb-62f7-4597-a9ff-0de2991a8415">3.3.4.3. VmWare</a></li>
<li><a href="#h:fa8d9ec4-3e22-458a-9239-859cffe7f55c">3.3.4.4. Auto-login</a></li>
<li><a href="#h:5c41c4ee-22ca-405b-9e4f-cc4051634edd">3.3.4.5. nswitch-rcm</a></li>
<li><a href="#h:bbf2ecb6-c8ff-4462-b5d5-d45b28604ddf">3.3.4.6. work</a></li>
<li><a href="#h:3fc1d301-7bae-4678-9085-d12c23eed8ac">3.3.4.7. Minimal Install</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#h:08ded95b-9c43-475d-a0b2-fc088a512287">3.4. Home-manager</a>
<ul>
<li><a href="#h:f0a6b5e0-2157-4522-b5e1-3f0abd91c05e">3.4.1. Common</a>
<ul>
<li><a href="#h:16fd2e85-fdd4-440a-81f0-65b9b098a43a">3.4.1.1. Imports</a></li>
<li><a href="#h:4af4f67f-7c48-4754-b4bd-6800e3a66664">3.4.1.2. General home-manager-settings</a></li>
<li><a href="#h:893a7f33-7715-415b-a895-2687ded31c18">3.4.1.3. Installed packages</a>
<ul>
<li><a href="#h:6ef9bb5f-c5ee-496e-86e2-d8d271a34d75">3.4.1.3.1. Packaged</a></li>
<li><a href="#h:96cbea91-ff13-4120-b8a9-496b2fa96e70">3.4.1.3.2. Self-defined</a></li>
</ul>
</li>
<li><a href="#h:d87d80fd-2ac7-4f29-b338-0518d06b4deb">3.4.1.4. sops</a></li>
<li><a href="#h:edd6720e-1f90-40bf-b6f9-30a19d4cae08">3.4.1.5. SSH Machines</a></li>
<li><a href="#h:a92318cd-413e-4e78-a478-e63b09df019c">3.4.1.6. Theme (stylix)</a></li>
<li><a href="#h:867556e6-5a24-4c43-9d47-3edca2f16488">3.4.1.7. Desktop Entries, MIME types (xdg)</a></li>
<li><a href="#h:5ef03803-e150-41bc-b603-e80d60d96efc">3.4.1.8. Linking dotfiles (Symlinks home.file)</a></li>
<li><a href="#h:4486b02f-4fb8-432b-bfa2-2e786206341d">3.4.1.9. Sourcing environment variables</a></li>
<li><a href="#h:f0e0b580-2e1c-4ca6-a983-f05d3ebbbcde">3.4.1.10. General Programs: bottom, imv, sioyek, bat, carapace, wlogout, swayr, yt-dlp, mpv, jq, nix-index, ripgrep, pandoc, fzf</a></li>
<li><a href="#h:64dbbb9e-8097-4c1b-813c-8c10cf9b9748">3.4.1.11. nix-index</a></li>
<li><a href="#h:ac0e5e62-0dbf-4782-9a96-9e558eae86ae">3.4.1.12. password-store</a></li>
<li><a href="#h:1ab84307-b3fb-4c32-9def-4b89a53a8547">3.4.1.13. direnv</a></li>
<li><a href="#h:1bd6b0c7-f201-43e2-9624-6c50de00a1f6">3.4.1.14. eza</a></li>
<li><a href="#h:419675ec-3310-438e-80ae-9eaa798a319d">3.4.1.15. git</a></li>
<li><a href="#h:069cabf3-df14-49ba-8d17-75f2bcf34fbf">3.4.1.16. Fuzzel</a></li>
<li><a href="#h:55212502-c8f6-43af-ae99-55c8377ef34e">3.4.1.17. Starship</a></li>
<li><a href="#h:5f1287db-d2e8-49aa-8c58-730129c7795c">3.4.1.18. Kitty</a></li>
<li><a href="#h:91dd4cc4-aada-4e74-be23-0cc69ed85af5">3.4.1.19. zsh</a></li>
<li><a href="#h:00de4901-631c-4b4c-86ce-d9d6e62ed8c7">3.4.1.20. zellij</a></li>
<li><a href="#h:45de9430-f925-4df6-9db6-bffb5b8f1604">3.4.1.21. tmux</a></li>
<li><a href="#h:506d01fc-c20b-473a-ac78-bce4b53fe0e3">3.4.1.22. Mail</a></li>
<li><a href="#h:c05d1b64-7110-4151-b436-46bc447113b4">3.4.1.23. Home-manager: Emacs</a></li>
<li><a href="#h:0bf51f63-01c0-4053-a591-7f0c5697c690">3.4.1.24. Waybar</a></li>
<li><a href="#h:fbec0bd4-690b-4f79-8b2b-a40263760a96">3.4.1.25. Firefox</a></li>
<li><a href="#h:387c3a82-1fb1-4c0f-8051-874e2acb8804">3.4.1.26. Services</a>
<ul>
<li><a href="#h:cb812c8a-247c-4ce5-a00c-59332c2f5fb9">3.4.1.26.1. gnome-keyring</a></li>
<li><a href="#h:be6afd89-9e1e-40b6-8542-5c07a0ab780d">3.4.1.26.2. KDE Connect</a></li>
<li><a href="#h:99d05729-df35-4958-9940-3319d6a41359">3.4.1.26.3. Mako</a></li>
<li><a href="#h:1598c90b-f195-41a0-9132-94612edf3586">3.4.1.26.4. yubikey-touch-detector</a></li>
</ul>
</li>
<li><a href="#h:02df9dfc-d1af-4a37-a7a0-d8da0af96a20">3.4.1.27. Sway</a></li>
<li><a href="#h:7d384e3b-1be7-4644-b304-ada4af0b692b">3.4.1.28. gpg-agent</a></li>
<li><a href="#h:74e236be-a977-4d38-b8c5-0b9feef8af91">3.4.1.29. gammastep</a></li>
</ul>
</li>
<li><a href="#h:b1a00339-6e9b-4ae4-b5dc-6fd5669a2ddb">3.4.2. Server</a>
<ul>
<li><a href="#h:7b4ee01a-b505-47da-8fb9-0b41285d0eab">3.4.2.1. Imports</a></li>
<li><a href="#h:9fac0904-b615-4d9d-9bae-54a6691999c3">3.4.2.2. Linking dotfiles</a></li>
</ul>
</li>
<li><a href="#h:e0536bff-2552-4ac4-a34a-a23937a2c30f">3.4.3. Darwin</a>
<ul>
<li><a href="#h:cff37bdf-4f22-419a-af4e-2665ede9add0">3.4.3.1. Imports</a></li>
</ul>
</li>
<li><a href="#h:be623200-557e-4bb7-bb11-1ec5d76c6b8b">3.4.4. Optional</a>
<ul>
<li><a href="#h:84fd7029-ecb6-4131-9333-289982f24ffa">3.4.4.1. Gaming</a></li>
<li><a href="#h:f0b2ea93-94c8-48d8-8d47-6fe58f58e0e6">3.4.4.2. Work</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#h:ed4cd05c-0879-41c6-bc39-3f1246a96f04">4. Emacs</a>
<ul>
<li><a href="#h:2c331451-45ed-4592-9e00-d36b5bf31248">4.1. Initialization (early-init.el)</a>
<ul>
<li><a href="#h:38e03b65-9dfc-4547-b27d-236664d7dc15">4.1.1. Increase startup performance</a></li>
<li><a href="#h:782b3632-afb2-4c67-8c46-ff94408aef5d">4.1.2. Setup frames</a></li>
<li><a href="#h:396c47f2-7e2f-4fad-ae71-6483bf7e3e42">4.1.3. Make C-i, C-m, C-[ available in graphic sessions</a></li>
</ul>
</li>
<li><a href="#h:601ba407-b906-4869-8ef6-67a9fc285fba">4.2. Personal settings</a>
<ul>
<li><a href="#h:b7b5976a-db2b-493d-8794-1924a0e12aec">4.2.1. Custom functions</a>
<ul>
<li><a href="#h:b715d7cf-da09-4e0c-95bc-8281b4f3ce9c">4.2.1.1. Emacs/Evil state toggle</a></li>
<li><a href="#h:1e0ee570-e509-4ecb-a3af-b75543731bb0">4.2.1.2. Switching to last used buffer</a></li>
<li><a href="#h:34506761-06b9-43b5-a818-506d9b3faf28">4.2.1.3. mu4e functions</a></li>
<li><a href="#h:4b9d74ef-0376-45bb-bc15-d24a04ca7e81">4.2.1.4. Create non-existant directories when finding file</a></li>
<li><a href="#h:91e2f45f-54fa-4b60-8758-b2ef9b439af7">4.2.1.5. [crux] Duplicate Lines</a></li>
<li><a href="#h:4819720a-9220-4c34-b903-ed4179f3ad1c">4.2.1.6. [prot] org-id-headings</a></li>
<li><a href="#h:285e5c0a-875d-46a8-bb9b-0222b3d73878">4.2.1.7. Inhibit Messages in Echo Area</a></li>
<li><a href="#h:de249f2a-6a2b-4114-8046-09d1014a7391">4.2.1.8. Move up one directory for find-file</a></li>
<li><a href="#h:06b77d28-3fd5-4554-8c7d-32c1b0ec8da5">4.2.1.9. org-mode: General setup</a></li>
<li><a href="#h:fa710375-2efe-49b4-af6a-a875aca6e4a2">4.2.1.10. org-mode: Visual-fill column</a></li>
<li><a href="#h:59d4306e-9b73-4b2c-b039-6a6518c357fc">4.2.1.11. org-mode: Upon-save actions (Auto-tangle, export to html, formatting)</a></li>
<li><a href="#h:dfa66e78-5748-45e3-a975-db3da104bb3a">4.2.1.12. org-mode: Fold current heading</a></li>
<li><a href="#h:a1802f9b-bb71-4fd5-86fa-945da18e8b81">4.2.1.13. corfu: Do not interrupt navigation</a></li>
<li><a href="#h:79288251-3b8d-4bc4-ae2c-448fce709fbd">4.2.1.14. Nix common prefix bracketer</a></li>
<li><a href="#h:a6b9dd66-571b-4916-8793-65b6a17afd76">4.2.1.15. Nix formatters</a></li>
<li><a href="#h:3c436647-71e6-441c-b452-d817ad2f8331">4.2.1.16. Disable garbace collection while minibuffer is active</a></li>
</ul>
</li>
<li><a href="#h:2b827c27-0de7-45ed-9d9e-6c511e2c6bb5">4.2.2. Custom Keybindings</a></li>
<li><a href="#h:07951589-54ba-4e3e-bd7b-4106cd22ff6a">4.2.3. Directory setup / File structure</a></li>
<li><a href="#h:0cf30b76-91d9-41da-a10b-74199bc36d40">4.2.4. Unclutter .emacs.d</a></li>
<li><a href="#h:329f529a-ef9f-4787-b311-1c485e05b754">4.2.5. Move backup files to another location</a></li>
</ul>
</li>
<li><a href="#h:786b447d-03ad-4c1d-b114-c37caa2d591c">4.3. General init.el setup + UI</a>
<ul>
<li><a href="#h:76a5bd78-a20d-4068-bea8-a38fdb26428e">4.3.1. General setup</a></li>
<li><a href="#h:0debe8fd-b319-4ab7-a92c-784fa7896b75">4.3.2. Mark all themes as safe</a></li>
<li><a href="#h:b587e869-9911-443b-bc6d-8fb3ce31908d">4.3.3. Show less compilation warnings</a></li>
<li><a href="#h:1667913c-2272-4010-bf3a-356455b97c83">4.3.4. Better garbage collection</a></li>
<li><a href="#h:6527b3ce-b76d-431a-9960-a57da7c53e1b">4.3.5. Indentation</a></li>
<li><a href="#h:3dc9fb1d-cd16-4bd0-a9ac-55a944415a90">4.3.6. Scrolling</a></li>
<li><a href="#h:5bf9f014-ee96-42da-b285-7b34f04e6bb1">4.3.7. Evil</a>
<ul>
<li><a href="#h:218376e8-086b-46bf-91b3-78295d5d440f">4.3.7.1. General evil</a></li>
<li><a href="#h:bde208f3-01ef-4dc6-9981-65f3d2a8189b">4.3.7.2. evil-collection</a></li>
<li><a href="#h:d80e3f7d-0185-4a15-832b-d756e576265c">4.3.7.3. evil-snipe</a></li>
<li><a href="#h:b06a378d-5248-4451-8eee-e65a3a768b1d">4.3.7.4. evil-cleverparens</a></li>
<li><a href="#h:aac82e5e-d882-4870-b644-ebdd0a2daae3">4.3.7.5. evil-surround</a></li>
<li><a href="#h:df6729b6-2135-4070-bcab-a6a26f0fb2c4">4.3.7.6. evil-visual-mark-mode</a></li>
<li><a href="#org0478d06">4.3.7.7. evil-textobj-tree-sitter</a></li>
</ul>
</li>
<li><a href="#h:e888d7a7-1755-4109-af11-5358b8cf140e">4.3.8. ispell</a></li>
<li><a href="#h:60f87342-0491-4c56-8057-6f075cf35753">4.3.9. Font Configuration</a></li>
<li><a href="#h:72a9704b-83d2-4b74-a1f6-d333203f62db">4.3.10. Theme</a></li>
<li><a href="#h:eb0ea526-a83a-4664-b3a1-2b40d3a31493">4.3.11. Icons</a></li>
<li><a href="#h:455ed7ac-ee7f-4f94-b857-f2c58b2282d0">4.3.12. Variable Pitch Mode</a></li>
<li><a href="#h:ed585848-875a-4673-910c-d2e1901dd95b">4.3.13. Modeline</a></li>
<li><a href="#h:80ed2431-9c9a-4bfc-a3c0-08a2a058d208">4.3.14. mini-modeline</a></li>
<li><a href="#h:39ae01e9-8053-4f76-aa77-8cbbbcff9652">4.3.15. Helper Modes</a>
<ul>
<li><a href="#h:b190d512-bfb5-42ec-adec-8d86bab726ce">4.3.15.1. Vertico, Orderless, Marginalia, Consult, Embark</a>
<ul>
<li><a href="#h:d7c7f597-f870-4e01-8f7e-27dd31dd245d">4.3.15.1.1. vertico</a></li>
<li><a href="#h:10d4f2bd-8c72-430b-a9ed-9b5e279ec0b4">4.3.15.1.2. vertico-directory</a></li>
<li><a href="#h:211fc0bd-0d64-4577-97d8-6abc94435f04">4.3.15.1.3. orderless</a></li>
<li><a href="#h:49ab82bf-812d-4fbe-a5b6-d3ad703fe32c">4.3.15.1.4. consult</a></li>
<li><a href="#h:1c564ee5-ccd7-48be-b69a-d963400c4704">4.3.15.1.5. embark</a></li>
<li><a href="#h:6287551c-a6f7-4870-b3f3-210d6f038b6f">4.3.15.1.6. embark-consult</a></li>
<li><a href="#h:f32040a4-882f-4e6b-97f1-a0105c44c034">4.3.15.1.7. marginalia</a></li>
<li><a href="#h:d70ec2fb-da43-4523-9ee4-774ececdb80e">4.3.15.1.8. nerd-icons-completion</a></li>
</ul>
</li>
<li><a href="#h:cbf6bd48-2503-489a-89da-e3359564e989">4.3.15.2. Helpful + which-key: Better help defaults</a></li>
</ul>
</li>
<li><a href="#h:bbbd9cc8-3a84-4810-a3d5-b8536a5fbda1">4.3.16. Ligatures</a></li>
<li><a href="#h:e9d40e63-0e1f-47df-98f7-5427992588a4">4.3.17. Popup (popper) + Shackle Buffers</a></li>
<li><a href="#h:a6d23c8c-125f-4e36-af30-ff0a1e0d5a28">4.3.18. Indicate first and last line of buffer</a></li>
<li><a href="#h:053a36bf-168f-4f63-a0c4-f0139dc6cc3b">4.3.19. Authentication</a></li>
</ul>
</li>
<li><a href="#h:f2622fd3-7f14-47a8-8c21-33574fcbf14b">4.4. Modules</a>
<ul>
<li><a href="#h:99544398-72af-4382-b8e1-01b2221baff4">4.4.1. Org Mode</a>
<ul>
<li><a href="#h:877c9401-a354-4e44-a235-db1a90d19e00">4.4.1.1. General org-mode</a></li>
<li><a href="#h:62829574-a069-44b8-afb3-401a268d2747">4.4.1.2. org-appear</a></li>
<li><a href="#h:bbcfa895-4d46-4b1d-b84e-f634e982c46e">4.4.1.3. Centered org-mode Buffers</a></li>
<li><a href="#h:c1a0adea-ca97-43d7-b5a0-b856d2ebc9a8">4.4.1.4. Fix headings not folding sometimes</a></li>
<li><a href="#h:3e0b6da3-0497-4080-bb49-bab949c03bc4">4.4.1.5. Babel</a>
<ul>
<li><a href="#h:5d5ed7be-ec5f-4e17-bbb8-820ab6a9961c">4.4.1.5.1. Language Configuration</a></li>
<li><a href="#h:d112ed66-b2dd-45cc-8d70-9cf6631f28a9">4.4.1.5.2. old easy structure templates</a></li>
</ul>
</li>
<li><a href="#h:4696e2fc-3296-47dc-8fc3-66912c329d4c">4.4.1.6. aucTex</a></li>
<li><a href="#h:406e5ecb-66f0-49bf-85ca-8b499f73ec5b">4.4.1.7. org-download</a></li>
<li><a href="#h:a02b1162-3e19-46f1-8efc-9f375971645c">4.4.1.8. org-fragtog</a></li>
<li><a href="#h:95b42e77-767c-4461-9ba8-b1c1cd18266c">4.4.1.9. org-modern</a></li>
<li><a href="#h:4e11a845-a7bb-4eb5-b4ce-5b2f52e07425">4.4.1.10. Presentations</a></li>
</ul>
</li>
<li><a href="#h:406c2ecc-0e3e-4d9f-9ae3-3eb1f8b87d1b">4.4.2. Nix Mode</a></li>
<li><a href="#h:e8074881-3441-4abd-b25b-358a87e7984f">4.4.3. HCL Mode</a></li>
<li><a href="#h:c9e3ffd7-4fb1-4a04-8563-92ceec4b4410">4.4.4. Jenkinsfile/Groovy</a></li>
<li><a href="#h:534d8729-4422-4f0c-9ae6-d3737d4a6dd3">4.4.5. Dockerfile</a></li>
<li><a href="#h:7834adb0-fbd3-4136-bdb7-6dbc9a083296">4.4.6. Terraform Mode</a></li>
<li><a href="#h:5ca7484b-b9d6-4023-88d1-a1e37d5df249">4.4.7. nixpkgs-fmt</a></li>
<li><a href="#h:489a71c4-38af-44a3-a9ef-8b1ed1ee4ac4">4.4.8. shfmt</a></li>
<li><a href="#h:50327461-a11b-4e81-830a-90febc720cfa">4.4.9. Markdown Mode</a>
<ul>
<li><a href="#h:734dc40a-a2c4-4839-b884-cb99b81aa6fe">4.4.9.1. Mode</a></li>
<li><a href="#h:8d90fe51-0b32-423a-a159-4f853bc29b68">4.4.9.2. LaTeX in Markdown</a></li>
</ul>
</li>
<li><a href="#h:a83c5820-2016-44ae-90a0-4756bb471c01">4.4.10. elfeed</a></li>
<li><a href="#h:87453f1c-8ea5-4d0a-862d-8973d5bc5405">4.4.11. Ripgrep</a></li>
<li><a href="#h:543641d0-02a9-459e-a2d6-96c8fcc06864">4.4.12. Tree-sitter</a></li>
<li><a href="#h:82ddeef2-99f8-465b-ba36-07c3eaad717b">4.4.13. direnv (envrc)</a></li>
<li><a href="#h:efb3f0fd-e846-4df9-ba48-2e45d776f68f">4.4.14. avy</a></li>
<li><a href="#h:d9a6cb44-736e-4608-951f-e928e1b757c0">4.4.15. devdocs</a></li>
<li><a href="#h:5cde5032-251e-4cc4-9202-b4ce996f92c2">4.4.16. Projectile</a></li>
<li><a href="#h:d2c7323d-f8c6-4f23-b70a-930e3e4ecce5">4.4.17. Magit</a></li>
<li><a href="#h:d78709dd-4f79-441c-9166-76f61f90359a">4.4.18. Yubikey support</a></li>
<li><a href="#h:1a8585ed-d9f2-478f-a132-440ada1cde2c">4.4.19. Forge</a></li>
<li><a href="#h:cf5b0e6b-56a5-4a93-99fb-258eb7cb2eb4">4.4.20. git-timemachine</a></li>
<li><a href="#h:d9671ab7-a75a-47c6-a1f4-376d126c9b0a">4.4.21. Delimiters (brackets): rainbow-delimiters, highlight-parentheses</a></li>
<li><a href="#h:d1a32a69-2f9a-45ef-95fe-a00e3551dc94">4.4.22. rainbow-mode</a></li>
<li><a href="#h:5653d693-ecca-4c95-9633-66b9e3241070">4.4.23. Corfu</a></li>
<li><a href="#h:c3cc1c12-3ab8-42b7-be07-63f54eac397f">4.4.24. cape</a></li>
<li><a href="#h:3aa20438-edf6-4b13-a90d-3d5c51239c44">4.4.25. rust</a></li>
<li><a href="#h:b9b27a88-06f3-470b-a604-a20b2079bc26">4.4.26. Tramp</a></li>
<li><a href="#h:58415e95-8a7a-4517-acbb-5f1bb1028603">4.4.27. diff-hl</a></li>
<li><a href="#h:d60ce0b1-cabf-43f5-a236-a1e4b400d2f5">4.4.28. Commenting</a></li>
<li><a href="#h:6cf0310b-2fdf-45f0-9845-4704649777eb">4.4.29. eglot</a></li>
<li><a href="#h:d9cd31ea-6c8c-4f1f-83b8-7853bab53857">4.4.30. sideline-flymake</a></li>
<li><a href="#h:e9a30d0f-423f-4e85-af4b-f8560f1c1b53">4.4.31. Prevent breaking of hardlinks</a></li>
<li><a href="#h:0918557a-8463-430c-b8df-6546dea9abd0">4.4.32. Dirvish</a></li>
<li><a href="#h:1fc538d1-8c53-48b2-8652-66046f4bbbf8">4.4.33. undo-tree</a></li>
<li><a href="#h:b6c18dd0-3377-47ea-80c3-ac1486454e18">4.4.34. Hydra</a>
<ul>
<li><a href="#h:c5681884-7040-4b55-ab1b-5777631a0514">4.4.34.1. Text scaling</a></li>
</ul>
</li>
<li><a href="#h:2f333330-b19d-4f64-85ea-146ff28667e8">4.4.35. Email</a>
<ul>
<li><a href="#h:b92a18cf-eec3-4605-a8c2-37133ade3574">4.4.35.1. mu4e</a></li>
<li><a href="#h:43209eeb-5d46-472e-b7c2-58a3fb465199">4.4.35.2. mu4e-alert</a></li>
</ul>
</li>
<li><a href="#h:c760f04e-622f-4b3e-8916-53ca8cce6edc">4.4.36. Calendar</a></li>
<li><a href="#h:48f5be2b-b3d2-4276-bd49-2630733f23d5">4.4.37. Dashboard: emacs startup screen</a></li>
<li><a href="#h:a81fb9de-6b6b-4a4a-b758-5107c6e7f0cb">4.4.38. vterm</a></li>
<li><a href="#h:1f4d32a0-c1ed-4409-aec4-7b5c96aa21dd">4.4.39. multiple cursors</a></li>
<li><a href="#h:438d928f-77a8-477a-ac8b-ca54ec673f91">4.4.40. Less logging</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#h:d39b8dfb-536d-414f-9fc0-7d67df48cee4">5. Appendix A: Noweb-Ref blocks</a>
<ul>
<li><a href="#h:5bc1b0c9-dc59-4c81-b5b5-e60699deda78">5.1. Theme (stylix)</a></li>
</ul>
</li>
<li><a href="#h:8fc9f66a-7412-4091-8dee-a06f897baf67">6. Appendix B: Supplementary Files</a>
<ul>
<li><a href="#h:c1e53aed-fb47-4aff-930c-dc52f3c5dcb8">6.1. Server Emacs config</a></li>
<li><a href="#h:fc64f42f-e7cf-4829-89f6-2d0d58e04f51">6.2. tridactylrc</a></li>
<li><a href="#h:77b1c523-5074-4610-b320-90af95e6134d">6.3. Waybar style.css</a></li>
<li><a href="#h:788937cf-8816-466b-8e57-1b695cb50f52">6.4. justfile</a></li>
<li><a href="#h:d4dcb884-f24f-4786-8fa6-9f36c88a706e">6.5. statix.toml</a></li>
</ul>
</li>
</ul>
</div>
</div>
<p>
<b>This file has 57884 words spanning 14894 lines and was last revised on 2024-12-31 21:56:30 +0100.</b>
</p>
<p>
In order to have working links and macros when viewing this file online, you might want to switch to the <a href="https://swarsel.github.io/.dotfiles/">html version</a>.
</p>
<div id="outline-container-h:a86fe971-f169-4052-aacf-15e0f267c6cd" class="outline-2">
<h2 id="h:a86fe971-f169-4052-aacf-15e0f267c6cd"><span class="section-number-2">1.</span> Introduction (no code)</h2>
<div class="outline-text-2" id="text-h:a86fe971-f169-4052-aacf-15e0f267c6cd">
<p>
This literate configuration file holds the entirety of all configuration files for both NixOS as well as home-manager across all machines that I currently use. It also holds an extensive Emacs configuration.
</p>
<p>
I used to have two separate files (<code>Emacs.org</code> and <code>Nixos.org</code>) because the NixOS setting for installing Emacs packages used to break if it found UTF-8 characters in <code>.el</code> files but not in <code>.org</code> files. Hence I used to pass <code>Emacs.org</code> to that function rather than <code>init.el</code>. This seems to be fixed now however and I was finally able to consolidate both files into one.
</p>
<p>
This configuration is part of a NixOS system that is (nearly) fully declarative and can be found here:
</p>
<ul class="org-ul">
<li><a href="https:github.com/Swarsel/.dotfiles"><code>SwarselSystems</code> on github.com</a></li>
<li><a href="https:swagit.swarsel.win/Swarsel/.dotfiles"><code>SwarselSystems</code> on swagit.swarsel.win</a></li>
</ul>
<p>
This literate configuration lets me explain my choices to my future self as well as you, the reader. I go to great lengths to explain the choices for all configuration steps that I take in order for me to pay due diligence in crafting my setup, and not simply copying big chunks of other peoples code. Also, the literate configuration approach is very convenient to me as I only need to keep of (ideally) a single file to manage all of my configuration. I hope that this documentation will make it easier for beginners to get into Emacs and NixOS as I know it can be a struggle in the beginning.
</p>
<p>
This file is structured as follows:
</p>
<ul class="org-ul">
<li><a href="#h:a86fe971-f169-4052-aacf-15e0f267c6cd">Introduction (no code)</a>
This is the block you are currently in. It holds no code that actually builds the system, it just outlines the general approach and explains my rough mentality</li>
<li><a href="#h:d39b8dfb-536d-414f-9fc0-7d67df48cee4">Noweb-Ref blocks</a>
This section hold code that can be templated at other parts of the configuration. This is mostly used for the NixOS side of the configuration where I define my host systems that usually have a lot in common.</li>
<li><a href="#h:c7588c0d-2528-485d-b2df-04d6336428d7">flake.nix</a>
This block holds everything related to the heart of the nix side of the configuration - the <code>flake.nix</code> file.</li>
<li><a href="#h:02cd20be-1ffa-4904-9d5a-da5a89ba1421">System</a>
This section holds all configuration options that apply to NixOS or home-manager. In other words, here we are doing system and user level configuration.</li>
<li><p>
<a href="#h:ed4cd05c-0879-41c6-bc39-3f1246a96f04">Emacs</a>
This section defines my Emacs configuration. For a while, I considered to use rycee's <code>emacs-init</code> module (<a href="https://github.com/nix-community/nur-combined/blob/master/repos/rycee/hm-modules/emacs-init.nix">https://github.com/nix-community/nur-combined/blob/master/repos/rycee/hm-modules/emacs-init.nix</a>) to manage my Emacs configuration; I have since come to the conclusion that this would be a bad idea: at the moment, even though it might seem as I am very bound to the configuration file that you are currently reading, if I ever decide to change how I run my system, I can simply take the generated <code>.nix</code> and <code>.el</code> files and put them wherever I need them. This file only simplifies that generation without putting further restrictions on my. If I were however to switch to <code>emacs-init</code> then I would be indeed to some level confined to the nix ecosystem with my Emacs configuration, as I would no longer have a valid <code>.org</code> file to manage it with, instead generating an <code>init.el</code> directly from nix code. I like to keep that level of freedom for potential future use. Also, you will notice there is no package system setup in this configuration. This is because packages are automatically handled on the NixOS side by parsing the generated <code>init.el</code> file for package installs.
</p>
<p>
My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-12-31 21:56:30 +0100)
</p></li>
</ul>
<div class="org-src-container">
<pre class="src src-emacs-lisp">
system-configuration-options
</pre>
</div>
<pre class="example">
--prefix=/nix/store/hzdmp1fxycaibbpk8lr0imjzi8n7yr4i-emacs-pgtk-20241230.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --without-xwidgets --with-dbus --with-selinux
</pre>
<p>
This file is not loaded by Emacs directly as the configuration (even though this would be possible) - instead, it generates two more files:
</p>
<ul class="org-ul">
<li><code>early-init.el</code>
This file handle startup optimization and sets up the basic frame that I will be working in.</li>
<li><code>init.el</code>
This file handles the rest of the Emacs configuration.</li>
</ul>
<p>
By using the configuration offered by this file, the file you are reading right now (<code>SwarselSystems.org</code>) will not be freshly tangled on every file save, as this slows down emacs over time. However, when you clone this configuration yourself and have not yet activated it, you need to tangle the file yourself. This can be done using the general keybind <code>C-c C-v t</code> or my personal chord <code>C-SPC o t</code>. Alternatively, execute the following block:
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp">
(org-babel-tangle)
</pre>
</div>
<p>
The <code>.html</code> version of this page can be generated by calling the chord <code>C-SPC o e</code>, or by executing the below block
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp">
(org-html-export-to-html)
</pre>
</div>
<p>
The web version is useful because it allows navigation using org-mode links, which makes the configuration easier to follow (I hope!).
Lastly, I add this javascript bit to the file in order to have a darkmode toggle when exporting to html:
</p>
<div class="org-src-container">
<pre class="src src-elisp">(concat
"<script src=\"https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js\"></script>\n"
"<script>\n"
"function addDarkmodeWidget() {\n"
"new Darkmode().showWidget();\n"
"}\n"
"window.addEventListener('load', addDarkmodeWidget);\n"
"</script>")
</pre>
</div>
<script src="https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js"></script>
<script>
function addDarkmodeWidget() {
new Darkmode().showWidget();
}
window.addEventListener('load', addDarkmodeWidget);
</script>
<p>
The rest of this file will now contain actual code that is used in the configuration.
</p>
</div>
</div>
<div id="outline-container-h:c7588c0d-2528-485d-b2df-04d6336428d7" class="outline-2">
<h2 id="h:c7588c0d-2528-485d-b2df-04d6336428d7"><span class="section-number-2">2.</span> flake.nix</h2>
<div class="outline-text-2" id="text-h:c7588c0d-2528-485d-b2df-04d6336428d7">
<p>
Handling the flake.nix file used to be a bit of a chore, since it felt like writing so much boilerplate code just to define new systems. The noweb-approach here makes this a little bit less painful.
</p>
<p>
These blocks are later inserted here: <a href="#h:aee5ec75-7ca6-40d8-b6ac-a3e7e33a474b">flake.nix template</a>. Adding new flake inputs is very easy, you just add them to <a href="#h:8a411ee2-a58e-4b5b-99bd-4ba772f8f0a2">Inputs & Inputs@Outputs</a> first by name in the first source-block, and then the path in the second source-block. Any variables to be set for the host configuration are done in <a href="#h:df0072bc-853f-438f-bd85-bfc869501015">let</a>, and the specific setup is done in either <a href="#h:9c9b9e3b-8771-44fa-ba9e-5056ae809655">nixosConfigurations</a> (for NixOS systems), <a href="#h:f881aa05-a670-48dd-a57b-2916abdcb692">homeConfigurations</a> (for home-manager systems), or <a href="#h:5f6ef553-59f9-4239-b6f3-63d33b57f335">nixOnDroidConfigurations</a> (for Nix on Android) and <a href="#h:f881aa05-a670-48dd-a57b-2916abdcb692">darwinConfigurations</a> (for Darwin systems, also known as Macs). There also used to be a [BROKEN LINK: h:6a08495a-8566-4bb5-9fac-b03df01f6c81] section that used to define a Proxmox LXC image when I was still using Proxmox as my main server. An example of the repository at that time would be <code>acc0ad6: Add several NixOS hosts on Proxmox and Oracle Cloud</code>.
</p>
</div>
<div id="outline-container-h:aee5ec75-7ca6-40d8-b6ac-a3e7e33a474b" class="outline-3">
<h3 id="h:aee5ec75-7ca6-40d8-b6ac-a3e7e33a474b"><span class="section-number-3">2.1.</span> flake.nix skeleton</h3>
<div class="outline-text-3" id="text-h:aee5ec75-7ca6-40d8-b6ac-a3e7e33a474b">
<p>
This sections puts together the <code>flake.nix</code> file from the <a href="#h:d39b8dfb-536d-414f-9fc0-7d67df48cee4">Noweb-Ref blocks</a> section. This tangles the flake.nix file; This block only needs to be touched when updating the general structure of the flake. For everything else, see the respective noweb-ref block.
</p>
<p>
In general, a nix flake consists of one or more inputs and several outputs. The inputs are used to define where nix should be looking for packages, options, and more. The outputs generate expressions that can be used in .nix files as well as system configurations using these files.
</p>
<p>
In the start, I enable some public cache repositories. This saves some time during rebuilds because it avoids building as many packages from scratch - this is mainly important for community flakes like <code>emacs-overlay</code>, which basically would trigger a rebuild whenever updating the flake. The repository does of course not hold everything, but it lightens the pain.
</p>
<p>
In <code>outputs = inputs@ [...]</code>, the <code>inputs@</code> makes it so that all inputs are automatically passed to the outputs and can be called as <code>inputs.<name></code>, whereas explicit arguments may just be called by using <code><name></code>. For most flakes this is fully sufficient, as they do not need to be called often and it saves me maintainance effort with this file.
</p>
<div class="org-src-container">
<pre class="src src-nix">{
description = "SwarseFlake - Nix Flake for all SwarselSystems";
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
"https://cache.ngi0.nixos.org/"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
systems.url = "github:nix-systems/default-linux";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
nixgl.url = "github:guibou/nixGL";
stylix.url = "github:danth/stylix";
sops-nix.url = "github:Mic92/sops-nix";
lanzaboote.url = "github:nix-community/lanzaboote";
nix-on-droid = {
url = "github:nix-community/nix-on-droid/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
};
nix-alien = {
url = "github:thiagokokada/nix-alien";
};
nswitch-rcm-nix = {
url = "github:Swarsel/nswitch-rcm-nix";
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence";
zjstatus = {
url = "github:dj95/zjstatus";
};
fw-fanctrl = {
url = "github:TamtamHero/fw-fanctrl/packaging/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-secrets = {
url = "git+ssh://git@github.com/Swarsel/nix-secrets.git?ref=main&shallow=1";
flake = false;
inputs = { };
};
nix-topology.url = "github:oddlama/nix-topology";
};
outputs =
inputs@{ self
, nixpkgs
, home-manager
, systems
, ...
}:
let
inherit (self) outputs;
lib = (nixpkgs.lib // home-manager.lib).extend (_: _: { swarselsystems = import ./lib { inherit self lib inputs outputs systems; }; });
# NixOS modules that can only be used on NixOS systems
nixModules = [
inputs.stylix.nixosModules.stylix
inputs.lanzaboote.nixosModules.lanzaboote
inputs.disko.nixosModules.disko
inputs.impermanence.nixosModules.impermanence
inputs.sops-nix.nixosModules.sops
inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm
inputs.nix-topology.nixosModules.default
./profiles/common/nixos
];
# Home-Manager modules wanted on non-NixOS systems
homeModules = [
inputs.stylix.homeManagerModules.stylix
];
# Home-Manager modules wanted on both NixOS and non-NixOS systems
mixedModules = [
inputs.sops-nix.homeManagerModules.sops
inputs.nix-index-database.hmModules.nix-index
./profiles/common/home
];
in
{
inherit lib nixModules mixedModules homeModules;
nixosModules = import ./modules/nixos { inherit lib; };
homeManagerModules = import ./modules/home { inherit lib; };
packages = lib.swarselsystems.forEachSystem (pkgs: import ./pkgs { inherit lib pkgs; });
formatter = lib.swarselsystems.forEachSystem (pkgs: pkgs.nixpkgs-fmt);
overlays = import ./overlays { inherit self lib inputs; };
apps = lib.swarselsystems.forAllSystems (system:
let
appNames = [
"swarsel-bootstrap"
"swarsel-install"
"swarsel-rebuild"
"swarsel-postinstall"
];
appSet = lib.swarselsystems.mkApps system appNames self;
in
{
inherit appSet;
default = appSet.bootstrap;
});
devShells = lib.swarselsystems.forAllSystems (system:
let
pkgs = lib.swarselsystems.pkgsFor.${system};
checks = self.checks.${system};
in
{
default = pkgs.mkShell {