-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
793 lines (699 loc) · 18.6 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
<?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-04-12 Fri 12:38 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>My Linux Desktop</title>
<meta name="author" content="Animesh Sahu" />
<meta name="generator" content="Org Mode" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
line-height: 1.35;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
font-family:
system-ui,
-apple-system,
'Segoe UI',
Roboto,
Helvetica,
Arial,
sans-serif,
'Apple Color Emoji',
'Segoe UI Emoji';
}
hr {
height: 0;
color: inherit;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp,
pre {
font-family:
ui-monospace,
SFMono-Regular,
Consolas,
'Liberation Mono',
Menlo,
monospace;
font-size: 1em;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
table {
text-indent: 0;
border-color: inherit;
}
summary {
display: list-item;
}
:root {
--bc-tb: #1A2F54;
--bc-block: #008ED1;
--clr: #333333;
--clr-tb-hd: #85CEEB;
--clr-code: #85CEEB;
--bg: #FFFFFF;
--bg-code: #335EA8;
--bg-tb-hd: #335EA8;
--bg-block: #FFFFE0;
--clr-link: #D0372D;
--clr-title: #333333;
--clr-todo: #008000;
--bg-todo: initial;
--clr-done: #8D8D84;
--bg-done: initial;
--ts-clr: #0000FF;
--mg: 20px;
--w-toc: 300px;
--bg-keyword: initial;
--clr-keyword: #0000FF;
--bg-constant: initial;
--clr-constant: #D0372D;
--bg-comment: initial;
--clr-comment: #8D8D84;
--bg-comment-delimiter: initial;
--clr-comment-delimiter: #8D8D84;
--bg-function: initial;
--clr-function: #006699;
--bg-variable: initial;
--clr-variable: #BA36A5;
--bg-preprocessor: initial;
--clr-preprocessor: #808080;
--bg-doc: initial;
--clr-doc: #036A07;
--bg-builtin: initial;
--clr-builtin: #006FE0;
--bg-string: initial;
--clr-string: #008000;
}
html {
font-family: Sans;
}
body {
background: #999;
display: flex;
flex-direction: column;
align-items: center;
}
body[data-theme='light'] {
background: var(--bg);
color: var(--clr);
}
body[data-theme='dark'] {
background: var(--bg);
color: var(--clr);
--bc-tb: #eeeeec;
--bc-block: initial;
--clr: #eeeeec;
--clr-code: #2e3436;
--clr-tb-hd: #2e3436;
--bg: #2e3436;
--bg-tb-hd: #d3d7cf;
--bg-code: #d3d7cf;
--bg-block: initial;
--clr-link: #e9b2e3;
--clr-title: #eeeeec;
--clr-todo: #e9b96e;
--bg-todo: initial;
--clr-done: #73d216;
--bg-done: initial;
--ts-clr: #b4fa70;
--mg: 20px;
--w-toc: 300px;
--bg-keyword: initial;
--clr-keyword: #b4fa70;
--bg-constant: initial;
--clr-constant: #e9b2e3;
--bg-comment: initial;
--clr-comment: #73d216;
--bg-comment-delimiter: initial;
--clr-comment-delimiter: initial;
--bg-function: initial;
--clr-function: #fce94f;
--bg-variable: initial;
--clr-variable: #fcaf3e;
--bg-preprocessor: initial;
--clr-preprocessor: initial;
--bg-doc: initial;
--clr-doc: initial;
--bg-builtin: initial;
--clr-builtin: #e090d7;
--bg-string: initial;
--clr-string: #e9b96e;
}
@media only screen and (max-width: 768px) {
#content {
width: 100%;
padding-left: 10px;
padding-right: 10px;
}
}
@media only screen and (min-width: 768px) {
#content {
width: 768px;
}
}
@media only screen and (min-width: 1024px) {
body {
align-items: flex-end;
}
#content {
width: calc(100vw - var(--w-toc) - var(--mg) * 4);
margin-right: var(--mg);
}
}
h1 {
color: var(--clr-title);
text-align: center;
}
h2, h3, h4, h5, h6, h7 {
font-family: Sans Serif;
}
h2 {
line-height: 2.5em;
}
h2::before {
content: "◉ ";
}
h3::before {
content: "✸ ";
}
h4::before {
content: "▷ ";
}
code {
color: var(--clr-code);
background: var(--bg-code);
border-radius: 2px;
padding-left: 5px;
padding-right: 5px;
}
pre {
padding: 20px;
border: 1px solid var(--bc-block);
background: var(--bg-block);
font-size: 0.9rem;
overflow-x: scroll;
}
pre::-webkit-scrollbar {
display: none;
}
pre {
-ms-overflow-style: none;
scrollbar-width: none;
}
.todo {
color: var(--clr-todo);
background: var(--bg-todo);
}
.done {
color: var(--clr-done);
background: var(--bg-done);
}
.timestamp-wrapper {
font-size: 0.8rem;
color: var(--clr-ts);
}
table {
width: 100%;
border: 2px solid var(--bc-tb);
}
thead {
color: var(--clr-tb-hd);
background: var(--bg-tb-hd);
}
td, th {
border: thin solid var(--bc-tb);
}
li {
line-height: 2rem;
}
a {
text-decoration: none;
color: var(--clr-link);
}
a:hover {
text-decoration: underline;
}
#table-of-contents > h2 {
display: none;
}
#table-of-contents {
border: thin solid var(--bc-block);
background: var(--bg-block);
}
#toggle-toc {
display: none;
}
.toc-show {
display: block!important;
}
@media only screen and (max-width: 768px) {
#toggle-toc {
position: fixed;
top: 0;
right: 0;
cursor: pointer;
padding-left: 10px;
padding-right: 10px;
font-size: 2em;
line-height: 2em;
display: block;
}
#table-of-contents {
background: var(--bg);
display: none;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow-y: scroll;
}
#table-of-contents a {
color: var(--clr);
}
}
@media only screen and (min-width: 1024px) {
#table-of-contents {
font-size: 0.8rem;
position: fixed;
left: var(--mg);
top: var(--mg);
bottom: var(--mg);
width: var(--w-toc);
overflow-y: scroll;
}
}
#table-of-contents::-webkit-scrollbar {
display: none;
}
#table-of-contents {
-ms-overflow-style: none;
scrollbar-width: none;
}
.MathJax_Display {
font-size: 1.25em;
}
#toggle-theme {
border-width: 0;
line-height: 4em;
padding-left: 1em;
padding-right: 1em;
background: var(--bg-block);
color: var(--clr-code);
}
#toggle-theme:hover {
cursor: pointer;
}
img {
width: 100%;
}
@media only screen and (max-width: 768px) {
#toggle-theme {
width: 100%;
text-align: center;
}
}
@media only screen and (min-width: 768px) {
#toggle-theme {
position: absolute;
top: var(--mg);
right: var(--mg);
border-radius: 5px;
}
}
.theme-transition {
transition: all 0.5s;
}
.status {
width: 100%;
}
@media only screen and (max-width: 768px) {
ul {
padding-left: .5em;
margin-left: 0;
}
li {
padding-left: 0;
margin-left: 0;
}
}
/*]]>*/-->
</style>
</head>
<body>
<div id="preamble" class="status">
<div id="toggle-theme">dark theme</div><div id="toggle-toc">☰</div>
</div>
<div id="content" class="content">
<h1 class="title">My Linux Desktop</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="#org0000000">1. Preface</a></li>
<li><a href="#org0000006">2. My configuration</a>
<ul>
<li><a href="#org0000003">2.1. Applying config</a></li>
</ul>
</li>
<li><a href="#org0000019">3. Repository Structure</a>
<ul>
<li><a href="#org0000009">3.1. Home configs</a></li>
<li><a href="#org000000e">3.2. Modules</a></li>
<li><a href="#org0000013">3.3. Bundled packages</a></li>
<li><a href="#org0000016">3.4. Overlays</a></li>
</ul>
</li>
<li><a href="#org000001c">4. Notes</a></li>
<li><a href="#org000001f">5. UNLICENSE</a></li>
<li><a href="#org0000022">6. References</a></li>
</ul>
</div>
</div>
<p align="center"><img src="https://i.imgur.com/YHr1OMl.png" align="center"></p>
<div id="outline-container-org0000000" class="outline-2">
<h2 id="org0000000"><span class="section-number-2">1.</span> Preface</h2>
<div class="outline-text-2" id="text-1">
<p>
I prefer maximizing control over my system whenever possible. The top priorities for my Linux Desktop include
Accessibility, Ease of Use, Reproducibility, and Stability.
</p>
<p>
And speaking of control, I've realized I should start documenting my processes. I mean, who knows, my wisdom might just
go six feet under with me, and I've got a boatload of know-how tucked away up in this brain of mine. Plus, you know what
they say about active externalism — it's all about making sure your knowledge doesn't end with you.
</p>
<p>
I've experimented with different tools over time ranging from shell scripts, makefiles, ansible/puppet/chef
(<a href="https://github.com/Animeshz/linux-desktop/tags">check out the git tags</a>) in order to enforce and sync configuration. But as the system evolves, things tend to
deteriorate and everything becomes a giant mess.
</p>
<p>
Nix appears to tackle these issues, albeit in an extreme manner - less convenient and sensible, but quite effective -
prioritizing correctness over flexibility. Most importantly it guarentees reproducibility, which means I can sit back
and relax; if something worked, it'll keep working unless changed.
</p>
<p>
Before anything, you can view my configuration at:
</p>
<ul class="org-ul">
<li><a href="https://animeshz.github.io/linux-desktop">Website</a></li>
<li><a href="https://github.com/Animeshz/linux-desktop">GitHub</a></li>
</ul>
<p>
Additionally, I've described nix extensively in <a href="https://animeshz.github.io/site/notes/20-29--DevEnvironment/21--Linux/21.02-Nix.html">my notes over here</a>.
</p>
</div>
</div>
<div id="outline-container-org0000006" class="outline-2">
<h2 id="org0000006"><span class="section-number-2">2.</span> My configuration</h2>
<div class="outline-text-2" id="text-2">
<p>
This is root repository to my linux system configuration, managed by nix flake.
</p>
<p>
I've primarily used <a href="https://github.com/nix-community/home-manager">home-manager</a> with <a href="https://github.com/snowfallorg/lib/tree/feat/home-manager">snowfall-lib</a> for installation & configuration of most packages. For native stuffs (display drivers / virtualization that requires dkms kernel integrations / service management) I've used <a href="https://github.com/Animeshz/linux-desktop/blob/nix/modules/home/puppet/default.nix#L17-L37">Puppet RAL</a>.
</p>
<p>
So in most cases this config should be applicable to fit wide variety of distros, including various service managers (systemd/runit/openrc/etc).
</p>
</div>
<div id="outline-container-org0000003" class="outline-3">
<h3 id="org0000003"><span class="section-number-3">2.1.</span> Applying config</h3>
<div class="outline-text-3" id="text-2-1">
<p>
Justfile has following recipes set up.
</p>
<div class="org-src-container">
<pre class="src src-sh">just --list --unsorted
</pre>
</div>
<pre class="example">
Available recipes:
build
dry-run
switch
list-generations
treeview arg='.' # Shows treeview of given folder (also used in generation of README)
nvfetcher # Update all dependencies in nvfetcher.toml
bundix # Update all gems in packages/**
</pre>
<p>
Main command you should remember is,
</p>
<div class="org-src-container">
<pre class="src src-sh">just switch && stow -t $<span style="color: var(--clr-variable); background-color: var(--bg-variable);">HOME</span> stow/
</pre>
</div>
<p>
TODO: Document <code>stow</code> folder
</p>
</div>
</div>
</div>
<div id="outline-container-org0000019" class="outline-2">
<h2 id="org0000019"><span class="section-number-2">3.</span> Repository Structure</h2>
<div class="outline-text-2" id="text-3">
<p>
Autogenerated by running <code>C-c C-v b</code> in emacs. Be sure to load the <a href="https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html">shell module</a> if you haven't.
</p>
</div>
<div id="outline-container-org0000009" class="outline-3">
<h3 id="org0000009"><span class="section-number-3">3.1.</span> Home configs</h3>
<div class="outline-text-3" id="text-3-1">
<pre class="example">
homes
└── x86_64-linux
└── animesh@framework
└── default.nix
</pre>
<p>
My primary config is at <a href="./homes/x86_64-linux/animesh@framework/default.nix">homes/x86<sub>64</sub>-linux/animesh@framework/default.nix</a>.
</p>
</div>
</div>
<div id="outline-container-org000000e" class="outline-3">
<h3 id="org000000e"><span class="section-number-3">3.2.</span> Modules</h3>
<div class="outline-text-3" id="text-3-2">
<pre class="example" id="org000000c">
modules
└── home
├── apps
│ └── brave
│ └── default.nix
├── cli
│ ├── bat
│ │ └── default.nix
│ ├── fish
│ │ ├── default.nix
│ │ └── functions.nix
│ ├── git
│ │ └── default.nix
│ ├── inxi
│ │ └── default.nix
│ ├── just
│ │ └── default.nix
│ ├── kitty
│ │ └── default.nix
│ ├── nix
│ │ ├── default.nix
│ │ ├── pin-inputs.nix
│ │ └── setup-comma.nix
│ ├── ranger
│ │ └── default.nix
│ └── starship
│ └── default.nix
├── desktop
│ ├── eww
│ │ └── default.nix
│ ├── fonts
│ │ └── default.nix
│ ├── gtk
│ │ └── default.nix
│ ├── herbstluftwm
│ │ └── default.nix
│ └── xorg
│ └── default.nix
├── editors
│ ├── emacs
│ │ └── default.nix
│ └── nvim
│ └── default.nix
├── languages
│ ├── android
│ │ └── default.nix
│ ├── go
│ │ └── default.nix
│ └── ruby
│ └── default.nix
├── modules
│ └── puppet
│ ├── default.nix
│ └── etc.nix
└── system
├── acpi-handler
│ └── default.nix
├── auto-cpufreq
│ └── default.nix
├── fstrim
│ └── default.nix
└── sysctl
└── default.nix
</pre>
</div>
</div>
<div id="outline-container-org0000013" class="outline-3">
<h3 id="org0000013"><span class="section-number-3">3.3.</span> Bundled packages</h3>
<div class="outline-text-3" id="text-3-3">
<pre class="example" id="org0000011">
packages
├── emacs-chdir
│ └── default.nix
├── emacs-pcre
│ └── default.nix
├── phosphor-icons
│ └── default.nix
└── puppet
├── default.nix
└── gemset.nix
</pre>
</div>
</div>
<div id="outline-container-org0000016" class="outline-3">
<h3 id="org0000016"><span class="section-number-3">3.4.</span> Overlays</h3>
<div class="outline-text-3" id="text-3-4">
<pre class="example">
overlays
└── nvfetcher
└── default.nix
</pre>
</div>
</div>
</div>
<div id="outline-container-org000001c" class="outline-2">
<h2 id="org000001c"><span class="section-number-2">4.</span> Notes</h2>
<div class="outline-text-2" id="text-4">
<p>
To cleanup older generations:
</p>
<div class="org-src-container">
<pre class="src src-sh">pushd ~/.local/state/nix/profiles && ls | awk <span style="color: var(--clr-string); background-color: var(--bg-string);">"!/$(readlink home-manager)/ && /home-manager-/"</span> | xargs rm && popd
nix-collect-garbage --delete-old
nix store gc --debug
</pre>
</div>
<p>
Sometimes mmap files prevent gc, reboot + same thing may clear even more!
</p>
</div>
</div>
<div id="outline-container-org000001f" class="outline-2">
<h2 id="org000001f"><span class="section-number-2">5.</span> UNLICENSE</h2>
<div class="outline-text-2" id="text-5">
<div class="org-src-container">
<pre class="src src-md">Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
For more information, please refer to <http://unlicense.org/>
</pre>
</div>
</div>
</div>
<div id="outline-container-org0000022" class="outline-2">
<h2 id="org0000022"><span class="section-number-2">6.</span> References</h2>
<div class="outline-text-2" id="text-6">
<p>
Special thanks to these as my configuration have been extremely inspired by them,
</p>
<ul class="org-ul">
<li>snowfallorg and <a href="https://github.com/YaroKasear/flakes">https://github.com/YaroKasear/flakes</a> providing ideal structure</li>
<li><a href="https://sourcegraph.com/github.com/jpetrucciani/nix/-/blob/mods/pog.nix">https://sourcegraph.com/github.com/jpetrucciani/nix/-/blob/mods/pog.nix</a> shows pog module</li>
<li><a href="https://github.com/NobbZ/nixos-config/">https://github.com/NobbZ/nixos-config/</a> great nix uses</li>
<li><a href="https://github.com/matklad/config">https://github.com/matklad/config</a> & <a href="https://github.com/notusknot/dotfiles-nix">https://github.com/notusknot/dotfiles-nix</a> (not so sure if I took something from them)</li>
</ul>
</div>
</div>
</div>
<div id="postamble" class="status">
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
let cookie = document.cookie.split('; ').find(r => r.startsWith('org_html_themify_theme'))
let theme = 'light'
if (cookie) {
theme = cookie.split('=')[1]
}
let toggleThemeBtn = document.getElementById('toggle-theme')
let toggleTocBtn = document.getElementById('toggle-toc')
if (theme == 'light') {
useLightTheme();
} else {
useDarkTheme();
}
function transition() {
document.body.classList.add('theme-transition')
setTimeout(() => document.body.classList.remove('theme-transition'), 500)
}
function useLightTheme(theme) {
document.body.dataset.theme = 'light'
toggleThemeBtn.innerHTML = 'dark theme'
document.cookie = 'org_html_themify_theme=light'
}
function useDarkTheme(theme) {
document.body.dataset.theme = 'dark'
toggleThemeBtn.innerHTML = 'light theme'
document.cookie = 'org_html_themify_theme=dark'
}
toggleThemeBtn.addEventListener('click', function() {
transition()
if (document.body.dataset.theme == 'light') {
useDarkTheme();
} else {
useLightTheme();
}
})
let toc = document.getElementById('table-of-contents')
toggleTocBtn.addEventListener('click', function() {
toc.classList.add('toc-show')
toc.addEventListener('click', function() {
toc.classList.remove('toc-show')
})
})
/*]]>*/-->
</script>
</div>
</body>
</html>