forked from colin/nix-files
Compare commits
836 Commits
nginx-bigg
...
patch-gite
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ffcdf08b20 | ||
faa0fd006a | |||
7c7780183a | |||
78be0fbd11 | |||
9a42a08910 | |||
09a027ef3f | |||
a54b476b12 | |||
98df75a449 | |||
d62788108b | |||
0b8807fb9e | |||
8588fc0ad0 | |||
7e671285ca | |||
844a838016 | |||
85ac4241d3 | |||
e515bf10c4 | |||
3e35c4ae85 | |||
10e005d8c8 | |||
61b30678c4 | |||
a1ba78c69f | |||
7ca9cd116f | |||
41e534fc66 | |||
e52e30990b | |||
190f50748a | |||
326b5ac98d | |||
0498ca9be3 | |||
9a0efcb8c2 | |||
4442fca519 | |||
fb0b7796b4 | |||
9060a426c2 | |||
4b5368d47e | |||
f659c358d9 | |||
7a0760440d | |||
bc89969a2c | |||
c767769b61 | |||
26acb7c4a7 | |||
9e7af6625e | |||
2ec26e9534 | |||
4dac9900b4 | |||
0f91fbe1ae | |||
38899ce392 | |||
f8eec18429 | |||
baabd39cb7 | |||
ca26af0278 | |||
7fd2c38ff1 | |||
df8b8eeb40 | |||
8a5443e50d | |||
464ec33aec | |||
7608534b25 | |||
2f7a7026c4 | |||
3b7d6d34c4 | |||
87f30b8fef | |||
ff13331fe6 | |||
981b79a00f | |||
b8d8a382d0 | |||
4eef8330e7 | |||
8b5284811d | |||
2184c17677 | |||
d64e955206 | |||
c4ae9d9e25 | |||
8dbb2fdbe3 | |||
8908394493 | |||
fb825b4630 | |||
d504e9216b | |||
c9261d1438 | |||
e3152da68c | |||
44da59ebee | |||
64a86d202c | |||
a4cb3ce359 | |||
3ff3d6b135 | |||
7ca476af97 | |||
a9091151e8 | |||
9641ffecbc | |||
d2d80d548b | |||
418f0dedeb | |||
59f45e3fc0 | |||
fcd479e35d | |||
225cbd1280 | |||
97e9d77add | |||
07bc8be439 | |||
f494698373 | |||
727f5fc8e6 | |||
1052649f5b | |||
ea624269c4 | |||
851b7fde8c | |||
a4630c21e0 | |||
55f06128ee | |||
da2c808194 | |||
cb2f1faafd | |||
22d3029c7c | |||
faeb311090 | |||
e1c85f111a | |||
2c8a9c4877 | |||
5d87480e60 | |||
8966c365cc | |||
3bc5a8f6c4 | |||
7cb342b1ab | |||
45fdb7badf | |||
29ee5efe24 | |||
a52f1f0f6a | |||
2d00c141e5 | |||
643b1ae661 | |||
23f13c24b7 | |||
a03ed72ea4 | |||
0f4854944c | |||
5b10ff1e1e | |||
1085978f99 | |||
62cf79e60d | |||
fb64d1ad50 | |||
a9301055a4 | |||
522365d498 | |||
3805f3f72d | |||
c5a574fe6a | |||
0b54c31b0c | |||
a69ff986cd | |||
2ba194e0a4 | |||
68889c364c | |||
5aafbb0dcb | |||
40fc2f9b9b | |||
e2932f1364 | |||
9afeeb62fa | |||
1157215198 | |||
709d70a4d9 | |||
9a1fcf8038 | |||
5edc6ba067 | |||
394e4c42b4 | |||
162953b004 | |||
6c37bc38fa | |||
ae08bfc496 | |||
713a85b3d3 | |||
49d4a79d87 | |||
3e09196687 | |||
1730ecc98f | |||
755dc417ba | |||
74f59eb596 | |||
b08ab26ea1 | |||
afe4857a58 | |||
8f74778955 | |||
557adce795 | |||
7e704ce55d | |||
2dbe1df67e | |||
890cb72b58 | |||
d8cb9a3370 | |||
4c504dcdd6 | |||
e87bbdf6cd | |||
f7a08ae2a0 | |||
c7fc738c85 | |||
385da61255 | |||
bfbd5624fc | |||
5a6dbada11 | |||
e9e9c044bf | |||
709edab85d | |||
05d46ad870 | |||
3eefd4ced1 | |||
a42c5362bf | |||
c2cd4dd71c | |||
4ec5eb1e88 | |||
0244242991 | |||
f9c72b6c58 | |||
1ae307c8f4 | |||
97dfb58bbb | |||
00acccb9c9 | |||
181578384d | |||
011c428c08 | |||
e2a183e8d3 | |||
7b66e2f0e2 | |||
45d98d4517 | |||
7cb91731be | |||
47ce18fbfb | |||
0758697534 | |||
5552decca6 | |||
42546baadc | |||
11ada7d35d | |||
32946c35d9 | |||
c2ab6748c4 | |||
d54eff32a7 | |||
4d20be490a | |||
91771b7bef | |||
55d23c92c0 | |||
0066b11754 | |||
96373e7eaf | |||
1afe5c3ba7 | |||
eeb2248831 | |||
d887e86c18 | |||
fff1488761 | |||
005dddfb8f | |||
30b0ba1a52 | |||
b41e29ac30 | |||
4dcc565c6c | |||
76c16deae1 | |||
457beaca20 | |||
179c3a7ad7 | |||
509208e305 | |||
9c4f6f5bd8 | |||
a40a9dcfcc | |||
26469d5a11 | |||
ae2f2c47a4 | |||
91133e096a | |||
a5223320af | |||
e32c9d42d9 | |||
52261d5bc3 | |||
99c4c4d043 | |||
de95f45cb9 | |||
ed311f902b | |||
f2a0dd4e8f | |||
fcd92407d7 | |||
5b7c93b490 | |||
1b4a6a53e6 | |||
b1cdf9b63e | |||
1411add8ba | |||
58b87e32e3 | |||
eb304c6b61 | |||
2db59f380c | |||
2691e3a8eb | |||
9f8193787f | |||
b43328f233 | |||
b45f3ea7db | |||
afbed1e18d | |||
3068ac35b7 | |||
6c4a6a596f | |||
913dfbd798 | |||
f49ce4b2fd | |||
496b2a10b4 | |||
9f8df5db63 | |||
6f590899bb | |||
f8d2dbca62 | |||
3b458d5337 | |||
3b9fd0a548 | |||
4ef705d143 | |||
233320e3a1 | |||
1a89305f18 | |||
3b8b227c09 | |||
5eb620d521 | |||
8fc16eaf39 | |||
fa38f70079 | |||
aed191b255 | |||
02fe7e02c2 | |||
0aaf453ba7 | |||
dd12514486 | |||
d0eb5851d5 | |||
2fc1baebd6 | |||
8477e51538 | |||
e016ed9272 | |||
e311e0e757 | |||
e6f724a54c | |||
bd735d4400 | |||
2d8dcb600c | |||
62a5711a2a | |||
bdbc632e1e | |||
e25d8a29b9 | |||
504a13832f | |||
a95bbd23b4 | |||
e2bb663c8e | |||
04e4d9ed23 | |||
44d83ffdfd | |||
ee92770d11 | |||
f39978ee43 | |||
96a18c86dd | |||
d426a9e9e8 | |||
96d3e3fcca | |||
a84d48d601 | |||
7e882212c4 | |||
bde9114ce9 | |||
d7a1859b97 | |||
958f8ef0c9 | |||
d37543e9e9 | |||
88454ff073 | |||
0c791e30a0 | |||
e4c6c01f8d | |||
87ce176081 | |||
0f29c667aa | |||
d7f3b7bcff | |||
009691212c | |||
82e049d99d | |||
17cdbb12d2 | |||
c1edaf792a | |||
36869a94b9 | |||
d669e66ffa | |||
2fcf88b89b | |||
023f006eb5 | |||
bdd012fa43 | |||
cbcb43ac2c | |||
fde708e602 | |||
e4fc268c24 | |||
5f829789fd | |||
28a13219be | |||
36f2bcd80c | |||
1b181755c7 | |||
ef68078de6 | |||
d35ef1be32 | |||
ad2a555256 | |||
87908fdf03 | |||
f079b3d920 | |||
82f7580d4c | |||
df63240580 | |||
e8c5dda396 | |||
127d731892 | |||
f2a1aafcc6 | |||
1f3957bcc4 | |||
fdbdf826d3 | |||
f66920854a | |||
33263c27ff | |||
25aa82b038 | |||
fbce38a47a | |||
604599b3b6 | |||
cf38651e8d | |||
48bd6d304f | |||
d5711e7de7 | |||
5e3854595e | |||
9f3cf94a0e | |||
bec6b6ed72 | |||
fdf2b5327e | |||
b7daf1ad04 | |||
b454a5a34f | |||
ae29f3066b | |||
70b1dda0a1 | |||
960ac80ba4 | |||
214df43af2 | |||
d67169aa13 | |||
019991cf1e | |||
c4f25ac198 | |||
831bddbcb6 | |||
4ac8805743 | |||
abd5e8a18d | |||
a6a1597f26 | |||
dede9e3ddb | |||
69ac264681 | |||
39fc431802 | |||
9b9a0fa953 | |||
85b41efc7e | |||
bd80c3b6f7 | |||
91624ba253 | |||
e52ae986b6 | |||
dead0a4b7c | |||
fc29c61ab7 | |||
7c0523f3e6 | |||
00fdcb7ec3 | |||
87fbeaa2bf | |||
3cd1bd2bff | |||
11f8127cc3 | |||
722c94d169 | |||
f1b8fd7a9d | |||
0c4d84de90 | |||
9ee805d2f4 | |||
ce7702fbb7 | |||
6a1bdeb3a9 | |||
a61a3afd73 | |||
728e97b122 | |||
558e9edc4b | |||
195e420181 | |||
dd2aee0e10 | |||
851071c8e1 | |||
73fcb27251 | |||
2e7f164738 | |||
689d9ead5a | |||
f1f0115e1b | |||
ecf90f3662 | |||
58ab12310a | |||
4ceab76cd1 | |||
a2634219bc | |||
cd6e128a6d | |||
a472f35775 | |||
0558eb71d4 | |||
5a7310759e | |||
7e84c7e237 | |||
d7f79ed7d9 | |||
ba9e4b95ba | |||
e1cc1570c7 | |||
ecfe480394 | |||
ca2e15c8c5 | |||
194151367c | |||
87d9415223 | |||
7d52b4210a | |||
3c1b1c2967 | |||
0b9e012bba | |||
aa7e60c415 | |||
70b0f3a100 | |||
1c268038b2 | |||
6d335a2122 | |||
cc37289967 | |||
1ee216f7b1 | |||
76ac917230 | |||
3ced6b5db9 | |||
b6a55de5bd | |||
f6b1754dd1 | |||
17b5cf31d1 | |||
67c314b96c | |||
7fefed160f | |||
d9c1a97ef6 | |||
dafa562f51 | |||
bf4e5bce27 | |||
059193d09a | |||
5365044412 | |||
8fb8d468f9 | |||
136abd88e0 | |||
dedd89bc43 | |||
e2b432f759 | |||
4dc007460d | |||
2e40a2cf0c | |||
8ace840d50 | |||
8aa2396c36 | |||
082db767af | |||
0220a3c22b | |||
0212be3ac8 | |||
ec8092a99d | |||
03c17dedd2 | |||
bd9d57c746 | |||
51203647d4 | |||
037e24e877 | |||
81c1db550f | |||
4703744aa1 | |||
7476f80cbe | |||
0261110fa5 | |||
34ea0a2756 | |||
d891dbce96 | |||
a5b5b58659 | |||
18b3877eaa | |||
751131bcb0 | |||
7c6d8e2da5 | |||
bb536e1a89 | |||
13800abfbe | |||
da88798ff2 | |||
8ddf1fce66 | |||
fbc2a06ab9 | |||
dd93ccd26f | |||
b6c638ac0b | |||
e241a1f78f | |||
42e863cb93 | |||
fb5f15e757 | |||
09fd2426e3 | |||
5fa2c56889 | |||
a76173c0ec | |||
e1bdd9fa0f | |||
2dafce82df | |||
d4e668e6fd | |||
af8f7c06ad | |||
6c11a90bff | |||
59d5d6592e | |||
8641ee16ad | |||
643e0f7bbc | |||
c2e686217c | |||
d4c9e47cff | |||
0b241ea4ab | |||
c944521cb2 | |||
d3cc96415b | |||
dabeadea09 | |||
f0126eae61 | |||
8f214ca89d | |||
ee3442567a | |||
5d956ce884 | |||
fa5122af8e | |||
1edf5b2d89 | |||
58e72a6457 | |||
8238ac10f5 | |||
c739e94658 | |||
85fb7b04d0 | |||
93d68e494f | |||
6f4e96145a | |||
a93e226058 | |||
980a62ecfc | |||
3d90e2a606 | |||
c83b5fc771 | |||
7c27e27e27 | |||
024fbd48a2 | |||
5ec78adf11 | |||
cfc08dc06c | |||
331cbaf926 | |||
5aed77b30d | |||
2c25c54a7e | |||
57711561d6 | |||
1f779320d0 | |||
7f57ead946 | |||
26eddd0eff | |||
d3bb04f84c | |||
a0a2f60b44 | |||
69c9b6badc | |||
9b3451f380 | |||
12584bcfde | |||
b87fdc2ae1 | |||
a730800d76 | |||
7b62be4fa8 | |||
d39a4e38c3 | |||
a6a55dca21 | |||
4ad9192444 | |||
c08af9e96f | |||
3765e24f16 | |||
ff667bc576 | |||
81201a97ba | |||
d86d32bb55 | |||
feaf2ead69 | |||
f811ac3a99 | |||
9e74337e2d | |||
9886f95e62 | |||
38074e0a95 | |||
881ddbc2f2 | |||
8d76f4ccae | |||
3bff1fd013 | |||
5acacb78fb | |||
3c71e2f363 | |||
e2b4f317fb | |||
2e4a6f061e | |||
80c8131120 | |||
e7ce064c69 | |||
f206a15f29 | |||
7818b14b49 | |||
40d63c837f | |||
dea48bf34b | |||
0951725e36 | |||
503cc832d4 | |||
f7b872aba0 | |||
8b152137f6 | |||
2eeb9a2ace | |||
bfae7cd4e9 | |||
cb79156d24 | |||
57694a732d | |||
51ee4826a5 | |||
0762c0aa20 | |||
aeeed83b8b | |||
01438ff7bb | |||
1db734375a | |||
65f3c3d8bd | |||
bc25feab80 | |||
19a14cc8ad | |||
d4c576c2ae | |||
c50f4b1a5a | |||
78be5777cb | |||
c01656686d | |||
3a6d05bbf8 | |||
9b8603e505 | |||
bc293726ee | |||
8bce4b6fba | |||
26e9d73541 | |||
984bab8296 | |||
55586b578a | |||
d2054a55dd | |||
9c6c18f157 | |||
3fb1fa3dd9 | |||
d7c496eb28 | |||
0fdf4271f2 | |||
ffe0ba614b | |||
f12ec0fdeb | |||
02653f1792 | |||
241023a370 | |||
ecee0fe032 | |||
b88136fe31 | |||
788cc28063 | |||
a250a99b69 | |||
2509ea571f | |||
bdc56a20ce | |||
1929ef3458 | |||
81d3c2c469 | |||
7fba13c628 | |||
f4a8a94af8 | |||
98f505887e | |||
1d1fe1d9b5 | |||
be73029e54 | |||
4d3005ca5d | |||
72f4f6b1a0 | |||
bf3b383957 | |||
474de5c3d7 | |||
9c39b4346b | |||
899e84ca75 | |||
28ab943be4 | |||
d837278324 | |||
39ec9f5cfb | |||
6ddac6b3f2 | |||
66163f5e0c | |||
10831169d1 | |||
3ad397b6bc | |||
2991208cd9 | |||
8fa774e140 | |||
2384c3575e | |||
41f0bfde53 | |||
d4723795e6 | |||
37ed00f441 | |||
e91eafdfc3 | |||
ec276e013b | |||
0555516ebb | |||
3f14b7d364 | |||
18b98125ac | |||
4bd4f29759 | |||
bdb203bc5f | |||
04c2912450 | |||
b11e329351 | |||
ef4373f704 | |||
db9b5dcfeb | |||
15fcdfca2b | |||
6226818ad7 | |||
7c18c0d13b | |||
fe1a8b7d5e | |||
3ef40e9cb3 | |||
af3d16794f | |||
c52704b2ed | |||
a09b05bb49 | |||
7b74ccf192 | |||
74bb17316d | |||
65d1fa76e6 | |||
629de56f54 | |||
01812da816 | |||
c297bc733a | |||
28b69fd1f9 | |||
ff786421c5 | |||
f05ec619e3 | |||
b8e0ae4ed5 | |||
2484822b9d | |||
eabc087ebb | |||
d178f2f2f6 | |||
377f2c4a75 | |||
83855f7d6a | |||
92f68baaf9 | |||
82096288e2 | |||
2aa2af823d | |||
047543ca93 | |||
065e4f8fb8 | |||
0c286946d9 | |||
9078cf3acc | |||
5dca51f840 | |||
32ca4476c5 | |||
a9b165a63d | |||
9337436b71 | |||
e25a8a35e9 | |||
c0a788f750 | |||
ed59897119 | |||
5091786d9c | |||
55aa9b75f1 | |||
d5de32ddea | |||
c082154d58 | |||
bb67240055 | |||
cea680b727 | |||
61fb2666d0 | |||
e328ec8c3f | |||
d3c76f3a43 | |||
69cf3ae762 | |||
b39c3ec7de | |||
c4cdf5ee72 | |||
ec5bf7cc1f | |||
b11bb8d2f9 | |||
448389d888 | |||
e5cd484138 | |||
99826b7f1b | |||
d0327f8f73 | |||
90b27d36c9 | |||
1405d24a8e | |||
2ab16e97c2 | |||
414bbc7217 | |||
8beada36d2 | |||
6b55711f10 | |||
6b0771f1fe | |||
e865534903 | |||
f4e9a0aa02 | |||
a963d63ca8 | |||
07ecda1116 | |||
ffdb00ea19 | |||
014008472b | |||
340f91de3f | |||
6fef1bbd4b | |||
99629c9e09 | |||
9ec2c1a22a | |||
e7e6997472 | |||
f74a0bbaca | |||
c4824f8f78 | |||
9daacae794 | |||
a375393f2a | |||
7fc6bda614 | |||
7423177796 | |||
cce19c38d7 | |||
ba657ae647 | |||
997e901fee | |||
793e7fca09 | |||
fcfe45da92 | |||
0c6d279c54 | |||
15d2a8bf65 | |||
efd04b6601 | |||
1c739bd8ad | |||
098a5ac959 | |||
bfd0a97e8a | |||
030fe9596f | |||
56b8d82c42 | |||
471341447e | |||
2701b484e5 | |||
5ca30a2e43 | |||
8bd273e51b | |||
f86b1d2ef1 | |||
34a1cba331 | |||
97d789c52a | |||
c645a73e2e | |||
7e655c6451 | |||
e46ae9b9e5 | |||
c4d0ead5e1 | |||
39e9b4aa3e | |||
e561417c7c | |||
d361ac1b5f | |||
d0c772533b | |||
cc3e0e8fa0 | |||
0e198ad482 | |||
f8fb4b9ef4 | |||
22cf60914b | |||
3a9a3353a0 | |||
218e06a8a8 | |||
78f42f984d | |||
c0878f1717 | |||
7d8fbf64dc | |||
d8c692fc79 | |||
d4f308caca | |||
f0bb931ca9 | |||
48f8f1c4e4 | |||
d06b767f85 | |||
39a7556dbe | |||
cf59cfab26 | |||
b1b1c1dfc3 | |||
dabeb9bef9 | |||
3ca0b9ae28 | |||
4645e6389e | |||
451a620916 | |||
c3ca009d05 | |||
79048f5bd5 | |||
14dcd5bf0c | |||
66cfb61e6c | |||
1b35317f97 | |||
e17ed9a265 | |||
17de44c0af | |||
d841e6782f | |||
db862eac69 | |||
c32822cfa9 | |||
0587d33000 | |||
02d10168b6 | |||
cff611d7c1 | |||
7e8c31dc2f | |||
85f8706136 | |||
e99e2f5a6e | |||
bac24e6ceb | |||
acdf9b7f94 | |||
17cdca36ca | |||
86528b5fcc | |||
fbde0005d8 | |||
15de5234ef | |||
a4f177a125 | |||
3336dbf5ef | |||
810a62ae4d | |||
c8e1d7d8ba | |||
38624342bb | |||
2a126684af | |||
f725b7ef94 | |||
73aecebd08 | |||
912753d723 | |||
d3cc39a7f0 | |||
2b36019dfa | |||
4f558743e5 | |||
f9462216b8 | |||
d7fc1beb16 | |||
fc1c51174b | |||
92c3cde5cd | |||
5e68fe2df6 | |||
9e199a9f74 | |||
517d12c700 | |||
5ad27f2ec0 | |||
ac456501df | |||
419968daa2 | |||
2c6bf71111 | |||
c1e53b32ad | |||
a18046cd3b | |||
6d189bf813 | |||
a17df1c1e4 | |||
5de6d7f41a | |||
3a7cc40703 | |||
1334fba055 | |||
4ffa0ec4ee | |||
f23a924025 | |||
dc88ce74a9 | |||
dbb26cb983 | |||
bd2a360e90 | |||
2e288d6221 | |||
03bd34982e | |||
b1997b1ca2 | |||
84c5ef3ac9 | |||
ccca3aa3b6 | |||
3477794172 | |||
bf7900fded | |||
a12230e1f8 | |||
fab4a9ea8d | |||
69cccaa5f3 | |||
945b637cc2 | |||
e8a27b43a3 | |||
be83452c4a | |||
c0c01f355b | |||
e06b735bcb | |||
7319bd1528 | |||
11be114e1d | |||
7cf7555c7d | |||
bc8395a541 | |||
f7b4069631 | |||
c0afdf69b1 | |||
1b8d2daf20 | |||
8e12201ecc | |||
8ae22c246e | |||
fdbf53e6bb | |||
d2d302137c | |||
37f49fbf09 | |||
9c31fc5a0a | |||
46d1433606 | |||
3dfde24a84 | |||
6693333a84 | |||
a8a6cd2973 | |||
eaae50f9ef | |||
60c4a1b1bd | |||
a77810f8e7 | |||
670a744eca | |||
fbeb6881db | |||
cf82e414f7 | |||
dd93a1fc87 | |||
26bc04ecbf | |||
42290c23a1 | |||
2f5ad8e7b0 | |||
641ac8bea7 | |||
3eb5a0385b | |||
c907f6fcd6 | |||
e1d15b8adf | |||
35a9adeb11 | |||
826483d4c2 | |||
110fddc026 | |||
49c1fe2dba | |||
92384f4b51 | |||
c5fbfa824b | |||
3b7883fe0f | |||
30b4337f11 | |||
4cf73cc03a | |||
f3b16d33d6 | |||
d8b44d7263 | |||
022bc55575 | |||
7f9ab477e7 | |||
8c4b3c3a02 | |||
4dad4d9291 | |||
aaa80bfb82 | |||
a8c2414f19 | |||
8a262749e8 | |||
1c6054c720 | |||
0dcbdd4262 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
.working
|
||||
/build
|
||||
/.working
|
||||
result
|
||||
result-*
|
||||
/secrets/local.nix
|
||||
|
15
.sops.yaml
15
.sops.yaml
@@ -1,10 +1,12 @@
|
||||
keys:
|
||||
- &user_desko_colin age1tnl4jfgacwkargzeqnhzernw29xx8mkv73xh6ufdyde6q7859slsnzf24x
|
||||
- &user_flowy_colin age1nw3z25gn6l8gxneqw43tp8d2354c83d9sn3r0dqy5tapakdwhyvse0j2cc
|
||||
- &user_lappy_colin age1j2pqnl8j0krdzk6npe93s4nnqrzwx978qrc0u570gzlamqpnje9sc8le2g
|
||||
- &user_servo_colin age1z8fauff34cdecr6sjkre260luzxcca05kpcwvhx988d306tpcejsp63znu
|
||||
- &user_moby_colin age1zsrsvd7j6l62fjxpfd2qnhqlk8wk4p8r0dtxpe4sdgnh2474095qdu7xj9
|
||||
- &host_crappy age1hl50ufuxnqy0jnk8fqeu4tclh4vte2xn2d59pxff0gun20vsmv5sp78chj
|
||||
- &host_desko age1vnw7lnfpdpjn62l3u5nyv5xt2c965k96p98kc43mcnyzpetrts9q54mc9v
|
||||
- &host_flowy age1azm6carlm6tdjup37u5dr40585vjujajev70u4glwd9sv7swa99sk6mswx
|
||||
- &host_lappy age1w7mectcjku6x3sd8plm8wkn2qfrhv9n6zhzlf329e2r2uycgke8qkf9dyn
|
||||
- &host_servo age1tzlyex2z6t88tg9h82943e39shxhmqeyr7ywhlwpdjmyqsndv3qq27x0rf
|
||||
- &host_moby age18vq5ktwgeaysucvw9t67drqmg5zd5c5k3le34yqxckkfj7wqdqgsd4ejmt
|
||||
@@ -13,11 +15,13 @@ creation_rules:
|
||||
key_groups:
|
||||
- age:
|
||||
- *user_desko_colin
|
||||
- *user_flowy_colin
|
||||
- *user_lappy_colin
|
||||
- *user_servo_colin
|
||||
- *user_moby_colin
|
||||
- *host_crappy
|
||||
- *host_desko
|
||||
- *host_flowy
|
||||
- *host_lappy
|
||||
- *host_servo
|
||||
- *host_moby
|
||||
@@ -25,6 +29,7 @@ creation_rules:
|
||||
key_groups:
|
||||
- age:
|
||||
- *user_desko_colin
|
||||
- *user_flowy_colin
|
||||
- *user_lappy_colin
|
||||
- *user_servo_colin
|
||||
- *host_servo
|
||||
@@ -32,18 +37,28 @@ creation_rules:
|
||||
key_groups:
|
||||
- age:
|
||||
- *user_desko_colin
|
||||
- *user_flowy_colin
|
||||
- *user_lappy_colin
|
||||
- *host_desko
|
||||
- path_regex: secrets/flowy*
|
||||
key_groups:
|
||||
- age:
|
||||
- *user_lappy_colin
|
||||
- *user_flowy_colin
|
||||
- *user_desko_colin
|
||||
- *host_flowy
|
||||
- path_regex: secrets/lappy*
|
||||
key_groups:
|
||||
- age:
|
||||
- *user_lappy_colin
|
||||
- *user_flowy_colin
|
||||
- *user_desko_colin
|
||||
- *host_lappy
|
||||
- path_regex: secrets/moby*
|
||||
key_groups:
|
||||
- age:
|
||||
- *user_desko_colin
|
||||
- *user_flowy_colin
|
||||
- *user_lappy_colin
|
||||
- *user_moby_colin
|
||||
- *host_moby
|
||||
|
14
TODO.md
14
TODO.md
@@ -20,6 +20,12 @@
|
||||
- rsync to ssh target fails because of restrictive sandboxing
|
||||
- `/mnt/.servo_ftp` retries every 10s, endlessly, rather than doing a linear backoff
|
||||
- repro by `systemctl stop sftpgo` on servo, then watching `mnt-.servo_ftp.{mount,timer}` on desko
|
||||
- `ovpns` (and presumably `doof`) net namespaces aren't firewalled
|
||||
- not great because things like `bitmagnet` expose unprotected admin APIs by default!
|
||||
- moby: NetworkManager doesn't connect to network until _after_ `systemctl restart NetworkManager`
|
||||
- probably a dependency ordering issue
|
||||
- e.g. we try to bring up NetworkManager before bringing up `lo`
|
||||
- could be a perms issue (over-restrictive sandboxing)
|
||||
|
||||
## REFACTORING:
|
||||
- fold hosts/modules/ into toplevel modules/
|
||||
@@ -28,6 +34,10 @@
|
||||
- ~/dev becomes a link to ~/ref/cat/mine
|
||||
- fold hosts/common/home/ssh.nix -> hosts/common/users/colin.nix
|
||||
- don't hardcode IP addresses so much in servo
|
||||
- modules/netns: migrate `sane.netns.$NS.services = [ FOO ]` option to be `systemd.services.$FOO.sane.netns = NS`
|
||||
- then change the ExecStartPre check to not ping `ipinfo.net` or whatever.
|
||||
either port all of `sane-ip-check` to use a self-hosted reflector,
|
||||
or settle for something like `test -eq "$(ip route get ...)" "$expectedGateway"`
|
||||
|
||||
### sops/secrets
|
||||
- user secrets could just use `gocryptfs`, like with ~/private?
|
||||
@@ -47,7 +57,10 @@
|
||||
|
||||
|
||||
## IMPROVEMENTS:
|
||||
- servo: expand /boot to 2 GiB like all other hosts
|
||||
- moby: port to systemd-boot
|
||||
- sane-deadlines: show day of the week for upcoming items
|
||||
- and only show on "first" terminal opened; not on Ctrl+N terminals
|
||||
- curlftpfs: replace with something better
|
||||
- safer (rust? actively maintained? sandboxable?)
|
||||
- handles spaces/symbols in filenames
|
||||
@@ -87,6 +100,7 @@
|
||||
- make dconf stuff less monolithic
|
||||
- i.e. per-app dconf profiles for those which need it. possible static config.
|
||||
- flatpak/spectrum has some stuff to proxy dconf per-app
|
||||
- rework `programs` API to be just an overlay which wraps each binary in an env with XDG_DATA_DIRS etc set & the config/state links placed in /nix/store instead of $HOME.
|
||||
|
||||
### user experience
|
||||
- setup a real calendar system, for recurring events
|
||||
|
@@ -1,7 +1,10 @@
|
||||
to add a host:
|
||||
- create the new nix targets
|
||||
- hosts/by-name/HOST
|
||||
- let the toplevel (flake.nix) know about HOST
|
||||
- let the toplevel (impure.nix) know about HOST
|
||||
- let the other hosts know about this host (hosts/common/hosts.nix)
|
||||
- let sops know about the host's pubkey (.sops.yaml)
|
||||
- re-encrypt all sops keys in secrets/common
|
||||
- build and flash an image
|
||||
- optionally expand the rootfs
|
||||
- `cfdisk /dev/sda2` -> resize partition
|
||||
@@ -22,4 +25,9 @@ to add a host:
|
||||
- instructions in hosts/common/secrets.nix
|
||||
- run `ssh-to-age` on user/host pubkeys
|
||||
- add age key to .sops.yaml
|
||||
- update encrypted secrets: `sops updatekeys path/to/secret.yaml`
|
||||
- update encrypted secrets: `find secrets -type f -exec sops updatekeys -y '{}' ';'`
|
||||
- setup wireguard keys
|
||||
- `pk=$(wg genkey)`
|
||||
- `echo "$pk" | sops encrypt --filename-override secrets/$(hostname)/wg-home.priv.bin --output secrets/$(hostname)/wg-home.priv.bin`
|
||||
- `pub=$(echo "$pk" | wg pubkey)`
|
||||
- add pubkey to hosts/common/hosts.nix
|
||||
|
44
doc/migrating-storage-device.md
Normal file
44
doc/migrating-storage-device.md
Normal file
@@ -0,0 +1,44 @@
|
||||
## migrating a host to a new drive
|
||||
1. copy persistent data off of the host:
|
||||
```sh
|
||||
$ mkdir -p mnt old/persist
|
||||
$ mount /dev/$old mnt
|
||||
$ rsync -arv mnt/persist/ old/persist/
|
||||
```
|
||||
|
||||
2. flash the new drive
|
||||
```
|
||||
$ nix-build -A hosts.moby.img
|
||||
$ dd if=$(readlink ./result) of=/dev/$new bs=4M oflag=direct conv=sync status=progress
|
||||
```
|
||||
|
||||
3. expand the partition and filesystem
|
||||
```sh
|
||||
$ cfdisk /dev/$new
|
||||
# scroll to the last partition
|
||||
> Resize
|
||||
leave at default (max)
|
||||
> Write
|
||||
type "yes"
|
||||
> Quit
|
||||
$ btrfs filesystem resize max /dev/$new
|
||||
```
|
||||
|
||||
4. copy data onto the new host
|
||||
```
|
||||
$ mkdir new
|
||||
$ mount /dev/$new new
|
||||
# if you want to use btrfs snapshots (e.g. snapper), then create the data directory as a subvolume:
|
||||
$ sudo btrfs subvolume create new/persist
|
||||
# restore the data
|
||||
$ rsync -arv old/persist/ new/persist/
|
||||
```
|
||||
|
||||
5. ensure/fix ownership
|
||||
```
|
||||
$ chmod -R a+rX new/nix
|
||||
# or, let the nix daemon do it:
|
||||
$ nix copy --no-check-sigs --to new $(nix-build -A hosts.moby)
|
||||
```
|
||||
```
|
||||
6. insert the disk into the system, and boot!
|
@@ -1,5 +1,5 @@
|
||||
## deploying to SD card
|
||||
- build a toplevel config: `nix build '.#hostSystems.moby'`
|
||||
- build a toplevel config: `nix build '.#hosts.moby.img'`
|
||||
- mount a system:
|
||||
- `mkdir -p root/{nix,boot}`
|
||||
- `mount /dev/sdX1 root/boot`
|
||||
|
19
hosts/by-name/cadey/default.nix
Normal file
19
hosts/by-name/cadey/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
# MAME arcade cabinet
|
||||
# Raspberry Pi 400:
|
||||
# - quad-core Cortex-A72 @ 1.8 GHz (ARMv8-A 64; BCM2711)
|
||||
# - 4GiB RAM
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./fs.nix
|
||||
];
|
||||
|
||||
sane.hal.rpi-400.enable = true;
|
||||
sane.roles.client = true; # for WiFi creds
|
||||
|
||||
# TODO: port to `sane.programs` interface
|
||||
services.xserver.desktopManager.kodi.enable = true;
|
||||
|
||||
# /boot space is at a premium, especially with uncompressed kernels. default was 20.
|
||||
# boot.loader.generic-extlinux-compatible.configurationLimit = 10;
|
||||
}
|
17
hosts/by-name/cadey/fs.nix
Normal file
17
hosts/by-name/cadey/fs.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/cccccccc-aaaa-dddd-eeee-000020250621";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2025-0621";
|
||||
fsType = "vfat";
|
||||
};
|
||||
}
|
@@ -1,9 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./fs.nix
|
||||
];
|
||||
|
||||
# firewall has to be open to allow clients to use services hosted on this device,
|
||||
# like `ollama`
|
||||
sane.ports.openFirewall = true;
|
||||
|
||||
# sane.programs.devPkgs.enableFor.user.colin = true;
|
||||
# sane.guest.enable = true;
|
||||
|
||||
@@ -22,9 +26,9 @@
|
||||
sane.roles.build-machine.enable = true;
|
||||
sane.roles.client = true;
|
||||
sane.roles.pc = true;
|
||||
sane.roles.work = true;
|
||||
sane.services.ollama.enable = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
sane.services.wg-home.ip = config.sane.hosts.by-name."desko".wg-home.ip;
|
||||
sane.ovpn.addrV4 = "172.26.55.21";
|
||||
# sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:20c1:a73c";
|
||||
sane.services.rsync-net.enable = true;
|
||||
@@ -46,11 +50,8 @@
|
||||
|
||||
sane.programs.mpv.config.defaultProfile = "high-quality";
|
||||
|
||||
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
|
||||
# needed to use libimobiledevice/ifuse, for iphone sync
|
||||
services.usbmuxd.enable = true;
|
||||
|
||||
# TODO(2025-01-01): re-enable once rocm build is fixed: <https://github.com/NixOS/nixpkgs/pull/367695>
|
||||
# hardware.amdgpu.opencl.enable = true; # desktop (AMD's opencl implementation AKA "ROCM"); probably required for ollama
|
||||
hardware.amdgpu.opencl.enable = true; # desktop (AMD's opencl implementation AKA "ROCM"); probably required for ollama
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
fileSystems."/tmp".options = [ "size=128G" ];
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/845d85bf-761d-431b-a406-e6f20909154f";
|
||||
device = "/dev/disk/by-uuid/dddddddd-eeee-5555-cccc-000020250527";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd"
|
||||
@@ -15,7 +15,7 @@
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/5049-9AFD";
|
||||
device = "/dev/disk/by-uuid/2025-0527";
|
||||
fsType = "vfat";
|
||||
};
|
||||
}
|
||||
|
25
hosts/by-name/flowy/default.nix
Normal file
25
hosts/by-name/flowy/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./fs.nix
|
||||
];
|
||||
|
||||
sane.roles.client = true;
|
||||
sane.roles.pc = true;
|
||||
sane.roles.work = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
# sane.ovpn.addrV4 = "172.23.119.72";
|
||||
|
||||
# sane.guest.enable = true;
|
||||
|
||||
sane.programs.sane-private-unlock-remote.enableFor.user.colin = true;
|
||||
sane.programs.sane-private-unlock-remote.config.hosts = [ "servo" ];
|
||||
|
||||
sane.programs.firefox.config.formFactor = "laptop";
|
||||
sane.programs.itgmania.enableFor.user.colin = true;
|
||||
sane.programs.sway.enableFor.user.colin = true;
|
||||
|
||||
sops.secrets.colin-passwd.neededForUsers = true;
|
||||
|
||||
sane.services.rsync-net.enable = true;
|
||||
}
|
17
hosts/by-name/flowy/fs.nix
Normal file
17
hosts/by-name/flowy/fs.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/ffffffff-1111-0000-eeee-000020250531";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2025-0531";
|
||||
fsType = "vfat";
|
||||
};
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./fs.nix
|
||||
@@ -7,12 +7,10 @@
|
||||
sane.roles.client = true;
|
||||
sane.roles.pc = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
sane.services.wg-home.ip = config.sane.hosts.by-name."lappy".wg-home.ip;
|
||||
sane.ovpn.addrV4 = "172.23.119.72";
|
||||
# sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:0332:aa96/128";
|
||||
|
||||
# sane.guest.enable = true;
|
||||
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
|
||||
sane.programs.sane-private-unlock-remote.enableFor.user.colin = true;
|
||||
sane.programs.sane-private-unlock-remote.config.hosts = [ "servo" ];
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# - Mobian wiki: <https://wiki.mobian-project.org/doku.php?id=start>
|
||||
# - recommended apps, chatrooms
|
||||
|
||||
{ config, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./fs.nix
|
||||
@@ -16,7 +16,6 @@
|
||||
sane.roles.client = true;
|
||||
sane.roles.handheld = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip;
|
||||
sane.ovpn.addrV4 = "172.24.87.255";
|
||||
# sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:18cd:a72b";
|
||||
|
||||
@@ -60,5 +59,9 @@
|
||||
sane.programs.mpv.config.defaultProfile = "fast";
|
||||
|
||||
# /boot space is at a premium, especially with uncompressed kernels. default was 20.
|
||||
boot.loader.generic-extlinux-compatible.configurationLimit = 10;
|
||||
# boot.loader.generic-extlinux-compatible.configurationLimit = 10;
|
||||
|
||||
# TODO: switch to systemd-boot
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
boot.loader.systemd-boot.enable = false;
|
||||
}
|
||||
|
@@ -1,10 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./fs.nix
|
||||
];
|
||||
|
||||
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
sane.persist.enable = false; # what we mean here is that the image is immutable; `/` is still tmpfs.
|
||||
sane.nixcache.enable = false; # don't want to be calling out to dead machines that we're *trying* to rescue
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -31,8 +31,6 @@
|
||||
# XXX(2024-07-27): this is incompatible if using s6, which needs to auto-login as `colin` to start its user services.
|
||||
services.getty.autologinUser = "root";
|
||||
|
||||
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
|
||||
# both transmission and ipfs try to set different net defaults.
|
||||
# we just use the most aggressive of the two here:
|
||||
boot.kernel.sysctl = {
|
||||
|
@@ -41,10 +41,12 @@
|
||||
# i don't know what guarantees NixOS/systemd make about that, so specifying all devices for now
|
||||
# "device=/dev/disk/by-partuuid/14a7d00a-be53-2b4e-96f9-7e2c964674ec" #< removed 2024-11-24 (for capacity upgrade)
|
||||
"device=/dev/disk/by-partuuid/409a147e-2282-49eb-87a7-c968032ede88" #< added 2024-11-24
|
||||
"device=/dev/disk/by-partuuid/6b86cc10-c3cc-ec4d-b20d-b6688f0959a6"
|
||||
# "device=/dev/disk/by-partuuid/6b86cc10-c3cc-ec4d-b20d-b6688f0959a6" #< removed 2025-06-04 (early drive failure; capacity upgrade)
|
||||
# "device=/dev/disk/by-partuuid/7fd85cac-b6f3-8248-af4e-68e703d11020" #< removed 2024-11-13 (early drive failure)
|
||||
"device=/dev/disk/by-partuuid/92ebbbfb-022f-427d-84d5-39349d4bc02a" #< added 2025-05-14
|
||||
"device=/dev/disk/by-partuuid/9e6c06b0-4a39-4d69-813f-1f5992f62ed7" #< added 2025-06-05
|
||||
"device=/dev/disk/by-partuuid/d9ad5ebc-0fc4-4d89-9fd0-619ce5210f1b" #< added 2024-11-13
|
||||
"device=/dev/disk/by-partuuid/ef0e5c7b-fccf-f444-bac4-534424326159"
|
||||
# "device=/dev/disk/by-partuuid/ef0e5c7b-fccf-f444-bac4-534424326159" #< removed 2025-05-14 (early drive failure)
|
||||
"nofail"
|
||||
# "x-systemd.before=local-fs.target"
|
||||
"x-systemd.device-bound=false" #< don't unmount when `device` disappears (i thought this was necessary, for drive replacement, but it might not be)
|
||||
@@ -67,8 +69,9 @@
|
||||
mode = "0775";
|
||||
}];
|
||||
sane.fs."/var/media/archive".dir = {};
|
||||
sane.fs."/var/media/archive/temp".dir = {};
|
||||
# this is file.text instead of symlink.text so that it may be read over a remote mount (where consumers might not have any /nix/store/.../README.md path)
|
||||
sane.fs."/var/media/archive/README.md".file.text = ''
|
||||
sane.fs."/var/media/archive/temp/README.md".file.text = ''
|
||||
this directory is for media i wish to remove from my library,
|
||||
but keep for a short time in case i reverse my decision.
|
||||
treat it like a system trash can.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
sane.ovpn.addrV4 = "172.23.174.114";
|
||||
sane.ovpn.addrV4 = "172.23.174.114"; #< this applies to the dynamic VPNs -- NOT the static VPN
|
||||
# sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:8df3:14b0";
|
||||
|
||||
# OVPN CONFIG (https://www.ovpn.com):
|
||||
@@ -12,9 +12,9 @@
|
||||
dns.ipv4 = "46.227.67.134"; #< DNS requests inside the namespace are forwarded here
|
||||
# wg.port = 51822;
|
||||
wg.privateKeyFile = config.sops.secrets.wg_ovpns_privkey.path;
|
||||
wg.address.ipv4 = "185.157.162.178";
|
||||
wg.peer.publicKey = "SkkEZDCBde22KTs/Hc7FWvDBfdOCQA4YtBEuC3n5KGs=";
|
||||
wg.peer.endpoint = "vpn36.prd.amsterdam.ovpn.com:9930";
|
||||
# wg.peer.endpoint = "185.157.162.10:9930";
|
||||
wg.address.ipv4 = "146.70.100.165"; #< IP address for my end of the VPN tunnel. for OVPN public IPv4, this is also the public IP address.
|
||||
wg.peer.publicKey = "xc9p/lf2uLg6IGDh54E0Pbc6WI/J9caaByhwD4Uiu0Q="; #< pubkey by which i can authenticate OVPN, varies per OVPN endpoint
|
||||
wg.peer.endpoint = "vpn31.prd.losangeles.ovpn.com:9930";
|
||||
# wg.peer.endpoint = "45.83.89.131:9930";
|
||||
};
|
||||
}
|
||||
|
@@ -4,7 +4,6 @@
|
||||
sane.services.wg-home.visibleToWan = true;
|
||||
sane.services.wg-home.forwardToWan = true;
|
||||
sane.services.wg-home.routeThroughServo = false;
|
||||
sane.services.wg-home.ip = config.sane.hosts.by-name."servo".wg-home.ip;
|
||||
services.unbound.settings.server.interface = [
|
||||
# provide DNS to my wireguard clients
|
||||
config.sane.hosts.by-name."servo".wg-home.ip
|
||||
|
70
hosts/by-name/servo/services/bitmagnet.nix
Normal file
70
hosts/by-name/servo/services/bitmagnet.nix
Normal file
@@ -0,0 +1,70 @@
|
||||
# bitmagnet is a DHT crawler. it discovers publicly reachable torrents and indexes:
|
||||
# - torrent's magnet URI
|
||||
# - torrent's name
|
||||
# - torrent's file list (the first 100 files, per torrent), including size and "type" (e.g. video)
|
||||
# - seeder/leecher counts
|
||||
# - torrent's size
|
||||
# it provides a web UI to query these, especially a search form.
|
||||
# data is stored in postgresql as `bitmagnet` db (`sudo -u bitmagnet psql`)
|
||||
# after 30 days of operation:
|
||||
# - 12m torrents discovered
|
||||
# - 77GB database size => 6500B per torrent
|
||||
{ config, ... }:
|
||||
{
|
||||
services.bitmagnet.enable = true;
|
||||
sane.netns.ovpns.services = [ "bitmagnet" ];
|
||||
sane.ports.ports."3334" = {
|
||||
protocol = [ "tcp" "udp" ];
|
||||
# visibleTo.ovpns = true; #< not needed: it runs in the ovpns namespace
|
||||
description = "colin-bitmagnet";
|
||||
};
|
||||
|
||||
services.bitmagnet.settings = {
|
||||
# dht_crawler.scaling_factor: how rapidly to crawl the DHT.
|
||||
# influences number of worker threads, buffer sizes, etc.
|
||||
# default: 10.
|
||||
# docs claim "diminishing returns" above 10, but seems weakly confident about that.
|
||||
dht_crawler.scaling_factor = 64;
|
||||
# http_server.local_address: `$addr:$port` to `listen` to.
|
||||
# default is `:3333`, which listens on _all_ interfaces.
|
||||
# the http server exposes unprotected admin endpoints though, so restrict to private interfaces:
|
||||
http_server.local_address = "${config.sane.netns.ovpns.veth.netns.ipv4}:3333";
|
||||
# tmdb.enabled: whether to query The Movie DataBase to resolve filename -> movie title.
|
||||
# default: true.
|
||||
# docs claim 1 query per second rate limit, unless you supply your own API key.
|
||||
tmdb.enabled = false;
|
||||
};
|
||||
|
||||
# bitmagnet web client
|
||||
# protected by passwd because it exposes some mutation operations:
|
||||
# - queuing "jobs"
|
||||
# - deleting torrent infos (in bulk)
|
||||
# it uses graphql for _everything_, so no easy way to disable just the mutations (and remove the password) AFAICT.
|
||||
services.nginx.virtualHosts."bitmagnet.uninsane.org" = {
|
||||
# basicAuth is cleartext user/pw, so FORCE this to happen over SSL
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${config.sane.netns.ovpns.veth.netns.ipv4}:3333";
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
basicAuthFile = config.sops.secrets.bitmagnet_passwd.path;
|
||||
};
|
||||
sops.secrets."bitmagnet_passwd" = {
|
||||
owner = config.users.users.nginx.name;
|
||||
mode = "0400";
|
||||
};
|
||||
|
||||
sane.dns.zones."uninsane.org".inet.CNAME."bitmagnet" = "native";
|
||||
|
||||
systemd.services.bitmagnet = {
|
||||
# hardening (systemd-analyze security bitmagnet). base nixos service is already partially hardened.
|
||||
serviceConfig.CapabilityBoundingSet = "";
|
||||
serviceConfig.SystemCallArchitectures = "native";
|
||||
serviceConfig.PrivateDevices = true;
|
||||
serviceConfig.PrivateUsers = true;
|
||||
serviceConfig.ProtectProc = "invisible";
|
||||
serviceConfig.ProcSubset = "pid";
|
||||
serviceConfig.SystemCallFilter = [ "@system-service" "~@privileged" "~@resources" ];
|
||||
};
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
# as of 2023/12/02: complete blockchain is 530 GiB (on-disk size may be larger)
|
||||
# as of 2025/08/06: on-disk blockchain as reported by `du` is 732 GiB
|
||||
#
|
||||
# ports:
|
||||
# - 8333: for node-to-node communications
|
||||
@@ -72,13 +73,18 @@ in
|
||||
proxy=127.0.0.1:9050
|
||||
'';
|
||||
extraCmdlineOptions = [
|
||||
# `man bitcoind` for options
|
||||
# "-assumevalid=0" # to perform script validation on all blocks, instead of just the latest checkpoint published by bitcoin-core
|
||||
# "-debug"
|
||||
# "-debug=estimatefee"
|
||||
# "-debug=leveldb"
|
||||
# "-debug=http"
|
||||
# "-debug=net"
|
||||
"-debug=proxy"
|
||||
"-debug=rpc"
|
||||
# "-debug=validation"
|
||||
# "-reindex" # wipe chainstate, block index, other indices; rebuild from blk*.dat (takes 2.5hrs)
|
||||
# "-reindex-chainstate" # wipe chainstate; rebuild from blk*.dat
|
||||
];
|
||||
};
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./bitmagnet.nix
|
||||
./coturn.nix
|
||||
./cryptocurrencies
|
||||
./email
|
||||
@@ -21,7 +22,7 @@
|
||||
./minidlna.nix
|
||||
./mumble.nix
|
||||
./navidrome.nix
|
||||
./nginx.nix
|
||||
./nginx
|
||||
./nixos-prebuild.nix
|
||||
./ntfy
|
||||
./pict-rs.nix
|
||||
|
@@ -25,10 +25,10 @@
|
||||
#
|
||||
# debugging: general connectivity issues
|
||||
# - test that inbound port 25 is unblocked:
|
||||
# - `curl https://canyouseeme.org/ --data 'port=25&IP=185.157.162.178' | grep 'see your service'`
|
||||
# - `curl https://canyouseeme.org/ --data 'port=25&IP=$MX_IP' | grep 'see your service'`
|
||||
# - and retry with port 465, 587
|
||||
# - i think this API requires the queried IP match the source IP
|
||||
# - if necessary, `systemctl stop postfix` and `sudo nc -l 185.157.162.178 25`, then try https://canyouseeme.org
|
||||
# - if necessary, `systemctl stop postfix` and `sudo nc -l $MX_IP 25`, then try https://canyouseeme.org
|
||||
|
||||
{ ... }:
|
||||
{
|
||||
|
@@ -143,5 +143,5 @@
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.dovecot2.serviceConfig.RestartSec = lib.mkForce "15s"; # nixos defaults this to 1s
|
||||
systemd.services.dovecot.serviceConfig.RestartSec = lib.mkForce "15s"; # nixos defaults this to 1s
|
||||
}
|
||||
|
@@ -99,8 +99,10 @@ in
|
||||
services.postfix.hostname = "mx.uninsane.org";
|
||||
services.postfix.origin = "uninsane.org";
|
||||
services.postfix.destination = [ "localhost" "uninsane.org" ];
|
||||
services.postfix.sslCert = "/var/lib/acme/mx.uninsane.org/fullchain.pem";
|
||||
services.postfix.sslKey = "/var/lib/acme/mx.uninsane.org/key.pem";
|
||||
services.postfix.config.smtpd_tls_chain_files = [
|
||||
"/var/lib/acme/mx.uninsane.org/key.pem"
|
||||
"/var/lib/acme/mx.uninsane.org/fullchain.pem"
|
||||
];
|
||||
|
||||
# see: `man 5 virtual`
|
||||
services.postfix.virtual = ''
|
||||
@@ -112,7 +114,7 @@ in
|
||||
# smtpd_milters = local:/run/opendkim/opendkim.sock
|
||||
# milter docs: http://www.postfix.org/MILTER_README.html
|
||||
# mail filters for receiving email and from authorized SMTP clients (i.e. via submission)
|
||||
# smtpd_milters = inet:185.157.162.190:8891
|
||||
# smtpd_milters = inet:$IP:8891
|
||||
# opendkim.sock will add a Authentication-Results header, with `dkim=pass|fail|...` value to received messages
|
||||
smtpd_milters = "unix:/run/opendkim/opendkim.sock";
|
||||
# mail filters for sendmail
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# config options: <https://docs.gitea.io/en-us/administration/config-cheat-sheet/>
|
||||
# TODO: service shouldn't run as `git` user, but as `gitea`
|
||||
{ pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
sane.persist.sys.byStore.private = [
|
||||
@@ -122,9 +122,20 @@
|
||||
|
||||
# services.openssh.settings.UsePAM = true; #< required for `git` user to authenticate
|
||||
|
||||
services.anubis.instances."git.uninsane.org" = {
|
||||
settings.TARGET = "http://127.0.0.1:3000";
|
||||
botPolicy.openGraph.enabled = true;
|
||||
};
|
||||
|
||||
# hosted git (web view and for `git <cmd>` use
|
||||
# TODO: enable publog?
|
||||
services.nginx.virtualHosts."git.uninsane.org" = {
|
||||
services.nginx.virtualHosts."git.uninsane.org" = let
|
||||
# XXX(2025-07-24): gitea's still being crawled, even with robots.txt.
|
||||
# the load is less than when Anthropic first started, but it's still pretty high (like 600%).
|
||||
# place behind anubis to prevent AI crawlers from hogging my CPU (gitea is slow to render pages).
|
||||
proxyPass = "http://unix:${config.services.anubis.instances."git.uninsane.org".settings.BIND}";
|
||||
# proxyPass = "http://127.0.0.1:3000";
|
||||
in {
|
||||
forceSSL = true; # gitea complains if served over a different protocol than its config file says
|
||||
enableACME = true;
|
||||
# inherit kTLS;
|
||||
@@ -133,16 +144,18 @@
|
||||
'';
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3000";
|
||||
inherit proxyPass;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
# fuck you @anthropic
|
||||
locations."= /robots.txt".extraConfig = ''
|
||||
return 200 "User-agent: *\nDisallow: /\n";
|
||||
'';
|
||||
# locations."= /robots.txt".extraConfig = ''
|
||||
# return 200 "User-agent: *\nDisallow: /\n";
|
||||
# '';
|
||||
# gitea serves all `raw` files as content-type: plain, but i'd like to serve them as their actual content type.
|
||||
# or at least, enough to make specific pages viewable (serving unoriginal content as arbitrary content type is dangerous).
|
||||
locations."~ ^/colin/phone-case-cq/raw/.*.html" = {
|
||||
proxyPass = "http://127.0.0.1:3000";
|
||||
inherit proxyPass;
|
||||
recommendedProxySettings = true;
|
||||
extraConfig = ''
|
||||
proxy_hide_header Content-Type;
|
||||
default_type text/html;
|
||||
@@ -150,7 +163,8 @@
|
||||
'';
|
||||
};
|
||||
locations."~ ^/colin/phone-case-cq/raw/.*.js" = {
|
||||
proxyPass = "http://127.0.0.1:3000";
|
||||
inherit proxyPass;
|
||||
recommendedProxySettings = true;
|
||||
extraConfig = ''
|
||||
proxy_hide_header Content-Type;
|
||||
default_type text/html;
|
||||
|
@@ -56,6 +56,7 @@ lib.mkIf false #< 2024/09/30: disabled because i haven't used it in several mon
|
||||
|
||||
locations."/ws" = {
|
||||
proxyPass = "http://127.0.0.1:7890";
|
||||
recommendedProxySettings = true;
|
||||
# XXX not sure how much of this is necessary
|
||||
extraConfig = ''
|
||||
proxy_http_version 1.1;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# TODO: split this file apart into smaller files to make it easier to understand
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
dyn-dns = config.sane.services.dyn-dns;
|
||||
@@ -55,8 +55,7 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
services.hickory-dns.settings.zones = [ "uninsane.org" ];
|
||||
|
||||
services.hickory-dns.settings.zones = builtins.attrNames config.sane.dns.zones;
|
||||
|
||||
networking.nat.enable = true; #< TODO: try removing this?
|
||||
# networking.nat.extraCommands = ''
|
||||
|
@@ -27,6 +27,7 @@ lib.mkIf false # i don't actively use ipfs anymore
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8080";
|
||||
recommendedProxySettings = true;
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Ipfs-Gateway-Prefix "";
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#
|
||||
# N.B.: default install DOES NOT SUPPORT DLNA out of the box.
|
||||
# one must install it as a "plugin", which can be done through the UI.
|
||||
{ lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
# lib.mkIf false #< XXX(2024-11-17): disabled because it hasn't been working for months; web UI hangs on load, TVs see no files
|
||||
{
|
||||
|
@@ -27,7 +27,10 @@
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
# inherit kTLS;
|
||||
locations."/".proxyPass = "http://127.0.0.1:8013";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8013";
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
locations."= /robots.txt".extraConfig = ''
|
||||
return 200 "User-agent: *\nDisallow: /\n";
|
||||
'';
|
||||
|
@@ -17,6 +17,7 @@ lib.mkIf false #< 2024/09/30: disabled because i haven't used this for several
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${builtins.toString port}";
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
locations."= /robots.txt".extraConfig = ''
|
||||
return 200 "User-agent: *\nDisallow: /\n";
|
||||
|
@@ -123,6 +123,7 @@ in
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8008";
|
||||
recommendedProxySettings = true;
|
||||
extraConfig = ''
|
||||
# allow uploading large files (matrix enforces a separate limit, downstream)
|
||||
client_max_body_size 512m;
|
||||
|
@@ -184,6 +184,7 @@ in
|
||||
enableACME = true;
|
||||
locations."/media" = {
|
||||
proxyPass = "http://127.0.0.1:11111";
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -34,7 +34,10 @@ lib.mkIf false #< i don't actively use navidrome
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
# inherit kTLS;
|
||||
locations."/".proxyPass = "http://127.0.0.1:4533";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:4533";
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
|
||||
sane.dns.zones."uninsane.org".inet.CNAME."music" = "native";
|
||||
|
@@ -1,270 +0,0 @@
|
||||
# docs: <https://nixos.wiki/wiki/Nginx>
|
||||
# docs: <https://nginx.org/en/docs/>
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# make the logs for this host "public" so that they show up in e.g. metrics
|
||||
publog = vhost: lib.attrsets.unionOfDisjoint vhost {
|
||||
extraConfig = (vhost.extraConfig or "") + ''
|
||||
access_log /var/log/nginx/public.log vcombined;
|
||||
'';
|
||||
};
|
||||
|
||||
# kTLS = true; # in-kernel TLS for better perf
|
||||
in
|
||||
{
|
||||
|
||||
sane.ports.ports."80" = {
|
||||
protocol = [ "tcp" ];
|
||||
visibleTo.lan = true;
|
||||
visibleTo.ovpns = true; # so that letsencrypt can procure a cert for the mx record
|
||||
visibleTo.doof = true;
|
||||
description = "colin-http-uninsane.org";
|
||||
};
|
||||
sane.ports.ports."443" = {
|
||||
protocol = [ "tcp" ];
|
||||
visibleTo.lan = true;
|
||||
visibleTo.doof = true;
|
||||
description = "colin-https-uninsane.org";
|
||||
};
|
||||
|
||||
services.nginx.enable = true;
|
||||
# nginxStable is one release behind nginxMainline.
|
||||
# nginx itself recommends running mainline; nixos defaults to stable.
|
||||
# services.nginx.package = pkgs.nginxMainline;
|
||||
# XXX(2024-07-31): nixos defaults to zlib-ng -- supposedly more performant, but spams log with
|
||||
# "gzip filter failed to use preallocated memory: ..."
|
||||
services.nginx.package = pkgs.nginxMainline.override { zlib = pkgs.zlib; };
|
||||
services.nginx.appendConfig = ''
|
||||
# use 1 process per core.
|
||||
# may want to increase worker_connections too, but `ulimit -n` must be increased first.
|
||||
worker_processes auto;
|
||||
'';
|
||||
|
||||
# this is the standard `combined` log format, with the addition of $host
|
||||
# so that we have the virtualHost in the log.
|
||||
# KEEP IN SYNC WITH GOACCESS
|
||||
# goaccess calls this VCOMBINED:
|
||||
# - <https://gist.github.com/jyap808/10570005>
|
||||
services.nginx.commonHttpConfig = ''
|
||||
log_format vcombined '$host:$server_port $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referrer" "$http_user_agent"';
|
||||
access_log /var/log/nginx/private.log vcombined;
|
||||
'';
|
||||
# enables gzip and sets gzip_comp_level = 5
|
||||
services.nginx.recommendedGzipSettings = true;
|
||||
# enables zstd and sets zstd_comp_level = 9
|
||||
services.nginx.recommendedZstdSettings = true;
|
||||
# enables OCSP stapling (so clients don't need contact the OCSP server -- i do instead)
|
||||
# - doesn't seem to, actually: <https://www.ssllabs.com/ssltest/analyze.html?d=uninsane.org>
|
||||
# caches TLS sessions for 10m
|
||||
services.nginx.recommendedTlsSettings = true;
|
||||
# enables sendfile, tcp_nopush, tcp_nodelay, keepalive_timeout 65
|
||||
services.nginx.recommendedOptimisation = true;
|
||||
|
||||
# web blog/personal site
|
||||
# alternative way to link stuff into the share:
|
||||
# sane.fs."/var/www/sites/uninsane.org/share/Ubunchu".mount.bind = "/var/media/Books/Visual/HiroshiSeo/Ubunchu";
|
||||
# sane.fs."/var/media/Books/Visual/HiroshiSeo/Ubunchu".dir = {};
|
||||
services.nginx.virtualHosts."uninsane.org" = publog {
|
||||
# a lot of places hardcode https://uninsane.org,
|
||||
# and then when we mix http + non-https, we get CORS violations
|
||||
# and things don't look right. so force SSL.
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
# inherit kTLS;
|
||||
# for OCSP stapling
|
||||
sslTrustedCertificate = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
locations."/" = {
|
||||
root = "${pkgs.uninsane-dot-org}/share/uninsane-dot-org";
|
||||
tryFiles = "$uri $uri/ @fallback";
|
||||
};
|
||||
|
||||
# unversioned files
|
||||
locations."@fallback" = {
|
||||
root = "/var/www/sites/uninsane.org";
|
||||
extraConfig = ''
|
||||
# instruct Google to not index these pages.
|
||||
# see: <https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#xrobotstag>
|
||||
add_header X-Robots-Tag 'none, noindex, nofollow';
|
||||
|
||||
# best-effort attempt to block archive.org from archiving these pages.
|
||||
# reply with 403: Forbidden
|
||||
# User Agent is *probably* "archive.org_bot"; maybe used to be "ia_archiver"
|
||||
# source: <https://archive.org/details/archive.org_bot>
|
||||
# additional UAs: <https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker>
|
||||
#
|
||||
# validate with: `curl -H 'User-Agent: "bot;archive.org_bot;like: something else"' -v https://uninsane.org/dne`
|
||||
if ($http_user_agent ~* "(?:\b)archive.org_bot(?:\b)") {
|
||||
return 403;
|
||||
}
|
||||
if ($http_user_agent ~* "(?:\b)archive.org(?:\b)") {
|
||||
return 403;
|
||||
}
|
||||
if ($http_user_agent ~* "(?:\b)ia_archiver(?:\b)") {
|
||||
return 403;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# uninsane.org/share/foo => /var/www/sites/uninsane.org/share/foo.
|
||||
# special-cased to enable directory listings
|
||||
locations."/share" = {
|
||||
root = "/var/www/sites/uninsane.org";
|
||||
extraConfig = ''
|
||||
# autoindex => render directory listings
|
||||
autoindex on;
|
||||
# don't follow any symlinks when serving files
|
||||
# otherwise it allows a directory escape
|
||||
disable_symlinks on;
|
||||
'';
|
||||
};
|
||||
locations."/share/Milkbags/" = {
|
||||
alias = "/var/media/Videos/Milkbags/";
|
||||
extraConfig = ''
|
||||
# autoindex => render directory listings
|
||||
autoindex on;
|
||||
# don't follow any symlinks when serving files
|
||||
# otherwise it allows a directory escape
|
||||
disable_symlinks on;
|
||||
'';
|
||||
};
|
||||
locations."/share/Ubunchu/" = {
|
||||
alias = "/var/media/Books/Visual/HiroshiSeo/Ubunchu/";
|
||||
extraConfig = ''
|
||||
# autoindex => render directory listings
|
||||
autoindex on;
|
||||
# don't follow any symlinks when serving files
|
||||
# otherwise it allows a directory escape
|
||||
disable_symlinks on;
|
||||
'';
|
||||
};
|
||||
|
||||
# allow matrix users to discover that @user:uninsane.org is reachable via matrix.uninsane.org
|
||||
locations."= /.well-known/matrix/server".extraConfig =
|
||||
let
|
||||
# use 443 instead of the default 8448 port to unite
|
||||
# the client-server and server-server port for simplicity
|
||||
server = { "m.server" = "matrix.uninsane.org:443"; };
|
||||
in ''
|
||||
add_header Content-Type application/json;
|
||||
return 200 '${builtins.toJSON server}';
|
||||
'';
|
||||
locations."= /.well-known/matrix/client".extraConfig =
|
||||
let
|
||||
client = {
|
||||
"m.homeserver" = { "base_url" = "https://matrix.uninsane.org"; };
|
||||
"m.identity_server" = { "base_url" = "https://vector.im"; };
|
||||
};
|
||||
# ACAO required to allow element-web on any URL to request this json file
|
||||
in ''
|
||||
add_header Content-Type application/json;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON client}';
|
||||
'';
|
||||
|
||||
# static URLs might not be aware of .well-known (e.g. registration confirmation URLs),
|
||||
# so hack around that.
|
||||
locations."/_matrix" = {
|
||||
proxyPass = "http://127.0.0.1:8008";
|
||||
};
|
||||
locations."/_synapse" = {
|
||||
proxyPass = "http://127.0.0.1:8008";
|
||||
};
|
||||
|
||||
# allow ActivityPub clients to discover how to reach @user@uninsane.org
|
||||
# see: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3361/
|
||||
# not sure this makes sense while i run multiple AP services (pleroma, lemmy)
|
||||
# locations."/.well-known/nodeinfo" = {
|
||||
# proxyPass = "http://127.0.0.1:4000";
|
||||
# extraConfig = pleromaExtraConfig;
|
||||
# };
|
||||
|
||||
# redirect common feed URIs to the canonical feed
|
||||
locations."= /atom".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /feed".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /feed.xml".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /rss".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /rss.xml".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/atom".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/atom.xml".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/feed".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/feed.xml".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/rss".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/rss.xml".extraConfig = "return 301 /atom.xml;";
|
||||
};
|
||||
|
||||
|
||||
# serve any site not listed above, if it's static.
|
||||
# because we define it dynamically, SSL isn't trivial. support only http
|
||||
# documented <https://nginx.org/en/docs/http/ngx_http_core_module.html#server_name>
|
||||
services.nginx.virtualHosts."~^(?<domain>.+)$" = {
|
||||
default = true;
|
||||
addSSL = true;
|
||||
enableACME = false;
|
||||
sslCertificate = "/var/www/certs/wildcard/cert.pem";
|
||||
sslCertificateKey = "/var/www/certs/wildcard/key.pem";
|
||||
# sslCertificate = "/var/lib/acme/.minica/cert.pem";
|
||||
# sslCertificateKey = "/var/lib/acme/.minica/key.pem";
|
||||
# serverName = null;
|
||||
locations."/" = {
|
||||
# somehow this doesn't escape -- i get error 400 if i:
|
||||
# curl 'http://..' --resolve '..:80:127.0.0.1'
|
||||
root = "/var/www/sites/$domain";
|
||||
# tryFiles = "$domain/$uri $domain/$uri/ =404";
|
||||
};
|
||||
};
|
||||
|
||||
security.acme.acceptTerms = true;
|
||||
security.acme.defaults.email = "admin.acme@uninsane.org";
|
||||
|
||||
sane.persist.sys.byStore.plaintext = [
|
||||
{ user = "acme"; group = "acme"; path = "/var/lib/acme"; method = "bind"; }
|
||||
];
|
||||
sane.persist.sys.byStore.private = [
|
||||
{ user = "colin"; group = "users"; path = "/var/www/sites"; method = "bind"; }
|
||||
];
|
||||
sane.persist.sys.byStore.ephemeral = [
|
||||
# logs *could* be persisted to private storage, but then there's the issue of
|
||||
# "what if servo boots, isn't unlocked, and the whole / tmpfs is consumed by logs"
|
||||
{ user = "nginx"; group = "nginx"; path = "/var/log/nginx"; method = "bind"; }
|
||||
];
|
||||
|
||||
# let's encrypt default chain looks like:
|
||||
# - End-entity certificate ← R3 ← ISRG Root X1 ← DST Root CA X3
|
||||
# - <https://community.letsencrypt.org/t/production-chain-changes/150739>
|
||||
# DST Root CA X3 expired in 2021 (?)
|
||||
# the alternative chain is:
|
||||
# - End-entity certificate ← R3 ← ISRG Root X1 (self-signed)
|
||||
# using this alternative chain grants more compatibility for services like ejabberd
|
||||
# but might decrease compatibility with very old clients that don't get updates (e.g. old android, iphone <= 4).
|
||||
# security.acme.defaults.extraLegoFlags = [
|
||||
security.acme.certs."uninsane.org" = rec {
|
||||
# ISRG Root X1 results in lets encrypt sending the same chain as default,
|
||||
# just without the final ISRG Root X1 ← DST Root CA X3 link.
|
||||
# i.e. we could alternative clip the last item and achieve the exact same thing.
|
||||
extraLegoRunFlags = [
|
||||
"--preferred-chain" "ISRG Root X1"
|
||||
];
|
||||
extraLegoRenewFlags = extraLegoRunFlags;
|
||||
};
|
||||
# TODO: alternatively, we could clip the last cert IF it's expired,
|
||||
# optionally outputting that to a new cert file.
|
||||
# security.acme.defaults.postRun = "";
|
||||
|
||||
# create a self-signed SSL certificate for use with literally any domain.
|
||||
# browsers will reject this, but proxies and local testing tools can be configured
|
||||
# to accept it.
|
||||
system.activationScripts.generate-x509-self-signed.text = ''
|
||||
mkdir -p /var/www/certs/wildcard
|
||||
test -f /var/www/certs/wildcard/key.pem || ${lib.getExe pkgs.openssl} \
|
||||
req -x509 -newkey rsa:4096 \
|
||||
-keyout /var/www/certs/wildcard/key.pem \
|
||||
-out /var/www/certs/wildcard/cert.pem \
|
||||
-sha256 -nodes -days 3650 \
|
||||
-addext 'subjectAltName=DNS:*' \
|
||||
-subj '/CN=self-signed'
|
||||
chmod 640 /var/www/certs/wildcard/{key,cert}.pem
|
||||
chown root:nginx /var/www/certs/wildcard /var/www/certs/wildcard/{key,cert}.pem
|
||||
'';
|
||||
}
|
111
hosts/by-name/servo/services/nginx/default.nix
Normal file
111
hosts/by-name/servo/services/nginx/default.nix
Normal file
@@ -0,0 +1,111 @@
|
||||
# docs: <https://nixos.wiki/wiki/Nginx>
|
||||
# docs: <https://nginx.org/en/docs/>
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./uninsane.org.nix
|
||||
./waka.laka.osaka
|
||||
];
|
||||
|
||||
sane.ports.ports."80" = {
|
||||
protocol = [ "tcp" ];
|
||||
visibleTo.lan = true;
|
||||
visibleTo.ovpns = true; # so that letsencrypt can procure a cert for the mx record
|
||||
visibleTo.doof = true;
|
||||
description = "colin-http-uninsane.org";
|
||||
};
|
||||
sane.ports.ports."443" = {
|
||||
protocol = [ "tcp" ];
|
||||
visibleTo.lan = true;
|
||||
visibleTo.doof = true;
|
||||
description = "colin-https-uninsane.org";
|
||||
};
|
||||
|
||||
services.nginx.enable = true;
|
||||
|
||||
users.users.nginx.extraGroups = [ "anubis" ];
|
||||
# nginxStable is one release behind nginxMainline.
|
||||
# nginx itself recommends running mainline; nixos defaults to stable.
|
||||
# services.nginx.package = pkgs.nginxMainline;
|
||||
# XXX(2024-07-31): nixos defaults to zlib-ng -- supposedly more performant, but spams log with
|
||||
# "gzip filter failed to use preallocated memory: ..."
|
||||
# XXX(2025-07-24): "gzip filter" spam is gone => use default nginx package
|
||||
# services.nginx.package = pkgs.nginxMainline.override { zlib = pkgs.zlib; };
|
||||
services.nginx.appendConfig = ''
|
||||
# use 1 process per core.
|
||||
# may want to increase worker_connections too, but `ulimit -n` must be increased first.
|
||||
worker_processes auto;
|
||||
'';
|
||||
|
||||
# this is the standard `combined` log format, with the addition of $host
|
||||
# so that we have the virtualHost in the log.
|
||||
# KEEP IN SYNC WITH GOACCESS
|
||||
# goaccess calls this VCOMBINED:
|
||||
# - <https://gist.github.com/jyap808/10570005>
|
||||
services.nginx.commonHttpConfig = ''
|
||||
log_format vcombined '$host:$server_port $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referrer" "$http_user_agent"';
|
||||
access_log /var/log/nginx/private.log vcombined;
|
||||
'';
|
||||
# enables gzip and sets gzip_comp_level = 5
|
||||
services.nginx.recommendedGzipSettings = true;
|
||||
# enables zstd and sets zstd_comp_level = 9
|
||||
# services.nginx.recommendedZstdSettings = true; #< XXX(2025-07-18): nginx zstd integration is unmaintained in NixOS
|
||||
# enables OCSP stapling (so clients don't need contact the OCSP server -- i do instead)
|
||||
# - doesn't seem to, actually: <https://www.ssllabs.com/ssltest/analyze.html?d=uninsane.org>
|
||||
# caches TLS sessions for 10m
|
||||
services.nginx.recommendedTlsSettings = true;
|
||||
# enables sendfile, tcp_nopush, tcp_nodelay, keepalive_timeout 65
|
||||
services.nginx.recommendedOptimisation = true;
|
||||
|
||||
|
||||
# serve any site not otherwise declared, if it's static.
|
||||
# because we define it dynamically, SSL isn't trivial. support only http
|
||||
# documented <https://nginx.org/en/docs/http/ngx_http_core_module.html#server_name>
|
||||
services.nginx.virtualHosts."~^(?<domain>.+)$" = {
|
||||
default = true;
|
||||
addSSL = true;
|
||||
enableACME = false;
|
||||
sslCertificate = "/var/www/certs/wildcard/cert.pem";
|
||||
sslCertificateKey = "/var/www/certs/wildcard/key.pem";
|
||||
# sslCertificate = "/var/lib/acme/.minica/cert.pem";
|
||||
# sslCertificateKey = "/var/lib/acme/.minica/key.pem";
|
||||
# serverName = null;
|
||||
locations."/" = {
|
||||
# somehow this doesn't escape -- i get error 400 if i:
|
||||
# curl 'http://..' --resolve '..:80:127.0.0.1'
|
||||
root = "/var/www/sites/$domain";
|
||||
# tryFiles = "$domain/$uri $domain/$uri/ =404";
|
||||
};
|
||||
};
|
||||
|
||||
security.acme.acceptTerms = true;
|
||||
security.acme.defaults.email = "admin.acme@uninsane.org";
|
||||
|
||||
sane.persist.sys.byStore.plaintext = [
|
||||
{ user = "acme"; group = "acme"; path = "/var/lib/acme"; method = "bind"; }
|
||||
];
|
||||
sane.persist.sys.byStore.private = [
|
||||
{ user = "colin"; group = "users"; path = "/var/www/sites"; method = "bind"; }
|
||||
];
|
||||
sane.persist.sys.byStore.ephemeral = [
|
||||
# logs *could* be persisted to private storage, but then there's the issue of
|
||||
# "what if servo boots, isn't unlocked, and the whole / tmpfs is consumed by logs"
|
||||
{ user = "nginx"; group = "nginx"; path = "/var/log/nginx"; method = "bind"; }
|
||||
];
|
||||
|
||||
# create a self-signed SSL certificate for use with literally any domain.
|
||||
# browsers will reject this, but proxies and local testing tools can be configured
|
||||
# to accept it.
|
||||
system.activationScripts.generate-x509-self-signed.text = ''
|
||||
mkdir -p /var/www/certs/wildcard
|
||||
test -f /var/www/certs/wildcard/key.pem || ${lib.getExe pkgs.openssl} \
|
||||
req -x509 -newkey rsa:4096 \
|
||||
-keyout /var/www/certs/wildcard/key.pem \
|
||||
-out /var/www/certs/wildcard/cert.pem \
|
||||
-sha256 -nodes -days 3650 \
|
||||
-addext 'subjectAltName=DNS:*' \
|
||||
-subj '/CN=self-signed'
|
||||
chmod 640 /var/www/certs/wildcard/{key,cert}.pem
|
||||
chown root:nginx /var/www/certs/wildcard /var/www/certs/wildcard/{key,cert}.pem
|
||||
'';
|
||||
}
|
132
hosts/by-name/servo/services/nginx/uninsane.org.nix
Normal file
132
hosts/by-name/servo/services/nginx/uninsane.org.nix
Normal file
@@ -0,0 +1,132 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# alternative way to link stuff into the share:
|
||||
# sane.fs."/var/www/sites/uninsane.org/share/Ubunchu".mount.bind = "/var/media/Books/Visual/HiroshiSeo/Ubunchu";
|
||||
# sane.fs."/var/media/Books/Visual/HiroshiSeo/Ubunchu".dir = {};
|
||||
services.nginx.virtualHosts."uninsane.org" = {
|
||||
# a lot of places hardcode https://uninsane.org,
|
||||
# and then when we mix http + non-https, we get CORS violations
|
||||
# and things don't look right. so force SSL.
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
# extraConfig = ''
|
||||
# # "public" log so requests show up in goaccess metrics
|
||||
# access_log /var/log/nginx/public.log vcombined;
|
||||
# '';
|
||||
|
||||
locations."/" = {
|
||||
root = "${pkgs.uninsane-dot-org}/share/uninsane-dot-org";
|
||||
tryFiles = "$uri $uri/ @fallback";
|
||||
};
|
||||
|
||||
# unversioned files
|
||||
locations."@fallback" = {
|
||||
root = "/var/www/sites/uninsane.org";
|
||||
extraConfig = ''
|
||||
# instruct Google to not index these pages.
|
||||
# see: <https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#xrobotstag>
|
||||
add_header X-Robots-Tag 'none, noindex, nofollow';
|
||||
|
||||
# best-effort attempt to block archive.org from archiving these pages.
|
||||
# reply with 403: Forbidden
|
||||
# User Agent is *probably* "archive.org_bot"; maybe used to be "ia_archiver"
|
||||
# source: <https://archive.org/details/archive.org_bot>
|
||||
# additional UAs: <https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker>
|
||||
#
|
||||
# validate with: `curl -H 'User-Agent: "bot;archive.org_bot;like: something else"' -v https://uninsane.org/dne`
|
||||
if ($http_user_agent ~* "(?:\b)archive.org_bot(?:\b)") {
|
||||
return 403;
|
||||
}
|
||||
if ($http_user_agent ~* "(?:\b)archive.org(?:\b)") {
|
||||
return 403;
|
||||
}
|
||||
if ($http_user_agent ~* "(?:\b)ia_archiver(?:\b)") {
|
||||
return 403;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# uninsane.org/share/foo => /var/www/sites/uninsane.org/share/foo.
|
||||
# special-cased to enable directory listings
|
||||
locations."/share" = {
|
||||
root = "/var/www/sites/uninsane.org";
|
||||
extraConfig = ''
|
||||
# autoindex => render directory listings
|
||||
autoindex on;
|
||||
# don't follow any symlinks when serving files
|
||||
# otherwise it allows a directory escape
|
||||
disable_symlinks on;
|
||||
'';
|
||||
};
|
||||
locations."/share/Milkbags/" = {
|
||||
alias = "/var/media/Videos/Milkbags/";
|
||||
extraConfig = ''
|
||||
# autoindex => render directory listings
|
||||
autoindex on;
|
||||
# don't follow any symlinks when serving files
|
||||
# otherwise it allows a directory escape
|
||||
disable_symlinks on;
|
||||
'';
|
||||
};
|
||||
locations."/share/Ubunchu/" = {
|
||||
alias = "/var/media/Books/Visual/HiroshiSeo/Ubunchu/";
|
||||
extraConfig = ''
|
||||
# autoindex => render directory listings
|
||||
autoindex on;
|
||||
# don't follow any symlinks when serving files
|
||||
# otherwise it allows a directory escape
|
||||
disable_symlinks on;
|
||||
'';
|
||||
};
|
||||
|
||||
# allow matrix users to discover that @user:uninsane.org is reachable via matrix.uninsane.org
|
||||
locations."= /.well-known/matrix/server".extraConfig =
|
||||
let
|
||||
# use 443 instead of the default 8448 port to unite
|
||||
# the client-server and server-server port for simplicity
|
||||
server = { "m.server" = "matrix.uninsane.org:443"; };
|
||||
in ''
|
||||
add_header Content-Type application/json;
|
||||
return 200 '${builtins.toJSON server}';
|
||||
'';
|
||||
locations."= /.well-known/matrix/client".extraConfig =
|
||||
let
|
||||
client = {
|
||||
"m.homeserver" = { "base_url" = "https://matrix.uninsane.org"; };
|
||||
"m.identity_server" = { "base_url" = "https://vector.im"; };
|
||||
};
|
||||
# ACAO required to allow element-web on any URL to request this json file
|
||||
in ''
|
||||
add_header Content-Type application/json;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON client}';
|
||||
'';
|
||||
|
||||
# static URLs might not be aware of .well-known (e.g. registration confirmation URLs),
|
||||
# so hack around that.
|
||||
locations."/_matrix".extraConfig = "return 301 https://matrix.uninsane.org$request_uri;";
|
||||
locations."/_synapse".extraConfig = "return 301 https://matrix.uninsane.org$request_uri;";
|
||||
|
||||
# allow ActivityPub clients to discover how to reach @user@uninsane.org
|
||||
# see: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3361/
|
||||
# not sure this makes sense while i run multiple AP services (pleroma, lemmy)
|
||||
# locations."/.well-known/nodeinfo" = {
|
||||
# proxyPass = "http://127.0.0.1:4000";
|
||||
# extraConfig = pleromaExtraConfig;
|
||||
# };
|
||||
|
||||
# redirect common feed URIs to the canonical feed
|
||||
locations."= /atom".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /feed".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /feed.xml".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /rss".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /rss.xml".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/atom".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/atom.xml".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/feed".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/feed.xml".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/rss".extraConfig = "return 301 /atom.xml;";
|
||||
locations."= /blog/rss.xml".extraConfig = "return 301 /atom.xml;";
|
||||
};
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
wakaLakaOsaka = pkgs.linkFarm "waka-laka-osaka" {
|
||||
"index.html" = ./index.html;
|
||||
"waka.laka.for.osaka.mp4" = pkgs.fetchurl {
|
||||
# saved from: <https://www.youtube.com/watch?v=ehB_7bBKprY>
|
||||
url = "https://uninsane.org/share/Milkbags/PG_Plays_Video_Games-Waka_Laka_For_Osaka_4K.mp4";
|
||||
hash = "sha256-UW0qR4btX4pZ1bJp4Oxk20m3mvQGj9HweLKO27JBTFs=";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
services.nginx.virtualHosts."laka.osaka" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
# redirect everything to waka.laka.osaka
|
||||
return = "301 https://waka.laka.osaka$request_uri";
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."waka.laka.osaka" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
root = wakaLakaOsaka;
|
||||
};
|
||||
};
|
||||
|
||||
sane.dns.zones."laka.osaka".inet = {
|
||||
SOA."@" = config.sane.dns.zones."uninsane.org".inet.SOA."@";
|
||||
A."@" = config.sane.dns.zones."uninsane.org".inet.A."@";
|
||||
NS."@" = config.sane.dns.zones."uninsane.org".inet.NS."@";
|
||||
CNAME."waka" = "native.uninsane.org.";
|
||||
};
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width initial-scale=1" />
|
||||
<meta name="description" content="Waka Laka (for Osaka)" />
|
||||
<title>Waka Laka (for Osaka)</title>
|
||||
<style>
|
||||
html,body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
* {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
.bg-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
position: fixed;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: contain;
|
||||
}
|
||||
body {
|
||||
background-color: #000000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- TODO: how to autoplay video _without_ it being muted? -->
|
||||
<video class="bg-image" id="waka-video" width="1440" height="1080"
|
||||
autoplay loop muted
|
||||
onclick="document.getElementById('waka-video').muted = !document.getElementById('waka-video').muted;"
|
||||
>
|
||||
<!-- from https://www.youtube.com/watch?v=ehB_7bBKprY -->
|
||||
<!-- original and more info at https://www.aquilinestudios.org/wakalaka.html -->
|
||||
<source src="waka.laka.for.osaka.mp4" type="video/mp4">
|
||||
</video>
|
||||
</body>
|
||||
</html>
|
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
GiB = n: MiB 1024*n;
|
||||
@@ -78,7 +78,7 @@ in
|
||||
};
|
||||
|
||||
# regulate the restarts, so that systemd never disables it
|
||||
systemd.services.postgresql.serviceConfig.Restart = "on-failure";
|
||||
systemd.services.postgresql.serviceConfig.Restart = lib.mkForce "on-failure";
|
||||
systemd.services.postgresql.serviceConfig.RestartSec = 2;
|
||||
systemd.services.postgresql.serviceConfig.RestartMaxDelaySec = 10;
|
||||
systemd.services.postgresql.serviceConfig.RestartSteps = 4;
|
||||
|
@@ -173,7 +173,7 @@ in
|
||||
domain = "conference.xmpp.uninsane.org";
|
||||
}
|
||||
];
|
||||
uploadHttp.domain = "upload.xmpp.uninsane.org";
|
||||
httpFileShare.domain = "upload.xmpp.uninsane.org";
|
||||
|
||||
virtualHosts = {
|
||||
# "Prosody requires at least one enabled VirtualHost to function. You can
|
||||
@@ -282,6 +282,7 @@ in
|
||||
ntfy_binary = "${lib.getExe' pkgs.ntfy-sh "ntfy"}"
|
||||
ntfy_topic = readAll("/run/secrets/ntfy-sh-topic")
|
||||
'';
|
||||
checkConfig = false; # secrets aren't available at build time
|
||||
};
|
||||
|
||||
systemd.services.prosody = {
|
||||
|
@@ -36,6 +36,7 @@
|
||||
locations."/" = {
|
||||
proxyPass = "http://${config.sane.netns.ovpns.veth.netns.ipv4}:5030";
|
||||
proxyWebsockets = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -159,6 +159,7 @@ in
|
||||
locations."/" = {
|
||||
# proxyPass = "http://ovpns.uninsane.org:9091";
|
||||
proxyPass = "http://${config.sane.netns.ovpns.veth.netns.ipv4}:9091";
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -28,6 +28,7 @@
|
||||
# simpler to keep near the latest kernel on all devices,
|
||||
# and also makes certain that any weird system-level bugs i see aren't likely to be stale kernel bugs.
|
||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
# boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_testing;
|
||||
|
||||
# hack in the `boot.shell_on_fail` arg since that doesn't always seem to work.
|
||||
boot.initrd.preFailCommands = "allowShell=1";
|
||||
@@ -36,7 +37,8 @@
|
||||
boot.consoleLogLevel = 7;
|
||||
|
||||
boot.loader.grub.enable = lib.mkDefault false;
|
||||
boot.loader.generic-extlinux-compatible.enable = lib.mkDefault true;
|
||||
# boot.loader.generic-extlinux-compatible.enable = lib.mkDefault true;
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
||||
|
||||
hardware.enableAllFirmware = true; # firmware with licenses that don't allow for redistribution. fuck lawyers, fuck IP, give me the goddamn firmware.
|
||||
# hardware.enableRedistributableFirmware = true; # proprietary but free-to-distribute firmware (extraneous to `enableAllFirmware` option)
|
||||
|
@@ -30,6 +30,7 @@
|
||||
sane.persist.enable = lib.mkDefault true;
|
||||
sane.root-on-tmpfs = lib.mkDefault true;
|
||||
sane.programs.sysadminUtils.enableFor.system = lib.mkDefault true;
|
||||
sane.programs.sysadminExtraUtils.enableFor.system = lib.mkDefault true;
|
||||
sane.programs.consoleUtils.enableFor.user.colin = lib.mkDefault true;
|
||||
|
||||
services.buffyboard.enable = true;
|
||||
|
@@ -9,6 +9,7 @@
|
||||
# - active lemmy: <https://slrpnk.net/c/podcasts>
|
||||
# - old thread: <https://lemmy.ml/post/1565858>
|
||||
#
|
||||
# - paywall bypass / bootlegs: <https://jumble.top/>
|
||||
{ lib, sane-data, ... }:
|
||||
let
|
||||
hourly = { freq = "hourly"; };
|
||||
@@ -67,6 +68,7 @@ let
|
||||
(fromDb "anchor.fm/s/34c7232c/podcast/rss" // tech) # Civboot -- https://anchor.fm/civboot
|
||||
(fromDb "anchor.fm/s/2da69154/podcast/rss" // tech) # POD OF JAKE -- https://podofjake.com/
|
||||
(fromDb "bluecityblues.org.podcastpage.io" // pol) # hosts overlap with Seattle Nice
|
||||
(fromDb "buzzsprout.com/2126417" // tech) # Mystery AI Hype Theater 3000
|
||||
(fromDb "cast.postmarketos.org" // tech)
|
||||
(fromDb "congressionaldish.libsyn.com" // pol) # Jennifer Briney
|
||||
(fromDb "craphound.com" // pol) # Cory Doctorow -- both podcast & text entries
|
||||
@@ -100,6 +102,7 @@ let
|
||||
(fromDb "linuxdevtime.com" // tech)
|
||||
(fromDb "malicious.life" // tech)
|
||||
(fromDb "mapspodcast.libsyn.com" // uncat) # Multidisciplinary Association for Psychedelic Studies
|
||||
(fromDb "motherearthnewsandfriends.libsyn.com" // uncat) # off-grid living
|
||||
(fromDb "microarch.club" // tech)
|
||||
(fromDb "nocturnepodcast.org")
|
||||
(fromDb "omegataupodcast.net" // tech) # 3/4 German; 1/4 eps are English
|
||||
@@ -116,7 +119,6 @@ let
|
||||
(fromDb "rss.acast.com/ft-tech-tonic" // tech) # Financial Time's: Tech Tonic
|
||||
(fromDb "rss.art19.com/the-portal" // rat) # Eric Weinstein
|
||||
(fromDb "seattlenice.buzzsprout.com" // pol) # Seattle Nice
|
||||
(fromDb "sites.libsyn.com/438684" // humor) # Quorators - digging up *weird* Quota questions
|
||||
(fromDb "speedboatdope.com" // pol) # Chapo Trap House (premium feed)
|
||||
(fromDb "srslywrong.com" // pol)
|
||||
(fromDb "sharkbytes.transistor.fm" // tech) # Wireshark Podcast o_0
|
||||
@@ -140,18 +142,20 @@ let
|
||||
# (fromDb "feeds.simplecast.com/l2i9YnTd" // tech // pol) # Hard Fork (NYtimes tech)
|
||||
# (fromDb "feeds.simplecast.com/whlwDbyc" // tech) # Tech Lounge: <https://chrischinchilla.com/podcast/techlounge/>
|
||||
# (fromDb "feeds.simplecast.com/xKJ93w_w" // uncat) # Atlas Obscura
|
||||
# (fromDb "iheart.com/podcast/1119-away-days-podcast-reporti-275359753" // pol) # Away Days (Cool Zone Media)
|
||||
# (fromDb "lastweekinai.com" // tech) # Last Week in AI
|
||||
# (fromDb "mintcast.org" // tech)
|
||||
# (fromDb "politicspoliticspolitics.com" // pol) # don't judge me. Justin Robert Young.
|
||||
# (fromDb "podcast.posttv.com/itunes/post-reports.xml" // pol)
|
||||
# (fromDb "podcast.sustainoss.org" // tech) # "Sustainable tech", only... it somehow manages to avoid any tech which is actually sustainable, and most of the time doesn't even talk about Open Source Software (!). normie/surface-level/"feel good"
|
||||
# (fromDb "podcast.thelinuxexp.com" // tech) # low-brow linux/foss PR announcements
|
||||
# (fromDb "politicspoliticspolitics.com" // pol) # don't judge me. Justin Robert Young.
|
||||
# (fromDb "rss.acast.com/deconstructed") # The Intercept - Deconstructed
|
||||
# (fromDb "rss.acast.com/intercepted-with-jeremy-scahill") # The Intercept - Intercepted
|
||||
# (fromDb "rss.art19.com/60-minutes" // pol)
|
||||
# (fromDb "rss.art19.com/your-welcome" // pol) # Michael Malice - Your Welcome -- also available here: <https://origin.podcastone.com/podcast?categoryID2=2232>
|
||||
# (fromDb "rss.prod.firstlook.media/deconstructed/podcast.rss" // pol) #< possible URL rot
|
||||
# (fromDb "rss.prod.firstlook.media/intercepted/podcast.rss" // pol) #< possible URL rot
|
||||
# (fromDb "sites.libsyn.com/438684" // humor) # Quorators - digging up *weird* Quota questions
|
||||
# (fromDb "techwontsave.us" // pol) # rec by Cory Doctorow, but way too info-sparse
|
||||
# (fromDb "trashfuturepodcast.podbean.com" // pol) # rec by Cory Doctorow, but way rambly
|
||||
# (fromDb "wakingup.libsyn.com" // pol) # Sam Harris, but he just repeats himself now
|
||||
@@ -275,16 +279,22 @@ let
|
||||
(fromDb "youtube.com/@Exurb1a")
|
||||
(fromDb "youtube.com/@hbomberguy")
|
||||
(fromDb "youtube.com/@JackStauber")
|
||||
(fromDb "youtube.com/@jaketran")
|
||||
(fromDb "youtube.com/@kurzgesagt")
|
||||
(fromDb "youtube.com/@mii_beta" // tech) # Baby Wogue / gnome reviewer
|
||||
(fromDb "youtube.com/@Matrixdotorg" // tech) # Matrix Live
|
||||
(fromDb "youtube.com/@NativLang")
|
||||
(fromDb "youtube.com/@PolyMatter")
|
||||
(fromDb "youtube.com/@scenesbyben" // pol) # video essays
|
||||
(fromDb "youtube.com/@TechnologyConnections" // tech)
|
||||
(fromDb "youtube.com/@theodd1sout")
|
||||
(fromDb "youtube.com/@TomScottGo")
|
||||
(fromDb "youtube.com/@TVW_Washington" // pol) # interviews with WA public officials
|
||||
(fromDb "youtube.com/@veritasium")
|
||||
(fromDb "youtube.com/@Vihart")
|
||||
(fromDb "youtube.com/@InnuendoStudios" // pol) # breaks down the nastier political strategies, from a "politics is power" angle
|
||||
|
||||
# (fromDb "youtube.com/@CasuallyExplained" // pol)
|
||||
# (fromDb "youtube.com/@ColdFusion")
|
||||
# (fromDb "youtube.com/@rossmanngroup" // pol // tech) # Louis Rossmann
|
||||
# (fromDb "youtube.com/@TheB1M")
|
||||
|
@@ -24,9 +24,20 @@ let
|
||||
type = fsType;
|
||||
options = lib.concatStringsSep "," options;
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
after = [
|
||||
"emergency.service"
|
||||
"network-online.target"
|
||||
];
|
||||
requires = [ "network-online.target" ];
|
||||
|
||||
unitConfig.Conflicts = [
|
||||
# emergency.service drops the user into a root shell;
|
||||
# only accessible via physical TTY, but unmount sensitive data before that as a precaution.
|
||||
"emergency.service"
|
||||
];
|
||||
|
||||
# mountConfig.LazyUnmount = true; #< else it _ocassionally_ fails "target is busy"
|
||||
|
||||
mountConfig.ExecSearchPath = [ "/run/current-system/sw/bin" ];
|
||||
mountConfig.User = "colin";
|
||||
mountConfig.AmbientCapabilities = "CAP_SETPCAP CAP_SYS_ADMIN";
|
||||
@@ -67,6 +78,7 @@ in
|
||||
lib.mkMerge [
|
||||
(ifSshAuthorized (remoteHome "crappy" {}))
|
||||
(ifSshAuthorized (remoteHome "desko" {}))
|
||||
(ifSshAuthorized (remoteHome "flowy" {}))
|
||||
(ifSshAuthorized (remoteHome "lappy" {}))
|
||||
(ifSshAuthorized (remoteHome "moby" { host = "moby-hn"; }))
|
||||
(ifSshAuthorized (remoteHome "servo" {}))
|
||||
|
@@ -12,9 +12,7 @@ let
|
||||
"stderr_path=/var/log/curlftpfs/servo-hn.stderr"
|
||||
];
|
||||
|
||||
remoteServo = subdir: let
|
||||
systemdBindName = utils.escapeSystemdPath "/mnt/servo/${subdir}";
|
||||
in {
|
||||
remoteServo = subdir: {
|
||||
# sane.fs."/mnt/servo/${subdir}".mount.bind = "/mnt/.servo_ftp/${subdir}";
|
||||
systemd.mounts = [{
|
||||
where = "/mnt/servo/${subdir}";
|
||||
|
@@ -14,7 +14,9 @@
|
||||
];
|
||||
|
||||
sane.user.persist.byStore.ephemeral = [
|
||||
# this is persisted simply to save on RAM. mesa_shader_cache is < 10 MB per boot.
|
||||
# this is persisted simply to save on RAM. mesa_shader_cache_db is < 10 MB per boot.
|
||||
# TODO: see about removing this. the programs which benefit from shader caches should be configured to persist their _own_ dbs.
|
||||
".cache/mesa_shader_cache_db"
|
||||
];
|
||||
|
||||
sane.user.persist.byStore.private = [
|
||||
@@ -29,28 +31,6 @@
|
||||
|
||||
"knowledge"
|
||||
"Videos/local"
|
||||
|
||||
# TODO: pre-compile mesa shaders, and then run in read-only mode?
|
||||
# mesa shader cache can be configured with e.g.:
|
||||
# - MESA_SHADER_CACHE_DISABLE=true
|
||||
# - MESA_SHADER_CACHE_DIR=/path/to/cache_db
|
||||
# - MESA_DISK_CACHE_SINGLE_FILE=1 (in which case default cache file is ~/.cache/mesa_shader_cache_sf)
|
||||
# - MESA_DISK_CACHE_MULTI_FILE=1 (in which case default cache dir is ~/.cache/mesa_shader_cache)
|
||||
# - MESA_DISK_CACHE_READ_ONLY_FOZ_DBS=foo,bar
|
||||
# - to use read-only mesa caches, one from foo.db the other bar.db
|
||||
# - MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST=/path/to/txt
|
||||
# - where /path/to/txt contains a list of names which represent read-only caches
|
||||
# - allows to change the cache providers w/o having to update variables
|
||||
#
|
||||
# see also: <https://gitlab.freedesktop.org/mesa/shader-db>
|
||||
# - database of common shaders (gtk4, chromium, etc) & instructions to compile for any arch
|
||||
# see also: <https://github.com/ValveSoftware/Fossilize>
|
||||
# which may help in generating readonly cache files
|
||||
#
|
||||
# for now, mesa shader cache is persisted because some programs *greatly* benefit from it.
|
||||
# esp gnome-contacts has a first-launch bug where it shows a misleading warning if shaders take too long to compile,
|
||||
# so we persist to private instead of ephemeral.
|
||||
".cache/mesa_shader_cache_db"
|
||||
];
|
||||
|
||||
# convenience
|
||||
|
@@ -2,6 +2,12 @@
|
||||
|
||||
{
|
||||
# TODO: this should be populated per-host
|
||||
|
||||
sane.hosts.by-name."cadey" = {
|
||||
ssh.authorized = lib.mkDefault false;
|
||||
lan-ip = "10.78.79.70";
|
||||
};
|
||||
|
||||
sane.hosts.by-name."crappy" = {
|
||||
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMIvSQAGKqmymXIL4La9B00LPxBIqWAr5AsJxk3UQeY5";
|
||||
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMN0cpRAloCBOE5/2wuzgik35iNDv5KLceWMCVaa7DIQ";
|
||||
@@ -18,6 +24,14 @@
|
||||
lan-ip = "10.78.79.52";
|
||||
};
|
||||
|
||||
sane.hosts.by-name."flowy" = {
|
||||
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAa9U2+aUc5Kr6f2oeILAy2EC86W5OZSprmBb1F+8n7/";
|
||||
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMNuTITzc07mqYspWw6fqRw40ObxwnmWCwg188apHB/o";
|
||||
wg-home.pubkey = "o6Vh+gHF87wAOOofgKKYIhV91kgDRnLvwnd5W2WHsDE=";
|
||||
wg-home.ip = "10.0.10.56";
|
||||
lan-ip = "10.78.79.56";
|
||||
};
|
||||
|
||||
sane.hosts.by-name."lappy" = {
|
||||
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDpmFdNSVPRol5hkbbCivRhyeENzb9HVyf9KutGLP2Zu";
|
||||
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILSJnqmVl9/SYQ0btvGb0REwwWY8wkdkGXQZfn/1geEc";
|
||||
@@ -36,7 +50,7 @@
|
||||
};
|
||||
|
||||
sane.hosts.by-name."servo" = {
|
||||
ssh.authorized = lib.mkDefault false; # servo presents too many services to the internet: easy atack vector
|
||||
# ssh.authorized = lib.mkDefault false; # servo presents too many services to the internet: easy atack vector
|
||||
ssh.user_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPS1qFzKurAdB9blkWomq8gI1g0T3sTs9LsmFOj5VtqX";
|
||||
ssh.host_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOfdSmFkrVT6DhpgvFeQKm3Fh9VKZ9DbLYOPOJWYQ0E8";
|
||||
wg-home.pubkey = "roAw+IUFVtdpCcqa4khB385Qcv9l5JAB//730tyK4Wk=";
|
||||
|
@@ -66,6 +66,10 @@
|
||||
sane.ids.plugdev.gid = 2421;
|
||||
sane.ids.ollama.uid = 2422;
|
||||
sane.ids.ollama.gid = 2422;
|
||||
sane.ids.bitmagnet.uid = 2423;
|
||||
sane.ids.bitmagnet.gid = 2423;
|
||||
sane.ids.anubis.uid = 2424;
|
||||
sane.ids.anubis.gid = 2424;
|
||||
sane.ids.shelvacu.uid = 5431;
|
||||
|
||||
sane.ids.colin.uid = 1000;
|
||||
@@ -92,6 +96,7 @@
|
||||
sane.ids.radicale.gid = 2011;
|
||||
sane.ids.named.uid = 2012;
|
||||
sane.ids.named.gid = 2012;
|
||||
sane.ids.lpadmin.gid = 2013;
|
||||
|
||||
# found on graphical hosts
|
||||
sane.ids.nm-iodine.uid = 2101; # desko/moby/lappy
|
||||
|
@@ -1,13 +1,25 @@
|
||||
# debugging:
|
||||
# - /var/log/named/named.log
|
||||
## config
|
||||
# - `man named`
|
||||
# - `man named.conf`
|
||||
# - show defaults with: `named -C`
|
||||
# - defaults live in <repo:isc-projects/bind:bin/named/config.c>
|
||||
# - per-option docs live in <repo:isc-projects/bind:bind9/doc/arm/reference.rst>
|
||||
#
|
||||
## statistics
|
||||
# - `netstat --statistics --udp`
|
||||
# - `rdnc stats`? dumps to `named.stats` in named's PWD?
|
||||
#
|
||||
## interactive debugging
|
||||
# - `systemctl stop bind`
|
||||
# - `sudo /nix/store/0zpdy93sd3fgbxgvf8dsxhn8fbbya8d2-bind-9.18.28/sbin/named -g -u named -4 -c /nix/store/f1mp0myzmfms71h9vinwxpn2i9362a9a-named.conf`
|
||||
# - `-g` = don't fork
|
||||
# - `-u named` = start as superuser (to claim port 53), then drop to user `named`
|
||||
#
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
hostCfg = config.sane.hosts.by-name."${config.networking.hostName}";
|
||||
hostCfg = config.sane.hosts.by-name."${config.networking.hostName}" or null;
|
||||
bindCfg = config.services.bind;
|
||||
in
|
||||
{
|
||||
@@ -38,7 +50,7 @@ in
|
||||
];
|
||||
services.bind.listenOn = [
|
||||
"127.0.0.1"
|
||||
] ++ lib.optionals (hostCfg.wg-home.ip != null) [
|
||||
] ++ lib.optionals (hostCfg != null && hostCfg.wg-home.ip != null) [
|
||||
# allow wireguard clients to use us as a recursive resolver (only needed for servo)
|
||||
hostCfg.wg-home.ip
|
||||
];
|
||||
@@ -53,6 +65,13 @@ in
|
||||
# listen-on port 953 { any; };
|
||||
# '';
|
||||
|
||||
# services.bind.extraArgs = [
|
||||
# # -d = debug logging level: higher = more verbose
|
||||
# "-d" "2"
|
||||
# # -L = where to log. default is `named.run` in PWD -- unless running interactively in which case it logs to stdout
|
||||
# "-L" "/var/log/named/named.log"
|
||||
# ];
|
||||
|
||||
networking.resolvconf.useLocalResolver = false; #< we manage resolvconf explicitly, above
|
||||
|
||||
# TODO: how to exempt `pool.ntp.org` from DNSSEC checks, as i did when using unbound?
|
||||
@@ -67,6 +86,12 @@ in
|
||||
// and as of 2025-01-30 BIND9 gives no way to disable DNSSEC per-forwarder/zone,
|
||||
// so just disable it globally
|
||||
dnssec-validation no;
|
||||
// XXX(2025-06-30): i need reverse DNS of private IP space such as 10.0.0.0/8.
|
||||
// configuring those zones (done in a secrets/ file), unfortunately requires disabling
|
||||
// ALL local entries for reserved zones (IN-ADDR.ARPA, IP6.ARPA, EMPTY.AS112.ARPA, HOME.ARPA, RESOLVER.ARPA).
|
||||
// TODO: figure a better solution, as this likely causes reverse-DNS queries of LAN hosts to be sent to the WAN!
|
||||
// - see <https://www.as112.net/>
|
||||
empty-zones-enable no;
|
||||
'';
|
||||
# re-implement the nixos default bind config, but without `options { forwarders { }; };`,
|
||||
# as having an empty `forwarders` at the top-level prevents me from forwarding the `.` zone in a separate statement
|
||||
@@ -93,6 +118,25 @@ in
|
||||
${bindCfg.extraOptions}
|
||||
};
|
||||
|
||||
// XXX(2025-06-18): some tools i use for work assume 'localhost' can be resolved by the system nameserver,
|
||||
// and not just by /etc/hosts
|
||||
zone "localhost" {
|
||||
type master;
|
||||
file "${pkgs.writeText "localhost" ''
|
||||
$TTL 300
|
||||
@ IN SOA localhost. root.localhost. (
|
||||
202506181 ; Serial
|
||||
28800 ; Refresh
|
||||
7200 ; Retry
|
||||
604800 ; Expire
|
||||
86400) ; Minimum TTL
|
||||
NS localhost.
|
||||
|
||||
localhost. A 127.0.0.1
|
||||
AAAA ::1
|
||||
''}";
|
||||
};
|
||||
|
||||
${bindCfg.extraConfig}
|
||||
'';
|
||||
|
||||
@@ -104,5 +148,15 @@ in
|
||||
cat "/run/named/dhcp-configs/$c" >> /run/named/dhcp-configs.conf
|
||||
done
|
||||
'';
|
||||
systemd.services.bind.serviceConfig.ReadWritePaths = [
|
||||
"/var/log/named"
|
||||
];
|
||||
|
||||
sane.persist.sys.byPath."/var/log/named" = {
|
||||
store = "ephemeral";
|
||||
method = "symlink";
|
||||
acl.mode = "0750";
|
||||
acl.user = "named";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,7 +1,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
systemd.network.wait-online.enable = false; # systemd-networkd-wait-online.service reliably fails on lappy. docs don't match behavior. shit software.
|
||||
# systemd-networkd-wait-online.service reliably fails on lappy. docs don't match behavior. shit software.
|
||||
# XXX(2025-07-18): `systemd-networkd-wait-online.service` also fails on desko (timeout).
|
||||
systemd.network.wait-online.enable = false;
|
||||
|
||||
# plugins mostly add support for establishing different VPN connections.
|
||||
# the default plugin set includes mostly proprietary VPNs:
|
||||
# - fortisslvpn (Fortinet)
|
||||
@@ -203,6 +206,7 @@
|
||||
};
|
||||
|
||||
networking.networkmanager.settings = {
|
||||
# docs: `man 5 NetworkManager.conf`
|
||||
# keyfile.path = where networkmanager should look for connection credentials
|
||||
keyfile.path = "/var/lib/NetworkManager/system-connections";
|
||||
|
||||
@@ -214,20 +218,30 @@
|
||||
|
||||
# main.dhcp = "internal"; #< default
|
||||
# main.dns controls what to do when NM gets a DNS server via DHCP
|
||||
# - "none" (populate /run/NetworkManager/resolv.conf with DHCP settings)
|
||||
# - "internal" (?)
|
||||
# - "systemd-resolved" (tell systemd-resolved about it, and point /run/NetworkManager/resolv.conf -> systemd)
|
||||
# without this, systemd-resolved won't be able to resolve anything (because it has no upstream servers)
|
||||
# - "default": NM manages /etc/resolv.conf itself.
|
||||
# - "none": NM doesn't manage /etc/resolv.conf, but does populate /run/NetworkManager/resolv.conf with DHCP settings
|
||||
# - "systemd-resolved": tell systemd-resolved about it, and point /run/NetworkManager/resolv.conf -> systemd
|
||||
# - without this, systemd-resolved won't be able to resolve anything (because it has no upstream servers)
|
||||
# - (empty): perform a best-guess for how to manage /etc/resolv.conf
|
||||
# -> if /etc/resolv.conf is a symlink to systemd-resolved, then behaves as "systemd-resolved".
|
||||
# -> else, behaves as "default".
|
||||
# note that NM's resolv.conf isn't (necessarily) /etc/resolv.conf -- that is managed by nixos (via symlinking)
|
||||
main.dns = if config.services.resolved.enable then
|
||||
"systemd-resolved"
|
||||
else if
|
||||
(config.sane.services.hickory-dns.enable && config.sane.services.hickory-dns.asSystemResolver)
|
||||
|| (config.services.unbound.enable && config.services.unbound.resolveLocalQueries) then
|
||||
"none"
|
||||
else
|
||||
"internal"
|
||||
;
|
||||
main.dns = let
|
||||
dns = if config.services.resolved.enable then
|
||||
"systemd-resolved"
|
||||
else if
|
||||
(config.sane.services.hickory-dns.enable && config.sane.services.hickory-dns.asSystemResolver)
|
||||
|| (config.services.unbound.enable && config.services.unbound.resolveLocalQueries)
|
||||
|| config.services.bind.enable # bind config isn't easily inspectable; assume that it's acting as local resolver
|
||||
then
|
||||
"none"
|
||||
else
|
||||
# omitting the option instructs NM to do a "best guess".
|
||||
# this is nearly equivalent to "default", however NM will do checks like "is /etc/resolv.conf a symlink to systemd-resolved", etc,
|
||||
# to actually try to understand the environment.
|
||||
null
|
||||
;
|
||||
in lib.mkIf (dns != null) dns;
|
||||
main.systemd-resolved = false;
|
||||
};
|
||||
environment.etc."NetworkManager/system-connections".source = "/var/lib/NetworkManager/system-connections";
|
||||
|
@@ -55,7 +55,17 @@
|
||||
# this is actually a no-op, and the real action happens in assigning `nix.settings.nix-path`.
|
||||
nix.nixPath = (lib.optionals (config.sane.maxBuildCost >= 2) [
|
||||
"nixpkgs=${pkgs.path}"
|
||||
]) ++ [
|
||||
]) ++ (let
|
||||
# XXX(2024-09-02): nix 2.24.4 errors when nixpkgs-overlays includes a symlink component:
|
||||
# "error: path '/home/colin/dev' is a symlink"
|
||||
# apparently nix has to explicitly handle symlinks in every place it might encounter them,
|
||||
# so the fixes inside nix for this are manual and fragile. dereference it ourselves:
|
||||
dev = if (config.sane.fs."/home/colin/dev" or {}) != {} then
|
||||
config.sane.fs."/home/colin/dev".symlink.target
|
||||
else
|
||||
"/home/colin/dev"
|
||||
;
|
||||
in [
|
||||
# note the import starts at repo root: this allows `./overlay/default.nix` to access the stuff at the root
|
||||
# "nixpkgs-overlays=${../../..}/hosts/common/nix-path/overlay"
|
||||
# as long as my system itself doesn't rely on NIXPKGS at runtime, we can point the overlays to git
|
||||
@@ -65,12 +75,8 @@
|
||||
# when it goes wrong. should i port my `nix-shell` scripts to something more tailored to my uses
|
||||
# and then delete `nixpkgs-overlays`?
|
||||
# "nixpkgs-overlays=/home/colin/dev/nixos/integrations/nixpkgs/nixpkgs-overlays.nix"
|
||||
# XXX(2024-09-02): nix 2.24.4 errors when nixpkgs-overlays includes a symlink component:
|
||||
# "error: path '/home/colin/dev' is a symlink"
|
||||
# apparently nix has to explicitly handle symlinks in every place it might encounter them,
|
||||
# so the fixes inside nix for this are manual and fragile. dereference it ourselves:
|
||||
"nixpkgs-overlays=${config.sane.fs."/home/colin/dev".symlink.target}/nixos/integrations/nixpkgs/nixpkgs-overlays.nix"
|
||||
];
|
||||
"nixpkgs-overlays=${dev}/nixos/integrations/nixpkgs/nixpkgs-overlays.nix"
|
||||
]);
|
||||
|
||||
# ensure new deployments have a source of this repo with which they can bootstrap.
|
||||
# this however changes on every commit and can be slow to copy for e.g. `moby`.
|
||||
|
@@ -11,6 +11,9 @@ let
|
||||
"/run/wrappers/bin/unix_chkpwd" "$out/bin/unix_chkpwd"
|
||||
'';
|
||||
});
|
||||
# `mkDefault` is `mkOverride 1000`.
|
||||
# `mkOverrideDefault` will override `mkDefault` values, but not ordinary values.
|
||||
mkOverrideDefault = lib.mkOverride 900;
|
||||
in
|
||||
{
|
||||
# remove a few items from /run/wrappers we don't need.
|
||||
@@ -135,11 +138,20 @@ in
|
||||
environment.variables.NIXPKGS_CONFIG = lib.mkForce "";
|
||||
# XDG_CONFIG_DIRS defaults to "/etc/xdg", which doesn't exist.
|
||||
# in practice, pam appends the values i want to XDG_CONFIG_DIRS, though this approach causes an extra leading `:`
|
||||
environment.sessionVariables.XDG_CONFIG_DIRS = lib.mkForce [];
|
||||
# XXX(2025-06-06): some nixpkgs' systemd services actually depend on the default XDG_CONFIG_DIRS=/etc/xdg!
|
||||
# specifically: `services.bitmagnet`
|
||||
# environment.sessionVariables.XDG_CONFIG_DIRS = lib.mkForce [];
|
||||
# XCURSOR_PATH: defaults to `[ "$HOME/.icons" "$HOME/.local/share/icons" ]`, neither of which i use, just adding noise.
|
||||
# see: <repo:nixos/nixpkgs:nixos/modules/config/xdg/icons.nix>
|
||||
environment.sessionVariables.XCURSOR_PATH = lib.mkForce [];
|
||||
|
||||
environment.shellAliases = {
|
||||
# unset default aliases; see <repo:nixos/nixpkgs:nixos/modules/config/shells-environment.nix>
|
||||
ls = mkOverrideDefault null;
|
||||
ll = mkOverrideDefault null;
|
||||
l = mkOverrideDefault null;
|
||||
};
|
||||
|
||||
# disable nixos' portal module, otherwise /share/applications gets linked into the system and complicates things (sandboxing).
|
||||
# instead, i manage portals myself via the sane.programs API (e.g. sane.programs.xdg-desktop-portal).
|
||||
xdg.portal.enable = false;
|
||||
|
63
hosts/common/programs/alpaca.nix
Normal file
63
hosts/common/programs/alpaca.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
# alpaca: ollama llm client
|
||||
# - super simple, easy UI
|
||||
#
|
||||
# shortcomings (as of 6.1.7, 2025-07-23):
|
||||
# - doesn't seem to do any prompt tuning;
|
||||
# inherits all the pathologies of the underlying model (e.g. makes up citations)
|
||||
#
|
||||
# it creates a config dir, `~/.config/com.jeffser.Alpaca`, but apparently empty
|
||||
#
|
||||
# TODO: configure ollama connection details statically
|
||||
# - until then, on first run:
|
||||
# - select the non-"managed" ollama option.
|
||||
# - connect to http://10.0.10.22:11434
|
||||
# TODO: update the nix package 6.1.7 -> 7.5.2
|
||||
# - i.e. review <https://github.com/NixOS/nixpkgs/pull/420698>
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.alpaca = {
|
||||
packageUnwrapped = (pkgs.alpaca.override {
|
||||
# ollama is only added to `PATH`; since i'm using it via http, remove it here.
|
||||
# fixes cross compilation & simplifies closure.
|
||||
ollama = null;
|
||||
python3Packages = pkgs.python3Packages // {
|
||||
# XXX(2025-07-23): does not cross compile (markitdown -> pydub -> ... -> opencv)
|
||||
markitdown = null;
|
||||
};
|
||||
}).overrideAttrs (upstream: {
|
||||
postPatch = (upstream.postPatch or "") + ''
|
||||
# for nulled dependencies (above), patch so the application only errors
|
||||
# at runtime, on first attempted use.
|
||||
substituteInPlace src/widgets/attachments.py \
|
||||
--replace-fail 'from markitdown' '# from markitdown'
|
||||
'';
|
||||
});
|
||||
buildCost = 2; #< liable to break cross during updates; not important enough to block deploy over
|
||||
|
||||
sandbox.net = "all"; # maybe only needs wireguard, actually
|
||||
sandbox.whitelistWayland = true;
|
||||
sandbox.mesaCacheDir = ".cache/com.jeffser.Alpaca/mesa";
|
||||
|
||||
sandbox.whitelistDbus.user.own = [ "com.jeffser.Alpaca" ];
|
||||
sandbox.whitelistPortal = [
|
||||
"OpenURI"
|
||||
];
|
||||
sandbox.whitelistSendNotifications = true;
|
||||
|
||||
persist.byStore.ephemeral = [
|
||||
".cache/com.jeffser.Alpaca" #< ?
|
||||
];
|
||||
|
||||
persist.byStore.private = [
|
||||
# alpaca.db: sqlite3 database with the following tables:
|
||||
# - attachment
|
||||
# - chat
|
||||
# - instances
|
||||
# - message
|
||||
# - model_preferences
|
||||
# - preferences
|
||||
# - tool_parameters
|
||||
".local/share/com.jeffser.Alpaca"
|
||||
];
|
||||
};
|
||||
}
|
@@ -1,15 +1,30 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.sane.programs.alsa-ucm-conf;
|
||||
in
|
||||
{
|
||||
sane.programs.alsa-ucm-conf = {
|
||||
packageUnwrapped = pkgs.alsa-ucm-conf.overrideAttrs (base: {
|
||||
deprioritize = pkg: pkg.overrideAttrs (base: {
|
||||
meta = (base.meta or {}) // {
|
||||
# let the other alsa ucm packages override configs from this one
|
||||
priority = ((base.meta or {}).priority or 10) + 20;
|
||||
};
|
||||
});
|
||||
});
|
||||
alsa-ucm-latest = pkgs.alsa-ucm-conf.overrideAttrs (upstream: rec {
|
||||
# XXX(2025-07-18): see <https://github.com/NixOS/nixpkgs/pull/414818>
|
||||
version = "1.2.14";
|
||||
src = lib.warnIf (lib.versionAtLeast upstream.version "1.2.14") "upstream alsa-ucm-conf is up to date with my own: remove override?" pkgs.fetchurl {
|
||||
url = "mirror://alsa/lib/alsa-ucm-conf-${version}.tar.bz2";
|
||||
hash = "sha256-MumAn1ktkrl4qhAy41KTwzuNDx7Edfk3Aiw+6aMGnCE=";
|
||||
};
|
||||
installPhase = lib.replaceStrings
|
||||
[ ''for file in "''${files[@]}"'' ]
|
||||
[ ''for file in ucm2/common/ctl/led.conf'' ]
|
||||
upstream.installPhase
|
||||
;
|
||||
});
|
||||
in
|
||||
{
|
||||
sane.programs.alsa-ucm-conf = {
|
||||
packageUnwrapped = deprioritize pkgs.alsa-ucm-conf;
|
||||
# packageUnwrapped = deprioritize alsa-ucm-latest;
|
||||
sandbox.enable = false; #< only provides $out/share/alsa
|
||||
|
||||
# alsa-lib package only looks in its $out/share/alsa to find runtime config data, by default.
|
||||
|
@@ -19,16 +19,15 @@
|
||||
packageUnwrapped = with pkgs; animatch.override {
|
||||
# allegro has no native wayland support, and so by default crashes when run without Xwayland.
|
||||
# enable the allegro SDL backend, and achieve Wayland support via SDL's Wayland support.
|
||||
# TODO: see about upstreaming this to nixpkgs?
|
||||
allegro5 = allegro5.overrideAttrs (upstream: {
|
||||
buildInputs = upstream.buildInputs ++ [
|
||||
SDL2
|
||||
];
|
||||
cmakeFlags = upstream.cmakeFlags ++ [
|
||||
"-DALLEGRO_SDL=on"
|
||||
];
|
||||
});
|
||||
allegro5 = allegro5.override { useSDL = true; };
|
||||
};
|
||||
# nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
|
||||
# makeWrapper
|
||||
# ];
|
||||
# postFixup = (upstream.postFixup or "") + ''
|
||||
# wrapProgram $out/bin/animatch \
|
||||
# --set SDL_VIDEODRIVER wayland
|
||||
# '';
|
||||
|
||||
buildCost = 1;
|
||||
|
||||
|
@@ -52,6 +52,7 @@ in
|
||||
"errno"
|
||||
"ethtool"
|
||||
"evtest"
|
||||
"expect"
|
||||
"fatresize"
|
||||
"fd"
|
||||
"fftest" # for debugging moby haptics/vibrator, mostly
|
||||
@@ -66,6 +67,7 @@ in
|
||||
"hdparm"
|
||||
"hping"
|
||||
"htop"
|
||||
"htpasswd"
|
||||
"iftop"
|
||||
"inetutils" # for telnet
|
||||
"iotop"
|
||||
@@ -85,6 +87,7 @@ in
|
||||
"mmcli"
|
||||
"nano"
|
||||
# "ncdu" # ncurses disk usage. doesn't cross compile (zig)
|
||||
"nfs-utils" # required, for mounting nfs filesystems
|
||||
"neovim"
|
||||
"netcat"
|
||||
"nethogs"
|
||||
@@ -95,7 +98,7 @@ in
|
||||
"nmon"
|
||||
"nvimpager"
|
||||
"nvme-cli" # nvme
|
||||
# "openssl"
|
||||
"openssl"
|
||||
"parted"
|
||||
"pciutils"
|
||||
"picocom" # serial TTY
|
||||
@@ -108,8 +111,9 @@ in
|
||||
# "screen"
|
||||
"see-cat" # pretty-print equivalent to 'cat'
|
||||
"ssh"
|
||||
"sshpass"
|
||||
"smartmontools" # smartctl
|
||||
# "socat"
|
||||
"socat"
|
||||
"strace"
|
||||
"subversion"
|
||||
"tcpdump"
|
||||
@@ -117,6 +121,7 @@ in
|
||||
"unixtools.ps"
|
||||
"unixtools.sysctl"
|
||||
"unixtools.xxd"
|
||||
"uptime"
|
||||
"usbutils" # lsusb
|
||||
"util-linux" # lsblk, lscpu, etc
|
||||
"valgrind"
|
||||
@@ -137,8 +142,11 @@ in
|
||||
# - debugging?
|
||||
consoleUtils = declPackageSet [
|
||||
"alsa-utils" # for aplay, speaker-test
|
||||
"bc" # CLI calculator
|
||||
"cdecl" # like <https://cdecl.org>. `cdecl explain 'struct foo *const inst'`
|
||||
# "cdrtools"
|
||||
# "clinfo"
|
||||
"colordiff"
|
||||
# "dmidecode"
|
||||
"dtrx" # `unar` alternative, "Do The Right eXtraction"
|
||||
# "efivar"
|
||||
@@ -153,12 +161,14 @@ in
|
||||
# "gopass-jsonapi"
|
||||
# "helix" # text editor
|
||||
"htop" # needed as a user package, for ~/.config/htop
|
||||
"lddtree"
|
||||
# "libsecret" # for managing user keyrings (secret-tool)
|
||||
# "lm_sensors" # for sensors-detect
|
||||
# "lshw"
|
||||
# "memtester"
|
||||
"mercurial" # hg
|
||||
"mimeo" # like xdg-open
|
||||
"mozlz4a" # for extracting .mozlz4 files (firefox)
|
||||
"neovim" # needed as a user package, for swap persistence
|
||||
"nix" # needed as user package, for ~/.cache/nix persistence
|
||||
# "nettools"
|
||||
@@ -168,10 +178,12 @@ in
|
||||
# "oathToolkit" # for oathtool
|
||||
"objdump"
|
||||
"oils-for-unix"
|
||||
"patchelf"
|
||||
# "ponymix"
|
||||
"pulsemixer"
|
||||
"python3-repl"
|
||||
# "python3.pkgs.eyeD3" # music tagging
|
||||
"readline" # for the config
|
||||
"ripgrep" # needed as a user package so that its user-level config file can be installed
|
||||
# "rsyslog" # KEEP THIS HERE if you want persistent logging (TODO: port to systemd, store in /var/log/...)
|
||||
"sane-deadlines"
|
||||
@@ -183,7 +195,8 @@ in
|
||||
"snapper"
|
||||
"sops" # for manually viewing secrets; outside `sane-secrets` (TODO: improve sane-secrets!)
|
||||
"speedtest-cli"
|
||||
# "ssh-to-age"
|
||||
"ssh" # specified as a user program, to enable ssh-agent service
|
||||
"ssh-to-age" # used when provisioning a new nixos host
|
||||
"strings"
|
||||
"sudo"
|
||||
# "tageditor" # music tagging
|
||||
@@ -199,8 +212,9 @@ in
|
||||
"dasht" # docset documentation viewer
|
||||
# "gh" # MS GitHub cli
|
||||
"haredoc"
|
||||
"nix-check-deps" # run `nix-check-deps packageName -f .` before submitting stuff upstream
|
||||
"nix-index"
|
||||
"nixfmt-rfc-style" # run `nixpkgs path/to/package.nix` before submitting stuff upstream
|
||||
"nixfmt-rfc-style" # run `nixfmt path/to/package.nix` before submitting stuff upstream
|
||||
"nixpkgs-hammering"
|
||||
"nixpkgs-review"
|
||||
"qmk-udev-rules"
|
||||
@@ -239,7 +253,6 @@ in
|
||||
"clang"
|
||||
"lua"
|
||||
"nodejs"
|
||||
"patchelf"
|
||||
"rustc"
|
||||
# "tree-sitter"
|
||||
];
|
||||
@@ -291,6 +304,7 @@ in
|
||||
guiBaseApps = declPackageSet [
|
||||
# "abaddon" # discord client
|
||||
"alacritty" # terminal emulator
|
||||
"alpaca" # ollama/LLM client
|
||||
"blanket" # ambient noise generator
|
||||
"calls" # gnome calls (dialer/handler)
|
||||
"confy" # conference planning app
|
||||
@@ -338,6 +352,7 @@ in
|
||||
"mpv"
|
||||
"networkmanagerapplet"
|
||||
# "ntfy-sh" # notification service
|
||||
"newelle" # ollama/LLM client
|
||||
"newsflash" # RSS viewer
|
||||
"papers" # PDF viewer
|
||||
"pavucontrol"
|
||||
@@ -353,10 +368,11 @@ in
|
||||
# "tdesktop" # broken on phosh
|
||||
# "tokodon"
|
||||
"tuba" # mastodon/pleroma client (stores pw in keyring)
|
||||
"v4l-utils" # for `media-ctl`; to debug cameras: <https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#Cameras>
|
||||
# "v4l-utils" # for `media-ctl`; to debug cameras: <https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#Cameras>
|
||||
"video-trimmer"
|
||||
"vulkan-tools" # vulkaninfo
|
||||
# "whalebird" # pleroma client (Electron). input is broken on phosh.
|
||||
"wiremix" # wireplumber TUI
|
||||
"xdg-terminal-exec"
|
||||
"youtube-tui"
|
||||
# "zathura" # PDF/CBZ/ePUB viewer
|
||||
@@ -376,7 +392,7 @@ in
|
||||
"megapixels" # camera app (does not support PPP as of 2024-11-29)
|
||||
"megapixels-next" # camera app (which supports PPP, as of 2024-11-29)
|
||||
"notejot" # note taking, e.g. shopping list
|
||||
"planify" # todo-tracker/planner
|
||||
# "planify" # todo-tracker/planner (XXX(2025-05-16): does not build; gxml tests fail against glib 2.84.1; planify itself fails still, if gxml.doCheck forced false)
|
||||
"portfolio-filemanager"
|
||||
# "tangram" # web browser
|
||||
"wike" # Wikipedia Reader
|
||||
@@ -461,10 +477,14 @@ in
|
||||
|
||||
bash-language-server.sandbox.whitelistPwd = true;
|
||||
|
||||
bc.sandbox.autodetectCliPaths = "existingFile";
|
||||
|
||||
bridge-utils.sandbox.net = "all";
|
||||
|
||||
"cacert.unbundled".sandbox.enable = false; #< data only
|
||||
|
||||
cdecl = {};
|
||||
|
||||
clang = {};
|
||||
|
||||
clang-tools.sandbox.whitelistPwd = true;
|
||||
@@ -473,6 +493,8 @@ in
|
||||
"/var/lib/clightning/bitcoin/lightning-rpc"
|
||||
];
|
||||
|
||||
colordiff.sandbox.autodetectCliPaths = "existingFile"; # for `aplay ./file.wav`
|
||||
|
||||
# cryptsetup: typical use is `cryptsetup open /dev/loopxyz mappedName`, and creates `/dev/mapper/mappedName`
|
||||
cryptsetup.sandbox.extraPaths = [
|
||||
"/dev/mapper"
|
||||
@@ -500,6 +522,8 @@ in
|
||||
# auth token, preferences
|
||||
delfin.persist.byStore.private = [ ".config/delfin" ];
|
||||
|
||||
difftastic.sandbox.autodetectCliPaths = "existing";
|
||||
|
||||
dig.sandbox.net = "all";
|
||||
|
||||
dmidecode.sandbox.extraPaths = [ "/sys/firmware/dmi" ];
|
||||
@@ -845,18 +869,15 @@ in
|
||||
|
||||
marksman.sandbox.whitelistPwd = true;
|
||||
|
||||
mercurial.sandbox.net = "clearnet";
|
||||
mercurial.sandbox.whitelistPwd = true;
|
||||
|
||||
mesa-demos.sandbox.whitelistDri = true;
|
||||
mesa-demos.sandbox.whitelistWayland = true;
|
||||
mesa-demos.sandbox.whitelistX = true;
|
||||
|
||||
meson = {};
|
||||
|
||||
millipixels.packageUnwrapped = pkgs.millipixels.override {
|
||||
v4l-utils = config.sane.programs.v4l-utils.packageUnwrapped; # necessary for cross compilation
|
||||
};
|
||||
# millipixels.packageUnwrapped = pkgs.millipixels.override {
|
||||
# v4l-utils = config.sane.programs.v4l-utils.packageUnwrapped; # necessary for cross compilation
|
||||
# };
|
||||
millipixels.sandbox.method = null; #< TODO: sandbox
|
||||
|
||||
# actual monero blockchain (not wallet/etc; safe to delete, just slow to regenerate)
|
||||
@@ -868,6 +889,8 @@ in
|
||||
"records/finance/cryptocurrencies/monero"
|
||||
];
|
||||
|
||||
mozlz4a.sandbox.autodetectCliPaths = "existingOrParent";
|
||||
|
||||
mslicer.sandbox.method = null; #< TODO: sandbox
|
||||
|
||||
nano.sandbox.autodetectCliPaths = "existingFileOrParent";
|
||||
@@ -885,11 +908,19 @@ in
|
||||
networkmanagerapplet.sandbox.whitelistWayland = true;
|
||||
networkmanagerapplet.sandbox.whitelistDbus.system = true;
|
||||
|
||||
nfs-utils.sandbox.method = null; #< TODO: sandbox
|
||||
|
||||
nil.sandbox.whitelistPwd = true;
|
||||
nil.sandbox.keepPids = true;
|
||||
|
||||
nixd.sandbox.whitelistPwd = true;
|
||||
|
||||
nix-check-deps.sandbox.whitelistPwd = true;
|
||||
nix-check-deps.sandbox.net = "all";
|
||||
nix-check-deps.sandbox.extraPaths = [
|
||||
"/nix/var"
|
||||
];
|
||||
|
||||
nix-tree.sandbox.extraPaths = [
|
||||
"/nix/var"
|
||||
];
|
||||
@@ -940,6 +971,8 @@ in
|
||||
|
||||
openscad-lsp.sandbox.whitelistPwd = true;
|
||||
|
||||
openssl.sandbox.net = "clearnet";
|
||||
|
||||
passt.sandbox.enable = false; #< sandbox helper (netns specifically)
|
||||
|
||||
parted.sandbox.extraPaths = [
|
||||
@@ -1020,6 +1053,7 @@ in
|
||||
rsync.sandbox.net = "clearnet";
|
||||
rsync.sandbox.autodetectCliPaths = "existingOrParent";
|
||||
rsync.sandbox.tryKeepUsers = true; # if running as root, keep the user namespace so that `-a` can set the correct owners, etc
|
||||
rsync.sandbox.whitelistSsh = true;
|
||||
|
||||
rust-analyzer.buildCost = 2;
|
||||
rust-analyzer.sandbox.whitelistPwd = true;
|
||||
@@ -1085,14 +1119,6 @@ in
|
||||
# TODO: enable dma heaps for more efficient buffer sharing: <https://gitlab.com/postmarketOS/pmaports/-/issues/2789>
|
||||
snapshot.sandbox.method = null; #< TODO: sandbox
|
||||
|
||||
sops.sandbox.extraHomePaths = [
|
||||
".config/sops"
|
||||
"nixos"
|
||||
# TODO: sops should only need access to knowledge/secrets,
|
||||
# except that i currently put its .sops.yaml config in the root of ~/knowledge
|
||||
"knowledge"
|
||||
];
|
||||
|
||||
sox.sandbox.autodetectCliPaths = "existingFileOrParent";
|
||||
sox.sandbox.whitelistAudio = true;
|
||||
|
||||
@@ -1107,6 +1133,8 @@ in
|
||||
|
||||
sqlite.sandbox.method = null; #< TODO: sandbox
|
||||
|
||||
ssh-to-age.sandbox.autodetectCliPaths = "existingFile";
|
||||
|
||||
# N.B. if you call sshfs-fuse from the CLI -- without `mount.fuse` -- disable sandboxing
|
||||
sshfs-fuse.sandbox.net = "all";
|
||||
sshfs-fuse.sandbox.autodetectCliPaths = "parent";
|
||||
@@ -1119,6 +1147,8 @@ in
|
||||
];
|
||||
sshfs-fuse.sandbox.keepPids = true; #< XXX: bwrap didn't need this, but bunpen does. why?
|
||||
|
||||
sshpass.sandbox.autodetectCliPaths = "existingFile"; #< for `sshpass -f <path/to/password/file>`
|
||||
|
||||
strace.sandbox.enable = false; #< needs to `exec` its args, and therefore support *anything*
|
||||
|
||||
subversion.sandbox.net = "clearnet";
|
||||
@@ -1141,6 +1171,8 @@ in
|
||||
'';
|
||||
});
|
||||
|
||||
swaybg.sandbox.method = null; #< TODO: sandbox
|
||||
|
||||
swappy.sandbox.autodetectCliPaths = "existingFileOrParent";
|
||||
swappy.sandbox.whitelistWayland = true;
|
||||
|
||||
@@ -1150,11 +1182,6 @@ in
|
||||
systemctl.sandbox.capabilities = [ "cap_dac_override" "cap_sys_admin" ];
|
||||
systemctl.sandbox.keepPidsAndProc = true;
|
||||
|
||||
tcpdump.sandbox.net = "all";
|
||||
tcpdump.sandbox.autodetectCliPaths = "existingFileOrParent";
|
||||
tcpdump.sandbox.capabilities = [ "net_admin" "net_raw" ];
|
||||
tcpdump.sandbox.tryKeepUsers = true;
|
||||
|
||||
tdesktop.persist.byStore.private = [ ".local/share/TelegramDesktop" ];
|
||||
|
||||
tokodon.buildCost = 1;
|
||||
@@ -1246,6 +1273,8 @@ in
|
||||
wirelesstools.sandbox.capabilities = [ "net_admin" ];
|
||||
wirelesstools.sandbox.tryKeepUsers = true;
|
||||
|
||||
wiremix.sandbox.whitelistAudio = true;
|
||||
|
||||
wl-clipboard.sandbox.whitelistWayland = true;
|
||||
wl-clipboard.sandbox.keepPids = true; #< this is needed, but not sure why?
|
||||
|
||||
@@ -1265,7 +1294,11 @@ in
|
||||
|
||||
sane.persist.sys.byStore.plaintext = lib.mkIf config.sane.programs.guiApps.enabled [
|
||||
# "/var/lib/alsa" # preserve output levels, default devices
|
||||
"/var/lib/systemd/backlight" # backlight brightness
|
||||
{
|
||||
# backlight brightness; MUST be `bind`, else systemd loses its shit with "Too many levels of symbolic links".
|
||||
path = "/var/lib/systemd/backlight";
|
||||
method = "bind";
|
||||
}
|
||||
];
|
||||
|
||||
hardware.graphics = lib.mkIf config.sane.programs.guiApps.enabled ({
|
||||
|
@@ -4,25 +4,31 @@
|
||||
# - Audio Setup -> Rescan Audio Devices ...
|
||||
# - Audio Setup -> Recording device -> sysdefault
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
# wxGTK32 uses webkitgtk-4.0.
|
||||
# audacity doesn't actually need webkit though, so diable to reduce closure
|
||||
wxGTK32 = pkgs.wxGTK32.override {
|
||||
withWebKit = false;
|
||||
};
|
||||
# basePkg = pkgs.audacity.overrideAttrs (base: {
|
||||
# # upstream audacity.desktop specifies GDK_BACKEND=x11, with which it doesn't actually launch :|
|
||||
# postInstall = (base.postInstall or "") + ''
|
||||
# substituteInPlace $out/share/applications/${appId}.desktop \
|
||||
# --replace-fail 'GDK_BACKEND=x11 ' ""
|
||||
# '';
|
||||
|
||||
# # XXX(2025-03-03): upstream nixpkgs incorrectly defaults `GDK_BACKEND=x11`,
|
||||
# # even though audacity runs fine on wayland
|
||||
# postFixup = lib.replaceStrings [ "--set-default GDK_BACKEND x11" ] [ "" ] base.postFixup;
|
||||
# });
|
||||
basePkg = pkgs.tenacity; #< XXX(2025-07-27): upstream audacity fails build; use tenacity until fixed
|
||||
appId = basePkg.pname;
|
||||
in
|
||||
{
|
||||
sane.programs.audacity = {
|
||||
packageUnwrapped = (pkgs.audacity.override {
|
||||
# wxGTK32 uses webkitgtk-4.0.
|
||||
# audacity doesn't actually need webkit though, so diable to reduce closure
|
||||
wxGTK32 = pkgs.wxGTK32.override {
|
||||
withWebKit = false;
|
||||
};
|
||||
}).overrideAttrs (base: {
|
||||
# upstream audacity.desktop specifies GDK_BACKEND=x11, with which it doesn't actually launch :|
|
||||
postInstall = (base.postInstall or "") + ''
|
||||
substituteInPlace $out/share/applications/audacity.desktop \
|
||||
--replace-fail 'GDK_BACKEND=x11 ' ""
|
||||
'';
|
||||
|
||||
# XXX(2025-03-03): upstream nixpkgs incorrectly defaults `GDK_BACKEND=x11`,
|
||||
# even though audacity runs fine on wayland
|
||||
postFixup = lib.replaceStrings [ "--set-default GDK_BACKEND x11" ] [ "" ] base.postFixup;
|
||||
});
|
||||
packageUnwrapped = basePkg.override {
|
||||
inherit wxGTK32;
|
||||
};
|
||||
|
||||
buildCost = 1;
|
||||
|
||||
@@ -34,20 +40,21 @@
|
||||
"tmp"
|
||||
"Music"
|
||||
# audacity needs the entire config dir mounted if running in a sandbox
|
||||
".config/audacity"
|
||||
".config/${appId}"
|
||||
];
|
||||
sandbox.extraPaths = [
|
||||
"/dev/snd" # for recording audio inputs to work
|
||||
];
|
||||
|
||||
# disable first-run splash screen
|
||||
fs.".config/audacity/audacity.cfg".file.text = ''
|
||||
fs.".config/${appId}/${appId}.cfg".file.text = ''
|
||||
PrefsVersion=1.1.1r1
|
||||
[GUI]
|
||||
ShowSplashScreen=0
|
||||
[Version]
|
||||
Major=3
|
||||
Minor=4
|
||||
Major=${lib.versions.major basePkg.version}
|
||||
Minor=${lib.versions.minor basePkg.version}
|
||||
Micro=${lib.versions.patch basePkg.version}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@@ -3,7 +3,5 @@
|
||||
{
|
||||
sane.programs.ausyscall = {
|
||||
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.audit "ausyscall";
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ in
|
||||
# do this here, because the nixos service isn't so easily patched.
|
||||
postInstall = (upstream.postInstall or "") + ''
|
||||
wrapProgram "$out/sbin/avahi-daemon" \
|
||||
--add-flags --no-drop-root
|
||||
--add-flag --no-drop-root
|
||||
'';
|
||||
nativeBuildInputs = upstream.nativeBuildInputs ++ [
|
||||
pkgs.makeBinaryWrapper
|
||||
|
@@ -13,13 +13,28 @@ in
|
||||
"/sys/block"
|
||||
"/sys/dev/block"
|
||||
"/sys/devices"
|
||||
#vvv required for `sudo btrfs scrub start`
|
||||
"/sys/fs"
|
||||
#vvv required for `sudo btrfs scrub status` to show stats
|
||||
"/var/lib/btrfs"
|
||||
];
|
||||
sandbox.tryKeepUsers = true;
|
||||
sandbox.capabilities = [ "sys_admin" ]; # for `btrfs scrub`
|
||||
sandbox.keepPids = true; # required for `sudo btrfs scrub start`
|
||||
sandbox.capabilities = [
|
||||
"dac_read_search" # for `btrfs replace`
|
||||
"sys_admin" # for `btrfs scrub`
|
||||
];
|
||||
};
|
||||
|
||||
# TODO: service sandboxing
|
||||
services.btrfs.autoScrub.enable = lib.mkIf cfg.enabled true;
|
||||
services.btrfs.autoScrub.interval = "weekly";
|
||||
|
||||
# nixos/modules/tasks/filesystems/btrfs.nix fires this assertion, but its implementation totally handles the case of 0 btrfs filesystems.
|
||||
sane.silencedAssertions = lib.mkIf cfg.enabled [''
|
||||
If 'services.btrfs.autoScrub' is enabled, you need to have at least one
|
||||
btrfs file system mounted via 'fileSystems' or specify a list manually
|
||||
in 'services.btrfs.autoScrub.fileSystems'.
|
||||
''];
|
||||
}
|
||||
|
||||
|
@@ -5,6 +5,8 @@
|
||||
# NOT easy to debug/fix. git bisect pins this between ceba2c6c3b (good) and 62a28e5a3d (bad)
|
||||
# packageUnwrapped = pkgs.rust.packages.prebuilt.cargo;
|
||||
|
||||
buildCost = 1; # 2.5 GiB closure
|
||||
|
||||
persist.byStore.plaintext = [ ".cargo" ];
|
||||
# probably this sandboxing is too restrictive; i'm sandboxing it for rust-analyzer / neovim LSP
|
||||
sandbox.whitelistPwd = true;
|
||||
|
@@ -11,6 +11,7 @@
|
||||
|
||||
conky.config = {
|
||||
out_to_wayland = true,
|
||||
out_to_x = false,
|
||||
update_interval = 10,
|
||||
|
||||
alignment = 'middle_middle',
|
||||
|
@@ -5,6 +5,7 @@
|
||||
./abaddon.nix
|
||||
./aerc.nix
|
||||
./alacritty.nix
|
||||
./alpaca.nix
|
||||
./alsa-ucm-conf
|
||||
./animatch.nix
|
||||
./assorted.nix
|
||||
@@ -58,6 +59,7 @@
|
||||
./evince.nix
|
||||
./evolution-data-server.nix
|
||||
./exiftool.nix
|
||||
./expect.nix
|
||||
./fcitx5.nix
|
||||
./feedbackd.nix
|
||||
./fftest.nix
|
||||
@@ -88,7 +90,7 @@
|
||||
./gnome-weather.nix
|
||||
./go2tv.nix
|
||||
./gocryptfs.nix
|
||||
./gpodder.nix
|
||||
./gpodder
|
||||
./gpsd.nix
|
||||
./gps-share.nix
|
||||
./grimshot.nix
|
||||
@@ -101,6 +103,7 @@
|
||||
./haredoc.nix
|
||||
./helix.nix
|
||||
./htop
|
||||
./htpasswd.nix
|
||||
./iio-sensor-proxy.nix
|
||||
./imagemagick.nix
|
||||
./inkscape.nix
|
||||
@@ -111,6 +114,7 @@
|
||||
./komikku.nix
|
||||
./koreader
|
||||
./krita.nix
|
||||
./lddtree.nix
|
||||
./less.nix
|
||||
./lftp.nix
|
||||
./lgtrombetta-compass.nix
|
||||
@@ -123,6 +127,7 @@
|
||||
./megapixels.nix
|
||||
./megapixels-next.nix
|
||||
./mepo.nix
|
||||
./mercurial
|
||||
./mimeo
|
||||
./mimetype.nix
|
||||
./mmcli.nix
|
||||
@@ -133,6 +138,7 @@
|
||||
./nautilus.nix
|
||||
./neovim
|
||||
./networkmanager_dmenu
|
||||
./newelle.nix
|
||||
./newsflash.nix
|
||||
./nheko.nix
|
||||
./nicotine-plus.nix
|
||||
@@ -159,6 +165,7 @@
|
||||
./playerctl.nix
|
||||
./qmk-udev-rules.nix
|
||||
./radicale.nix
|
||||
./readline.nix
|
||||
./rhythmbox.nix
|
||||
./ripgrep.nix
|
||||
./rofi
|
||||
@@ -182,9 +189,12 @@
|
||||
./sfeed.nix
|
||||
./shadow.nix
|
||||
./signal-desktop.nix
|
||||
./slack.nix
|
||||
./sm64coopdx.nix
|
||||
./sm64ex-coop.nix
|
||||
./smartmontools.nix
|
||||
./socat.nix
|
||||
./sops.nix
|
||||
./soundconverter.nix
|
||||
./splatmoji.nix
|
||||
./spot.nix
|
||||
@@ -203,9 +213,11 @@
|
||||
./switchboard.nix
|
||||
./syshud.nix
|
||||
./tangram.nix
|
||||
./tcpdump.nix
|
||||
./tor-browser.nix
|
||||
./tuba.nix
|
||||
./unl0kr
|
||||
./uptime.nix
|
||||
./v4l-utils.nix
|
||||
./via.nix
|
||||
./video-trimmer.nix
|
||||
@@ -235,6 +247,7 @@
|
||||
./zeal.nix
|
||||
./zecwallet-lite.nix
|
||||
./zelda64recomp.nix
|
||||
./zoom-us.nix
|
||||
./zulip.nix
|
||||
./zsa-udev-rules.nix
|
||||
./zfs-tools.nix
|
||||
|
@@ -50,13 +50,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
packageUnwrapped = pkgs.dino.override {
|
||||
# XXX(2024/04/24): build without echo cancelation (i.e. force WITH_VOICE_PROCESSOR to be undefined).
|
||||
# this means that if the other end of the call is on speaker phone, i'm liable to hear my own voice
|
||||
# leave their speaker, enter their mic, and then return to me.
|
||||
# the benefit is a >50% reduction in CPU use. insignificant on any modern PC; make-or-break on a low-power Pinephone.
|
||||
webrtc-audio-processing = null;
|
||||
};
|
||||
# packageUnwrapped = pkgs.dino.override {
|
||||
# # XXX(2024/04/24): build without echo cancelation (i.e. force WITH_VOICE_PROCESSOR to be undefined).
|
||||
# # this means that if the other end of the call is on speaker phone, i'm liable to hear my own voice
|
||||
# # leave their speaker, enter their mic, and then return to me.
|
||||
# # the benefit is a >50% reduction in CPU use. insignificant on any modern PC; make-or-break on a low-power Pinephone.
|
||||
# # XXX(2025/05/16): this appears to no longer be optional
|
||||
# # webrtc-audio-processing_1 = null;
|
||||
# };
|
||||
|
||||
# suggestedPrograms = [
|
||||
# "gnome-keyring"
|
||||
|
@@ -5,19 +5,20 @@
|
||||
# `binutils` is the nix wrapper, which reads nix-related env vars
|
||||
# before passing on to e.g. `ld`.
|
||||
# dtrx probably only needs `ar` at runtime, not even `ld`.
|
||||
# this is a "correctness" (and closure) fix, not a build or even runtime fix (probably)
|
||||
binutils = pkgs.binutils-unwrapped;
|
||||
# build without rpm support, since `rpm` package doesn't cross-compile.
|
||||
rpm = null;
|
||||
# rpm = null;
|
||||
}).overrideAttrs (upstream: {
|
||||
patches = (upstream.patches or []) ++ [
|
||||
(pkgs.fetchpatch2 {
|
||||
# https://github.com/dtrx-py/dtrx/pull/62
|
||||
# this is needed for as long as i'm interacting with .tar.lz archives which are actually LZMA and not lzip.
|
||||
name = "fix .tar.lz mapping";
|
||||
url = "https://github.com/dtrx-py/dtrx/commit/ff379f1444b142bb461f26780e32f82e60856be2.patch";
|
||||
hash = "sha256-WNz5i/iJqyxmZh/1mw6M8hWeiQdRvyhCta7gN/va6lQ=";
|
||||
})
|
||||
];
|
||||
# patches = (upstream.patches or []) ++ [
|
||||
# (pkgs.fetchpatch2 {
|
||||
# # https://github.com/dtrx-py/dtrx/pull/62
|
||||
# # this is needed for as long as i'm interacting with .tar.lz archives which are actually LZMA and not lzip.
|
||||
# name = "fix .tar.lz mapping";
|
||||
# url = "https://github.com/dtrx-py/dtrx/commit/ff379f1444b142bb461f26780e32f82e60856be2.patch";
|
||||
# hash = "sha256-WNz5i/iJqyxmZh/1mw6M8hWeiQdRvyhCta7gN/va6lQ=";
|
||||
# })
|
||||
# ];
|
||||
});
|
||||
sandbox.whitelistPwd = true;
|
||||
sandbox.autodetectCliPaths = "existing"; #< for the archive
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# TODO: consider wrapping with `WEBKIT_USE_SINGLE_WEB_PROCESS=1` for better perf
|
||||
# - this runs all tabs in 1 process. which is fine, if i'm not a heavy multi-tabber
|
||||
{ ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
sane.programs.epiphany = {
|
||||
sandbox.wrapperType = "inplace"; # /share/epiphany/default-bookmarks.rdf refers back to /share; dbus files to /libexec
|
||||
@@ -60,12 +60,39 @@
|
||||
"x-scheme-handler/about" = desktop;
|
||||
"x-scheme-handler/unknown" = desktop;
|
||||
};
|
||||
gsettings."org/gnome/epiphany" = {
|
||||
gsettings."org/gnome/epiphany" = with lib.gvariant; {
|
||||
ask-for-default = false;
|
||||
# homepage-url = "about:newtab";
|
||||
search-engine-providers = [
|
||||
# [
|
||||
# (mkDictionaryEntry "url" (mkVariant "https://www.bing.com/search?q=%s"))
|
||||
# (mkDictionaryEntry "bang" (mkVariant "!b"))
|
||||
# (mkDictionaryEntry "name" (mkVariant "Bing"))
|
||||
# ]
|
||||
[
|
||||
(mkDictionaryEntry "url" (mkVariant "https://duckduckgo.com/?q=%s&t=epiphany&kd=-1"))
|
||||
(mkDictionaryEntry "bang" (mkVariant "!ddg"))
|
||||
(mkDictionaryEntry "name" (mkVariant "DuckDuckGo"))
|
||||
]
|
||||
[
|
||||
# serializes to: {'url': <'https://www.google.com/search?q=%s'>, 'bang': <'!g'>, 'name': <'Google'>},
|
||||
(mkDictionaryEntry "url" (mkVariant "https://www.google.com/search?q=%s"))
|
||||
(mkDictionaryEntry "bang" (mkVariant "!g"))
|
||||
(mkDictionaryEntry "name" (mkVariant "Google"))
|
||||
]
|
||||
[
|
||||
(mkDictionaryEntry "url" (mkVariant "https://kagi.com/search?q=%s"))
|
||||
(mkDictionaryEntry "bang" (mkVariant "!k"))
|
||||
(mkDictionaryEntry "name" (mkVariant "Kagi"))
|
||||
]
|
||||
];
|
||||
default-search-engine = "Kagi";
|
||||
};
|
||||
gsettings."org/gnome/epiphany/web" = {
|
||||
# default-zoom-level = 1.0;
|
||||
enable-adblock = true;
|
||||
# enable-itp = false; # ??
|
||||
# enable-popups = true;
|
||||
enable-website-data-storage = true;
|
||||
remember-passwords = false;
|
||||
};
|
||||
|
7
hosts/common/programs/expect.nix
Normal file
7
hosts/common/programs/expect.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.expect = {
|
||||
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.expect "expect";
|
||||
sandbox.enable = false; #< it's typically used to launch programs
|
||||
};
|
||||
}
|
@@ -2,24 +2,21 @@
|
||||
# - `fftest /dev/input/by-path/platform-vibrator-event`
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
# fftestOnly = pkgs.linkIntoOwnPackage linuxConsoleTools [
|
||||
# "bin/fftest"
|
||||
# "share/man/man1/fftest.1.gz"
|
||||
# ];
|
||||
fftestOnly = pkgs.linkBinIntoOwnPackage pkgs.linuxConsoleTools "fftest";
|
||||
#
|
||||
# XXX(2025-03-24): upstream `linuxConsoleTools` depends on SDL, which doesn't cross compile.
|
||||
# but `fftest` component doesn't use SDL, so if we build only that then it can cross compile:
|
||||
fftestOnly = pkgs.linuxConsoleTools.overrideAttrs (upstream: {
|
||||
buildInputs = [ ]; #< disable SDL
|
||||
buildFlags = (upstream.buildFlags or []) ++ [
|
||||
"-C" "utils" "fftest"
|
||||
];
|
||||
# fftestOnly = pkgs.linuxConsoleTools.overrideAttrs (upstream: {
|
||||
# buildInputs = [ ]; #< disable SDL
|
||||
# buildFlags = (upstream.buildFlags or []) ++ [
|
||||
# "-C" "utils" "fftest"
|
||||
# ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 utils/fftest $out/bin/fftest
|
||||
install -Dm644 docs/fftest.1 $out/share/man/man1/fftest.1
|
||||
'';
|
||||
});
|
||||
# installPhase = ''
|
||||
# install -Dm755 utils/fftest $out/bin/fftest
|
||||
# install -Dm644 docs/fftest.1 $out/share/man/man1/fftest.1
|
||||
# '';
|
||||
# });
|
||||
in
|
||||
{
|
||||
sane.programs.fftest = {
|
||||
|
@@ -21,7 +21,7 @@ in
|
||||
enable = lib.mkDefault true;
|
||||
};
|
||||
bypass-paywalls-clean = {
|
||||
enable = lib.mkDefault true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
# ctrl-shift-c-should-copy = {
|
||||
# package = pkgs.firefox-extensions.ctrl-shift-c-should-copy;
|
||||
@@ -44,6 +44,9 @@ in
|
||||
i-still-dont-care-about-cookies = {
|
||||
enable = lib.mkDefault false; #< obsoleted by uBlock Origin annoyances/cookies lists
|
||||
};
|
||||
kagi-search = {
|
||||
enable = lib.mkDefault true;
|
||||
};
|
||||
# open-in-mpv = {
|
||||
# # test: `open-in-mpv 'mpv:///open?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ'`
|
||||
# package = pkgs.firefox-extensions.open-in-mpv;
|
||||
|
@@ -10,21 +10,24 @@
|
||||
<dl><p>
|
||||
<!-- XXX: if you want multiple aliases, declare the link twice WITH A DIFFERENT HREF= else firefox dedupes them (case-insensitively) -->
|
||||
<dt><a href="https://aur.archlinux.org/packages?O=0&K=%s" shortcuturl="aur">Search AUR
|
||||
<dt><a href="https://doc.rust-lang.org/stable/std/index.html?search=Box" shortcuturl="rust">Search Rust stdlib
|
||||
<dt><a href="https://docs.rs/releases/search?query=%s" shortcuturl="docsrs">Search docs.rs
|
||||
<dt><a href="https://duckduckgo.com/?t=h_&q=%s" shortcuturl="ddg">Search DuckDuckGo
|
||||
<dt><a href="https://en.wikipedia.org/wiki/Special:Search?search=%s" shortcuturl="w">Search Wikipedia
|
||||
<dt><a href="https://github.com/nixos/nixpkgs/pulls?q=%s" shortcuturl="pr">Search nixpkgs PRs
|
||||
<dt><a href="https://github.com/search?type=repositories&q=%s" shortcuturl="gh">Search GitHub
|
||||
<dt><a href="https://kagi.com/search?q=%s" shortcuturl="kagi">Search with Kagi
|
||||
<dt><a href="https://lib.rs/search?q=%s" shortcuturl="librs">Search lib.rs (Rust)
|
||||
<dt><a href="https://myanimelist.net/search/all?cat=all&q=%s" shortcuturl="mal">Search MyAnimeList
|
||||
<dt><a href="https://pypi.org/search/?q=%s" shortcuturl="pypi">Search PyPi PYthon Packaging Index
|
||||
<dt><a href="https://repology.org/projects/?maintainer=&category=&inrepo=¬inrepo=&repos=&families=&repos_newest=&families_newest=&search=%s" shortcuturl="repo">Search Repology - packages
|
||||
<dt><a href="https://search.nixos.org/options?channel=unstable&query=%s" shortcuturl="opt">Search NixOS Options
|
||||
<dt><a href="https://search.nixos.org/packages?channel=unstable&query=%s" shortcuturl="pkg">Search NixOS Packages
|
||||
<dt><a href="https://soundcloud.com/search?q=%s" shortcuturl="sc">Search Soundcloud
|
||||
<!-- TODO: have kiwix load the first result if my search is an exact match -->
|
||||
<dt><a href="https://w.uninsane.org/viewer#search?books.name=wikipedia_en_all_maxi&pattern=%s" shortcuturl="wk">Search Wikipedia mirror
|
||||
<dt><a href="https://wiki.archlinux.org/index.php?title=Special%3ASearch&search=%s" shortcuturl="arch">Search ArchWiki
|
||||
<dt><a href="https://wiki.nixos.org/index.php?go=Go&search=%s" shortcuturl="nixos">Search NixOS Wiki
|
||||
<dt><a href="https://wiki.nixos.org/w/index.php?search=kvm" shortcuturl="nixos">Search NixOS Wiki
|
||||
<dt><a href="https://www.aliexpress.us/w/wholesale-%s.html" shortcuturl="ali">Search Aliexpress
|
||||
<dt><a href="https://www.aliexpress.us/w/wholesale-%s.html?" shortcuturl="aliexpress">Search Aliexpress
|
||||
<dt><a href="https://www.amazon.com/s/?k=%s" shortcuturl="am">Search Amazon
|
||||
|
@@ -1,6 +1,3 @@
|
||||
# common settings to toggle (at runtime, in about:config):
|
||||
# > security.ssl.require_safe_negotiation
|
||||
|
||||
{ config, lib, pkgs, ...}:
|
||||
let
|
||||
cfg = config.sane.programs.firefox.config;
|
||||
@@ -48,6 +45,10 @@ let
|
||||
]; # ++ pkgs.librewolf-pmos-mobile.extraPrefsFiles
|
||||
|
||||
extraPolicies = {
|
||||
# firefox policy schema is documented in <repo:mozilla-firefox/firefox:browser/components/enterprisepolicies/schemas/policies-schema.json>
|
||||
# and <https://mozilla.github.io/policy-templates>
|
||||
# however the bulk of them seem to not actually have any effect T_T
|
||||
#
|
||||
# XXX(2024-12-02): using `nixExtensions` causes `about:debugging` to be blocked.
|
||||
# i guess this is because the page can install extensions, or something.
|
||||
# fuck that, enable it by brute force
|
||||
@@ -56,6 +57,18 @@ let
|
||||
installation_mode = "allowed";
|
||||
};
|
||||
};
|
||||
PasswordManagerEnabled = false; #< TODO(2025-05-31): does this actually have an effect?
|
||||
# see also ~/.mozilla/firefox/default/search.json.mozlz4
|
||||
# (use mozlz4a package to view)
|
||||
# XXX(2025-05-31): the below SearchEngines policy has no observable effect.
|
||||
# SearchEngines = {
|
||||
# Add = [];
|
||||
# # Default = "search@kagi.comdefault";
|
||||
# Default = "ddg"; #< builtin
|
||||
# DefaultPrivate = "ddg"; #< builtin
|
||||
# PreventInstalls = false;
|
||||
# Remove = [];
|
||||
# };
|
||||
};
|
||||
}).overrideAttrs (base: {
|
||||
nativeBuildInputs = (base.nativeBuildInputs or []) ++ [
|
||||
@@ -214,7 +227,10 @@ in
|
||||
sandbox.net = "all";
|
||||
sandbox.whitelistAudio = true;
|
||||
sandbox.whitelistAvDev = true; #< it doesn't seem to use pipewire, but direct /dev/videoN (as of 2024/09/12)
|
||||
sandbox.whitelistDbus.user.own = [ "org.mozilla.firefox.*" ];
|
||||
sandbox.whitelistDbus.user.own = [
|
||||
"org.mozilla.firefox.*"
|
||||
"org.mpris.MediaPlayer2.firefox.*"
|
||||
];
|
||||
sandbox.whitelistPortal = [
|
||||
"Camera" # not sure if used
|
||||
# "Email" # not sure if used
|
||||
@@ -224,6 +240,7 @@ in
|
||||
"Print" # not sure if used
|
||||
"ScreenCast" # not sure if used
|
||||
];
|
||||
sandbox.whitelistSecurityKeys = true;
|
||||
sandbox.whitelistSendNotifications = true;
|
||||
sandbox.whitelistWayland = true;
|
||||
sandbox.extraHomePaths = [
|
||||
@@ -254,38 +271,127 @@ in
|
||||
|
||||
env.BROWSER = "firefox"; # used by misc tools like xdg-email, as fallback
|
||||
|
||||
fs = {
|
||||
".mozilla/firefox/bookmarks.html".symlink.target = ./bookmarks.html;
|
||||
fs.".mozilla/firefox/bookmarks.html".symlink.target = ./bookmarks.html;
|
||||
# instruct Firefox to put the profile in a predictable directory (so we can do things like persist just it).
|
||||
# XXX: the directory *must* exist, even if empty; Firefox will not create the directory itself.
|
||||
fs.".mozilla/firefox/profiles.ini".symlink.text = ''
|
||||
[Profile0]
|
||||
Name=default
|
||||
IsRelative=1
|
||||
Path=default
|
||||
Default=1
|
||||
|
||||
# instruct Firefox to put the profile in a predictable directory (so we can do things like persist just it).
|
||||
# XXX: the directory *must* exist, even if empty; Firefox will not create the directory itself.
|
||||
".mozilla/firefox/profiles.ini".symlink.text = ''
|
||||
[Profile0]
|
||||
Name=default
|
||||
IsRelative=1
|
||||
Path=default
|
||||
Default=1
|
||||
[General]
|
||||
StartWithLastProfile=1
|
||||
'';
|
||||
|
||||
[General]
|
||||
StartWithLastProfile=1
|
||||
'';
|
||||
|
||||
".mozilla/firefox/user.js".symlink.target = ./user.js;
|
||||
};
|
||||
fs.".mozilla/firefox/user.js".symlink.target = ./user.js;
|
||||
fs.".mozilla/firefox/default/search.json.mozlz4".symlink.target = let
|
||||
drv = pkgs.stdenvNoCC.mkDerivation {
|
||||
# Mozilla uses a custom compression scheme for `search.json` because they're ASSHOLES.
|
||||
# seriously, why do you need to compress this 2 KiB file? and then why do you need to INVENT YOUR OWN COMPRESSION FORMAT FOR THAT?
|
||||
# GET YOUR HEAD OUT OF YOUR ASS.
|
||||
#
|
||||
# search.json fields:
|
||||
# - `metaData.defaultEngineIdHash`: this is a digest of the defaultEngineId _value_, plus some legalese text;
|
||||
# compute this either by manually updating the search engine in firefox and seeing what it generates,
|
||||
# or, see the code for it in <repo:nix-community/home-manager>
|
||||
name = "search.json.mozlz4";
|
||||
src = ./.;
|
||||
nativeBuildInputs = with pkgs; [ mozlz4a ];
|
||||
buildPhase = ''
|
||||
mozlz4a ./search.json search.json.mozlz4
|
||||
'';
|
||||
installPhase = ''
|
||||
install -D search.json.mozlz4 "$out"/search.json.mozlz4
|
||||
'';
|
||||
};
|
||||
in "${drv}/search.json.mozlz4";
|
||||
|
||||
# flush the cache to disk to avoid it taking up too much tmp.
|
||||
persist.byPath.".cache/mozilla".store =
|
||||
if (cfg.persistData != null) then
|
||||
persist.byPath = let
|
||||
maybePersist = if (cfg.persistData != null) then
|
||||
cfg.persistData
|
||||
else
|
||||
"ephemeral"
|
||||
;
|
||||
|
||||
persist.byPath.".mozilla/firefox/default".store =
|
||||
if (cfg.persistData != null) then
|
||||
cfg.persistData
|
||||
else
|
||||
"ephemeral"
|
||||
;
|
||||
;
|
||||
in {
|
||||
".cache/mozilla".store = maybePersist;
|
||||
# storage consumes 80+ MB
|
||||
# the other profile dirs take significantly less; < 20MB total
|
||||
".mozilla/firefox/default/storage".store = maybePersist;
|
||||
# profile files (.mozilla/firefox/default/...):
|
||||
# - addons.json
|
||||
# - regenerated on launch
|
||||
# - addonStartup.json.lz4
|
||||
# - regenerated on next-next launch
|
||||
# - bookmarkbackups/
|
||||
# - bounce-tracking-protection.sqlite
|
||||
# - recreated on launch
|
||||
# - cert9.db
|
||||
# - regenerated on launch
|
||||
# - compatibility.ini
|
||||
# - regenerated on launch
|
||||
# - containers.json
|
||||
# - regenerated on launch
|
||||
# - content-prefs.sqlite
|
||||
# - recreated on launch
|
||||
# - cookies.sqlite{,-wal}
|
||||
# - recreated on launch
|
||||
# - crashes/
|
||||
# - datareporting/
|
||||
# - domain_to_categories.sqlite{,-journal}
|
||||
# - recreated on launch
|
||||
# - enumerate_devices.txt
|
||||
# - recreated on launch
|
||||
# - extension-preferences.json
|
||||
# - NOT recreated, but inconsequential to delete
|
||||
# - extension-settings.json
|
||||
# - regenerated on launch
|
||||
# - extension-store/
|
||||
# - extension-store-menus/
|
||||
# - extensions/
|
||||
# - extensions.json
|
||||
# - regenerated on launch
|
||||
# - failover.jsc
|
||||
# - regenerated on launch
|
||||
# - favicons.sqlite{,-wal}
|
||||
# - regenerated on launch
|
||||
# - formhistory.sqlite
|
||||
# - recreated on launch
|
||||
# - handlers.json
|
||||
# - NOT recreated, but inconsequential to delete
|
||||
# - key4.db
|
||||
# - recreated on launch
|
||||
# - lock -> ...
|
||||
# - minidumps/
|
||||
# - permissions.sqlite
|
||||
# - recreated on launch
|
||||
# - pkcs11.txt
|
||||
# - regenerated on launch
|
||||
# - places.sqlite{,-wal}
|
||||
# - recreated on launch
|
||||
# - prefs.js
|
||||
# - recreated on launch
|
||||
# - protections.sqlite
|
||||
# - recreated on launch
|
||||
# - search.json.mozlz4
|
||||
# - recreated on launch; loses any customized search engines
|
||||
# - security_state/
|
||||
# - serviceworker.txt
|
||||
# - NOT recreated, but inconsequential to delete
|
||||
# - sessionCheckpoints.json
|
||||
# - recreated on launch
|
||||
# - shield-preference-experiments.json
|
||||
# - NOT recreated, but inconsequential to delete
|
||||
# - storage/
|
||||
# - storage-sync-v2.sqlite
|
||||
# - recreated on launch
|
||||
# - storage.sqlite
|
||||
# - times.json
|
||||
# - recreated on launch
|
||||
# - xulstore.json
|
||||
# - recreated on launch
|
||||
};
|
||||
};
|
||||
}
|
||||
|
34
hosts/common/programs/firefox/search.json
Normal file
34
hosts/common/programs/firefox/search.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"version": 12,
|
||||
"engines": [
|
||||
{
|
||||
"id": "search@kagi.comdefault",
|
||||
"_name": "Kagi",
|
||||
"_loadPath": "[addon]search@kagi.com",
|
||||
"_urls": [
|
||||
{
|
||||
"params": [],
|
||||
"rels": [],
|
||||
"template": "https://kagi.com/search?q={searchTerms}"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
"rels": [],
|
||||
"template": "https://kagi.com/api/autosuggest?q={searchTerms}",
|
||||
"type": "application/x-suggestions+json"
|
||||
}
|
||||
],
|
||||
"_orderHint": null,
|
||||
"_telemetryId": null,
|
||||
"_filePath": null,
|
||||
"_definedAliases": [
|
||||
"@kagi"
|
||||
],
|
||||
"_extensionID": "search@kagi.com"
|
||||
}
|
||||
],
|
||||
"metaData": {
|
||||
"defaultEngineId": "search@kagi.comdefault",
|
||||
"defaultEngineIdHash": "hrzTeftqb+2F9OI3GYJwG6XAMryJr8Eut/3f90YKv3k="
|
||||
}
|
||||
}
|
@@ -15,19 +15,32 @@
|
||||
// - number
|
||||
// anything else (e.g. arrays, objects) MUST be represented as strings (use backticks for multiline/raw strings)
|
||||
|
||||
// COMMON SETTINGS TO TOGGLE (at runtime, in about:config)
|
||||
// defaultPref("security.ssl.require_safe_negotiation", false);
|
||||
|
||||
///// RESET UNWANTED ARKENFOX CHANGES
|
||||
// browser.sessionstore.privacy_level: 0, 1, 2
|
||||
// 0: persist partially-filled forms to disk, across browser restarts
|
||||
defaultPref("browser.sessionstore.privacy_level", 0);
|
||||
// enable 0-round-trip TLS resumption, at the expense that MITM can replay the client's first packet.
|
||||
defaultPref("security.tls.enable_0rtt_data", true);
|
||||
//
|
||||
// `enable_0rtt_data=true`: enable 0-round-trip TLS resumption, at the expense that MITM can replay the client's first packet.
|
||||
// defaultPref("security.tls.enable_0rtt_data", true);
|
||||
//
|
||||
// `require_safe_negotiation=false`: allow TLS 1.2 connections even to servers potentially vulnerable to CVE-2009-3555.
|
||||
// this allows a MITM attacker to prefix arbitrary data to my request.
|
||||
// as of 2025-07-20: 99.9% of sites support safe negotiation. 0.1% do not;
|
||||
// google-chrome, epiphany, and stock firefox (not arkenfox) do not enforce safe negotiation.
|
||||
// - <https://lwn.net/Articles/362234/>
|
||||
// defaultPref("security.ssl.require_safe_negotiation", false);
|
||||
//
|
||||
// OCSP queries SSL cert revocation status on every connect; that means letting a 3rd party know every site you visit.
|
||||
// disable that, how in hell is that good for privacy.
|
||||
// N.B.: i'm pretty sure this keeps CRlite enabled, which is the better implementation of cert revocation (i.e. performed locally).
|
||||
// see: <https://blog.mozilla.org/security/2020/01/09/crlite-part-1-all-web-pki-revocations-compressed/>
|
||||
defaultPref("security.OCSP.enabled", 0);
|
||||
// if we can't query the revocation status of a SSL cert because the issuer is offline,
|
||||
// treat it as unrevoked.
|
||||
//
|
||||
// `security.OCSP.require=false`: if we can't query the revocation status of a SSL cert because
|
||||
// the issuer is offline, treat it as unrevoked.
|
||||
// see: <https://librewolf.net/docs/faq/#im-getting-sec_error_ocsp_server_error-what-can-i-do>
|
||||
defaultPref("security.OCSP.require", false);
|
||||
defaultPref("browser.display.use_system_colors", true);
|
||||
@@ -107,6 +120,8 @@ defaultPref("network.protocol-handler.external.xdg-open", true); // for firefox-
|
||||
defaultPref("network.protocol-handler.external.mpv", true); // for open-in-mpv extension
|
||||
defaultPref("network.protocol-handler.external.element", true); // for Element matrix client
|
||||
defaultPref("network.protocol-handler.external.matrix", true); // for Nheko matrix client
|
||||
defaultPref("network.protocol-handler.external.slack", true); // for official Slack desktop app
|
||||
defaultPref("network.protocol-handler.external.zoommtg", true); // for official zoom desktop app
|
||||
|
||||
// statically configure bookmarks.
|
||||
// notably, these bookmarks have "shortcut url" fields:
|
||||
@@ -125,6 +140,12 @@ defaultPref("trailhead.firstrun.didSeeAboutWelcome", true);
|
||||
defaultPref("browser.aboutConfig.showWarning", false);
|
||||
defaultPref("browser.shell.checkDefaultBrowser", false);
|
||||
|
||||
// disable extension updates
|
||||
defaultPref("extensions.update.autoUpdateDefault", false);
|
||||
defaultPref("extensions.update.enabled", false);
|
||||
// wipe the URIs used to check for updates, as a precaution.
|
||||
defaultPref("extensions.update.url", "");
|
||||
defaultPref("extensions.update.background.url", "");
|
||||
|
||||
// browser.engagement.sidebar-button.has-used
|
||||
// browser.migration.version = 150
|
||||
|
@@ -11,7 +11,9 @@
|
||||
# - linking flare to iOS signal "works", but neither side can exchange messages nor contacts
|
||||
# in iOS i see "A message from Colin could not be delivered"
|
||||
# - registering as primary device does not work ("you are not authorized", or some such)
|
||||
#
|
||||
### compatibility (2025-07-05):
|
||||
# - registering as primary device works, via JMP.chat tel.
|
||||
# - no apparent way to create chats, though allegedly i can still be invited to existing chats.
|
||||
### debugging:
|
||||
# - `RUST_LOG=flare=trace flare`
|
||||
#
|
||||
@@ -66,8 +68,15 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.flare-signal = {
|
||||
packageUnwrapped = pkgs.flare-signal-nixified;
|
||||
# packageUnwrapped = pkgs.flare-signal;
|
||||
# packageUnwrapped = pkgs.flare-signal-nixified;
|
||||
packageUnwrapped = pkgs.flare-signal.overrideAttrs (upstream: {
|
||||
postPatch = (upstream.postPatch or "") + ''
|
||||
# enable the "Primary Device" button (beta).
|
||||
# or setenv FLARE_ENABLE_PRIMARY_DEVICE=1
|
||||
substituteInPlace data/resources/ui/setup_window.blp \
|
||||
--replace 'sensitive: false;' ""
|
||||
'';
|
||||
});
|
||||
persist.byStore.private = [
|
||||
# everything: conf, state, files, all opaque
|
||||
".local/share/flare"
|
||||
|
@@ -11,6 +11,7 @@
|
||||
# - now you can send messages, and read messages in unencrypted rooms, but not read messages from encrypted rooms.
|
||||
# to fix encrypted message receipt:
|
||||
# - start from above (fractal closed, no ~/.local/share/fractal/*)
|
||||
# - use `sane-wipe fractal` and restart fractal & verify your session, OR:
|
||||
# - in ~/.local/share/keyrings/Default_keyring.keyring:
|
||||
# - find the entry that says "display-name=Fractal: Matrix credentials for <mxid>"
|
||||
# - remove that entry and all associated entries (i.e. ones with same number but different :attributeN)
|
||||
|
@@ -18,6 +18,10 @@ in
|
||||
rm "$out/bin/git-jump"
|
||||
'';
|
||||
});
|
||||
suggestedPrograms = [
|
||||
"difftastic"
|
||||
"ssh"
|
||||
];
|
||||
sandbox.net = "clearnet";
|
||||
sandbox.whitelistPwd = true;
|
||||
sandbox.autodetectCliPaths = "parent"; # autodetection is necessary for git-upload-pack; "parent" so that `git mv` works
|
||||
@@ -27,8 +31,8 @@ in
|
||||
"knowledge"
|
||||
"nixos"
|
||||
"ref"
|
||||
".ssh/id_ed25519" # for ssh-auth'd remotes
|
||||
];
|
||||
sandbox.whitelistSsh = true;
|
||||
fs.".config/git/config".symlink.text = mkCfg {
|
||||
# top-level options documented:
|
||||
# - <https://git-scm.com/docs/git-config#_variables>
|
||||
@@ -44,6 +48,7 @@ in
|
||||
alias.d = "difftool";
|
||||
alias.dif = "diff"; # common typo
|
||||
alias.difsum = "diff --compact-summary"; #< show only the list of files which changed, not contents
|
||||
alias.pul = "pull"; # common typo
|
||||
alias.rb = "rebase";
|
||||
alias.reset-head = "reset --hard HEAD";
|
||||
alias.st = "status";
|
||||
@@ -54,7 +59,7 @@ in
|
||||
# - <https://difftastic.wilfred.me.uk/git.html>
|
||||
diff.tool = "difftastic";
|
||||
difftool.prompt = false;
|
||||
"difftool \"difftastic\"".cmd = ''${lib.getExe pkgs.difftastic} "$LOCAL" "$REMOTE"'';
|
||||
"difftool \"difftastic\"".cmd = ''difft "$LOCAL" "$REMOTE"'';
|
||||
# now run `git difftool` to use difftastic git
|
||||
|
||||
# render dates as YYYY-MM-DD HH:MM:SS +TZ
|
||||
|
@@ -19,37 +19,26 @@
|
||||
".local/share/keyrings"
|
||||
];
|
||||
|
||||
fs.".local/share/keyrings/default" = {
|
||||
file.text = "Default_keyring.keyring"; #< no trailing newline
|
||||
# wantedBy = [ config.sane.fs."${config.sane.persist.stores.private.origin}".unit ];
|
||||
# wantedBeforeBy = [ #< don't create this as part of `multi-user.target`
|
||||
# "gnome-keyring.service" # TODO: sane.programs should declare this dependency for us
|
||||
# ];
|
||||
};
|
||||
# N.B.: certain keyring names have special significance
|
||||
# `login.keyring` is forcibly encrypted to the user's password, so that pam gnome-keyring can unlock it on login.
|
||||
# - it does this re-encryption forcibly, any time it wants to write to the keyring.
|
||||
fs.".local/share/keyrings/Default_keyring.keyring" = {
|
||||
file.text = ''
|
||||
[keyring]
|
||||
display-name=Default keyring
|
||||
lock-on-idle=false
|
||||
lock-after=false
|
||||
'';
|
||||
# wantedBy = [ config.sane.fs."${config.sane.persist.stores.private.origin}".unit ];
|
||||
# wantedBeforeBy = [ #< don't create this as part of `multi-user.target`
|
||||
# "gnome-keyring.service"
|
||||
# ];
|
||||
};
|
||||
|
||||
services.gnome-keyring = {
|
||||
description = "gnome-keyring-daemon: secret provider";
|
||||
partOf = [ "graphical-session" ];
|
||||
command = let
|
||||
default_keyring = pkgs.writeText "Default_keyring.keyring" ''
|
||||
[keyring]
|
||||
display-name=Default keyring
|
||||
lock-on-idle=false
|
||||
lock-after=false
|
||||
'';
|
||||
gkr-start = pkgs.writeShellScriptBin "gnome-keyring-daemon-start" ''
|
||||
set -eu
|
||||
# XXX(2024-09-05): this service races with the creation of the keyrings directory, so wait for it to appear
|
||||
test -e ~/.local/share/keyrings
|
||||
# N.B.: certain keyring names have special significance
|
||||
# `login.keyring` is forcibly encrypted to the user's password, so that pam gnome-keyring can unlock it on login.
|
||||
# - it does this re-encryption forcibly, any time it wants to write to the keyring.
|
||||
echo -n "Default_keyring" > ~/.local/share/keyrings/default
|
||||
cp ${default_keyring} --update=none ~/.local/share/keyrings/Default_keyring.keyring
|
||||
|
||||
mkdir -m 0700 -p $XDG_RUNTIME_DIR/keyring
|
||||
exec gnome-keyring-daemon --start --foreground --components=secrets
|
||||
'';
|
||||
|
@@ -35,6 +35,11 @@ in {
|
||||
sandbox.net = "clearnet";
|
||||
|
||||
fs.".config/gpodderFeeds.opml".symlink.text = feeds.feedsToOpml wanted-feeds;
|
||||
fs.".local/share/gPodder/Settings.json".symlink.text = builtins.toJSON (import ./settings.nix);
|
||||
# if you don't persist its database, you get untracked (and hence non-gc'd) downloads, plus slooow startup.
|
||||
# but i *don't* want to persist all the things in this directory, so dedicate a subdir to the persisted data.
|
||||
fs.".local/share/gPodder/Database".symlink.target = "persist/Database";
|
||||
# fs.".local/share/gPodder/gpodder.net".symlink.text = "persist/gpodder.net"; #< for synching episode playback positions between devices, i think
|
||||
|
||||
services.gpodder-ensure-feeds = {
|
||||
description = "synchronize static OPML feeds into gPodder's subscription database";
|
||||
@@ -44,8 +49,11 @@ in {
|
||||
|
||||
persist.byStore.plaintext = [
|
||||
"Videos/gPodder"
|
||||
# if you don't persist its database, you get untracked (and hence non-gc'd) downloads, plus slooow startup.
|
||||
".local/share/gPodder"
|
||||
".local/share/gPodder/persist"
|
||||
];
|
||||
persist.byStore.ephemeral = [
|
||||
".local/share/gPodder/Logs"
|
||||
".local/share/gPodder/youtube-dl"
|
||||
];
|
||||
};
|
||||
}
|
144
hosts/common/programs/gpodder/settings.nix
Normal file
144
hosts/common/programs/gpodder/settings.nix
Normal file
@@ -0,0 +1,144 @@
|
||||
{
|
||||
auto = {
|
||||
cleanup.days = 7;
|
||||
cleanup.played = false;
|
||||
cleanup.unfinished = true;
|
||||
cleanup.unplayed = false;
|
||||
retries = 3;
|
||||
update.enabled = false;
|
||||
# update.frequency = 20;
|
||||
};
|
||||
check_connection = false;
|
||||
downloads.chronological_order = true;
|
||||
extensions.enabled = [
|
||||
# gpodder's python-only youtube-dl module doesn't support DRM'd videos,
|
||||
# so *always* shell out to yt-dlp
|
||||
"youtube-dl"
|
||||
];
|
||||
extensions.youtube-dl = {
|
||||
embed_subtitles = false;
|
||||
# manage_channel = true: uses `yt-dlp` to fetch the list of episodes for a channel.
|
||||
# manage_downloads = true: uses `yt-dlp` to download each individual episode.
|
||||
# XXX(2025-07-30): `manage_channel = false` otherwise yt-dlp hangs the refresh operation (it gets stuck on age verification?)
|
||||
# `manage_downloads = true` because only yt-dlp can handle DRM'd video; native gpodder cannot.
|
||||
manage_channel = false;
|
||||
manage_downloads = true;
|
||||
};
|
||||
limit.bandwidth.enabled = false;
|
||||
# limit.bandwidth.kbps = 500.0;
|
||||
limit.downloads.concurrent = 2;
|
||||
limit.downloads.concurrent_max = 16;
|
||||
limit.downloads.enabled = true;
|
||||
limit.episodes = 200;
|
||||
# player.audio = "default";
|
||||
# player.video = "default";
|
||||
software_update.check_on_startup = false;
|
||||
software_update.interval = 0;
|
||||
software_update.last_check = 0;
|
||||
# "ui": {
|
||||
# "cli": {
|
||||
# "colors": true
|
||||
# },
|
||||
# "gtk": {
|
||||
# "color_scheme": "light",
|
||||
# "download_list": {
|
||||
# "remove_finished": true
|
||||
# },
|
||||
# "episode_list": {
|
||||
# "always_show_new": true,
|
||||
# "columns": 6,
|
||||
# "ctrl_click_to_sort": false,
|
||||
# "descriptions": true,
|
||||
# "right_align_released_column": false,
|
||||
# "show_released_time": false,
|
||||
# "trim_title_prefix": true,
|
||||
# "view_mode": 1
|
||||
# },
|
||||
# "find_as_you_type": true,
|
||||
# "html_shownotes": true,
|
||||
# "live_search_delay": 200,
|
||||
# "new_episodes": "show",
|
||||
# "only_added_are_new": false,
|
||||
# "podcast_list": {
|
||||
# "all_episodes": true,
|
||||
# "hide_empty": false,
|
||||
# "sections": true,
|
||||
# "view_mode": 1
|
||||
# },
|
||||
# "search_always_visible": false,
|
||||
# "state": {
|
||||
# "channel_editor": {
|
||||
# "height": -1,
|
||||
# "maximized": false,
|
||||
# "width": -1,
|
||||
# "x": -1,
|
||||
# "y": -1
|
||||
# },
|
||||
# "config_editor": {
|
||||
# "height": 450,
|
||||
# "maximized": false,
|
||||
# "width": 750,
|
||||
# "x": 0,
|
||||
# "y": 0
|
||||
# },
|
||||
# "episode_selector": {
|
||||
# "height": 1136,
|
||||
# "maximized": false,
|
||||
# "width": 958,
|
||||
# "x": 20,
|
||||
# "y": 20
|
||||
# },
|
||||
# "episode_window": {
|
||||
# "height": 400,
|
||||
# "maximized": false,
|
||||
# "width": 500,
|
||||
# "x": -1,
|
||||
# "y": -1
|
||||
# },
|
||||
# "export_to_local_folder": {
|
||||
# "height": 400,
|
||||
# "maximized": false,
|
||||
# "width": 500,
|
||||
# "x": -1,
|
||||
# "y": -1
|
||||
# },
|
||||
# "main_window": {
|
||||
# "episode_column_order": [],
|
||||
# "episode_column_sort_id": 12,
|
||||
# "episode_column_sort_order": false,
|
||||
# "episode_list_size": 200,
|
||||
# "height": 1137,
|
||||
# "maximized": false,
|
||||
# "paned_position": 200,
|
||||
# "width": 1920,
|
||||
# "x": 20,
|
||||
# "y": 20
|
||||
# },
|
||||
# "podcastdirectory": {
|
||||
# "height": -1,
|
||||
# "maximized": false,
|
||||
# "width": -1,
|
||||
# "x": -1,
|
||||
# "y": -1
|
||||
# },
|
||||
# "preferences": {
|
||||
# "height": 1137,
|
||||
# "maximized": false,
|
||||
# "width": 1920,
|
||||
# "x": 0,
|
||||
# "y": 0
|
||||
# }
|
||||
# },
|
||||
# "toolbar": false
|
||||
# }
|
||||
# },
|
||||
# "vimeo": {
|
||||
# "fileformat": "720p"
|
||||
# },
|
||||
# "youtube": {
|
||||
# "preferred_fmt_id": 18,
|
||||
# "preferred_fmt_ids": [],
|
||||
# "preferred_hls_fmt_id": 93,
|
||||
# "preferred_hls_fmt_ids": []
|
||||
# }
|
||||
}
|
@@ -1,3 +1,9 @@
|
||||
# N.B.(2025-07-23):
|
||||
# - gpu stats require `BUNPEN_DISABLE=1`.
|
||||
# these are obtained via /proc/$super/fdinfo;
|
||||
# <https://www.kernel.org/doc/html/latest/gpu/drm-usage-stats.html>
|
||||
# no idea if this is a fundamental thing (drm subsystem is namespace unaware),
|
||||
# or something else.
|
||||
{ ... }:
|
||||
{
|
||||
sane.programs.htop = {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
htop_version=3.3.0
|
||||
htop_version=3.4.1
|
||||
config_reader_min_version=3
|
||||
fields=0 48 6 18 39 130 2 46 47 49 1
|
||||
fields=0 48 6 17 18 39 130 2 46 47 49 1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=0
|
||||
hide_running_in_container=0
|
||||
@@ -27,6 +27,7 @@ show_cpu_usage=1
|
||||
show_cpu_frequency=0
|
||||
show_cpu_temperature=0
|
||||
degree_fahrenheit=0
|
||||
show_cached_memory=1
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=0
|
||||
@@ -36,8 +37,8 @@ hide_function_bar=0
|
||||
header_layout=two_67_33
|
||||
column_meters_0=AllCPUs Memory Swap Zram
|
||||
column_meter_modes_0=1 1 1 1
|
||||
column_meters_1=Systemd Uptime Tasks LoadAverage NetworkIO DiskIO
|
||||
column_meter_modes_1=2 2 2 2 2 2
|
||||
column_meters_1=Systemd Uptime Tasks LoadAverage Blank GPU NetworkIO DiskIO
|
||||
column_meter_modes_1=2 2 2 2 2 2 2 2
|
||||
tree_view=0
|
||||
sort_key=46
|
||||
tree_sort_key=0
|
||||
|
7
hosts/common/programs/htpasswd.nix
Normal file
7
hosts/common/programs/htpasswd.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.htpasswd = {
|
||||
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.apacheHttpd "htpasswd";
|
||||
sandbox.autodetectCliPaths = "existingFileOrParent"; # for -c; creating passwd files
|
||||
};
|
||||
}
|
@@ -24,7 +24,7 @@
|
||||
|
||||
sandbox.whitelistAudio = true;
|
||||
sandbox.whitelistDri = true;
|
||||
sandbox.whitelistX = true; #< TODO: is this needed? try QT_QPA_PLATFORM=wayland or SDL_VIDEODRIVER=wayland
|
||||
sandbox.whitelistX = true; #< XXX(2025-05-01): neither QT_QPA_PLATFORM=wayland nor SDL_VIDEODRIVER=wayland work; X11 is required
|
||||
sandbox.extraPaths = [
|
||||
# for the pad input (/dev/input/js*)
|
||||
"/dev/input"
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
persist.byStore.plaintext = [
|
||||
".itgmania/Cache" #< otherwise gotta index all the songs every launch
|
||||
".itgmania/Save"
|
||||
".itgmania/Save" #< Save/Preferences.ini (esp: GlobalOffsetSeconds)
|
||||
];
|
||||
|
||||
# TODO: setup ~/.local/share/itgmania/Themes
|
||||
|
7
hosts/common/programs/lddtree.nix
Normal file
7
hosts/common/programs/lddtree.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.lddtree = {
|
||||
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.pax-utils "lddtree";
|
||||
sandbox.autodetectCliPaths = "existingFile";
|
||||
};
|
||||
}
|
20
hosts/common/programs/mercurial/default.nix
Normal file
20
hosts/common/programs/mercurial/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.mercurial = {
|
||||
packageUnwrapped = pkgs.mercurialFull;
|
||||
sandbox.wrapperType = "inplace"; # etc/mercurial/hgrc refers to hg python-path (to define an extension)
|
||||
suggestedPrograms = [
|
||||
"colordiff" #< optional, for my hgrc aliases
|
||||
"less" #< TODO: this might be a missing dependency on the nix side of things?
|
||||
];
|
||||
sandbox.net = "clearnet";
|
||||
sandbox.whitelistPwd = true;
|
||||
sandbox.whitelistSsh = true;
|
||||
sandbox.extraHomePaths = [
|
||||
# even with `whitelistPwd`, hg has to crawl *up* the path -- which isn't necessarily in the sandbox -- to locate the repo root.
|
||||
"dev"
|
||||
"ref"
|
||||
];
|
||||
fs.".config/hg/hgrc".symlink.target = ./hgrc;
|
||||
};
|
||||
}
|
44
hosts/common/programs/mercurial/hgrc
Normal file
44
hosts/common/programs/mercurial/hgrc
Normal file
@@ -0,0 +1,44 @@
|
||||
# `hg config` => to show the finalized config
|
||||
|
||||
[extensions]
|
||||
# Mercurial Queues (MQ) extension adds patch-stack support to mercurial.
|
||||
# MQ is shipped in mercurial, but not enabled by default.
|
||||
# it's a port of some git extension, idk which.
|
||||
mq =
|
||||
|
||||
# `hg help color`
|
||||
# to see the label used in a specific context, set `--color debug`.
|
||||
# e.g. `hg stat --color debug`
|
||||
[color]
|
||||
qseries.applied = blue bold underline
|
||||
qseries.unapplied = magenta
|
||||
# qseries.message.applied
|
||||
# qseries.message.unapplied
|
||||
|
||||
[diff]
|
||||
# showfunc = True
|
||||
# `diff.git = True`: render diffs with `diff --git` instead of `diff -r`
|
||||
git = True
|
||||
# `diff.unified = N`: show N lines of context (else, use default as per `diff`)
|
||||
# unified = 10
|
||||
|
||||
[alias]
|
||||
noop = !$HG > /dev/null
|
||||
q = qseries -s -v
|
||||
#
|
||||
# `hg qpath`: print the path to the current queue
|
||||
qpath = !$HG noop ; echo ".hg/patches-$($HG qqueue --active)" | sed 's:hg/patches-patches:hg/patches:'
|
||||
#
|
||||
# `hg qcat PATCH_NAME`: view the diff of a mq patch in the current queue.
|
||||
qcat = !$HG noop ; cat $($HG qpath)/$1 | colordiff --nobanner
|
||||
#
|
||||
# `hg qdup NEW_QUEUE_NAME`: copy all patches in the current queue into a new queue
|
||||
qdup = !$HG qpop -a ; cp -R $($HG qpath) .hg/patches-$1 ; echo $1 >> .hg/patches.queues ; $HG qqueue $1
|
||||
qstat = qdiff --stat
|
||||
sblame = blame -undq
|
||||
#
|
||||
# these aliases are BROKEN:
|
||||
# `hg qmigrate OTHER_QUEUE_NAME`: copy currently-applied patches onto another queue
|
||||
# qmigrate = !$HG export -o '/tmp/qmigrate-$1' ; $HG qpop -a ; $HG qqueue $1 ; $HG import '/tmp/qmigrate-$1'
|
||||
# `hg qcref`: like `git add -p`; select which changes should be in this patch, interactively
|
||||
# qcref = !$HG qrefresh --exclude . && $HG qrefresh --config ui.interface.chunkselector=curses --interactive
|
@@ -61,13 +61,6 @@ in
|
||||
})
|
||||
];
|
||||
|
||||
# upstream mimeo doesn't run preInstall/postInstall hooks, but we need that for the .desktop file
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
${upstream.installPhase}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = (upstream.passthru or {}) // {
|
||||
inherit mimeo-open-desktop;
|
||||
};
|
||||
|
@@ -41,7 +41,7 @@
|
||||
|
||||
let
|
||||
cfg = config.sane.programs.mpv;
|
||||
uosc = pkgs.mpvScripts.uosc.overrideAttrs (upstream: {
|
||||
uosc = pkgs.mpvScripts.uosc.overrideAttrs (upstream: rec {
|
||||
version = "5.2.0-unstable-2024-05-07";
|
||||
src = lib.warnIf (lib.versionOlder "5.2.0" upstream.version) "uosc outdated; remove patch?" pkgs.fetchFromGitHub {
|
||||
owner = "tomasklaen";
|
||||
@@ -57,6 +57,12 @@ let
|
||||
# hash = "sha256-lpqk4nnCxDZr/Y7/seM4VyR30fVrDAT4VP7C8n88lvA=";
|
||||
# };
|
||||
|
||||
tools = pkgs.buildGoModule {
|
||||
pname = "uosc-bin";
|
||||
inherit version src;
|
||||
vendorHash = "sha256-nkY0z2GiDxfNs98dpe+wZNI3dAXcuHaD/nHiZ2XnZ1Y=";
|
||||
};
|
||||
|
||||
postPatch = (upstream.postPatch or "") + ''
|
||||
### patch so touch controls work well with sway 1.9+
|
||||
### in particular, "mouse.hover" is *always* false for touch events (i guess this is a bug in mpv?)
|
||||
@@ -219,8 +225,7 @@ in
|
||||
];
|
||||
|
||||
fs.".config/mpv/input.conf".symlink.target = ./input.conf;
|
||||
fs.".config/mpv/mpv.conf".symlink.target = pkgs.substituteAll {
|
||||
src = ./mpv.conf;
|
||||
fs.".config/mpv/mpv.conf".symlink.target = pkgs.replaceVars ./mpv.conf {
|
||||
inherit (cfg.config) defaultProfile;
|
||||
};
|
||||
fs.".config/mpv/script-opts/console.conf".symlink.target = ./console.conf;
|
||||
|
@@ -11,11 +11,11 @@ VOLUME_UP ignore
|
||||
VOLUME_DOWN ignore
|
||||
# disable "double-click to toggle fullscreen", else that limits the rate at which i can seek
|
||||
# MBTN_LEFT_DBL ignore
|
||||
MBTN_LEFT_DBL cycle-values video-zoom 2.0 1.0 #< XXX: uosc eats this event
|
||||
# MBTN_LEFT_DBL cycle-values video-zoom 2.0 1.0 #< TODO: fix uosc so it stops eating this event
|
||||
|
||||
# image panning via image-positioning.lua
|
||||
# uosc swallows all (?) LMB inputs, so pan with middle button
|
||||
MBTN_LEFT script-binding drag-to-pan #< XXX: uosc eats this event
|
||||
# MBTN_LEFT script-binding drag-to-pan #< TODO: fix uosc to not eat the release event
|
||||
MBTN_MID script-binding drag-to-pan
|
||||
CTRL+MBTN_LEFT script-binding drag-to-pan
|
||||
WHEEL_UP script-message cursor-centric-zoom 0.2
|
||||
|
@@ -58,7 +58,7 @@ border=no
|
||||
# W caca libcaca (terminal rendering)
|
||||
# W sdl SDL 2.0 Renderer
|
||||
# W wlshm Wayland SHM video output (software scaling)
|
||||
# vo=@vo@
|
||||
# vo=wlshm
|
||||
|
||||
# audio and subtitle language preferences
|
||||
alang=en,eng,ja,jp,jpn
|
||||
|
@@ -6,6 +6,10 @@ vim.filetype.add {
|
||||
pattern = {
|
||||
['.*'] = {
|
||||
function(path, bufnr)
|
||||
-- returns true if the input is a shebang likely to evaluate to `nix-shell`, e.g.
|
||||
-- - "#!/usr/bin/env nix-shell" => true
|
||||
-- - "#!nix-shell -i bash -p coreutils" => true
|
||||
-- - "#!/usr/bin/env python" => false
|
||||
function test_for_nix_shell_shebang(maybe_hashbang)
|
||||
local bang_payload = string.match(maybe_hashbang, '^#!(.*)$')
|
||||
if not bang_payload then
|
||||
@@ -19,7 +23,12 @@ vim.filetype.add {
|
||||
end
|
||||
end
|
||||
|
||||
-- extract `$interpreter` from some `#!nix-shell -i $interpreter ...` line
|
||||
-- extract `$interpreter` from some `#!nix-shell -i $interpreter ...` line.
|
||||
-- returns `nil` if no `-i $interpreter` was specified.
|
||||
-- - "#!nix-shell -i my-beautiful-int -p foo" => "my-beautiful-int"
|
||||
-- - "#!nix-shell -p python3 -i python" => "python"
|
||||
-- - "#!/usr/bin/env python" => nil
|
||||
-- - "#!nix-shell -p python" => nil
|
||||
function parse_nix_shell(maybe_nix_shell)
|
||||
local shell_payload = string.match(maybe_nix_shell, "^#!nix%-shell(.*)$")
|
||||
|
||||
@@ -43,10 +52,25 @@ vim.filetype.add {
|
||||
return interpreters[1]
|
||||
end
|
||||
|
||||
-- given an interpreter (basename), guess a suitable vim filetype.
|
||||
-- for many languages, these are equivalent and this function is a no-op.
|
||||
-- "python2.7" => "python"
|
||||
-- "bash" => "bash"
|
||||
-- "totally-unknown" => "totally-unknown"
|
||||
function filetype_from_interpreter(i)
|
||||
-- list of known vim filetypes may be found in <repo:neovim/neovim:runtime/lua/vim/filetype.lua>
|
||||
if string.match(i, "^python") then
|
||||
-- python3, python2.7, etc
|
||||
return "python"
|
||||
elseif i == "ysh" then
|
||||
-- XXX(2025-05-16): neovim has no `ysh`/oil-shell filetype.
|
||||
-- consider one of these filetypes:
|
||||
-- - "sh": but ysh curly braces will confuse the syntax highlighting
|
||||
-- - "csh": no highlighting bugs, just omits some highlights
|
||||
-- - "cpp": better highlighting of functions, but thinks `#` comments are compiler directives
|
||||
-- - "fish": highlights a LOT, but still occasional bugs
|
||||
-- - "zsh": slightly more capable than csh; no bugs
|
||||
return "zsh"
|
||||
else
|
||||
-- very common for interpreter name to be the same as filetype
|
||||
return i
|
||||
|
@@ -244,6 +244,10 @@ with pkgs.vimPlugins;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./nix_shell.lua;
|
||||
}
|
||||
{
|
||||
type = "viml";
|
||||
config = builtins.readFile ./source_nav.vim;
|
||||
}
|
||||
{
|
||||
# show commit which last modified text under the cursor.
|
||||
# trigger with `:GitMessenger` or `<Leader>gm` (i.e. `\gm`)
|
||||
|
26
hosts/common/programs/neovim/source_nav.vim
Normal file
26
hosts/common/programs/neovim/source_nav.vim
Normal file
@@ -0,0 +1,26 @@
|
||||
function GoToHeader()
|
||||
let newfile = expand('%:r') . '.h'
|
||||
execute "e " . fnameescape(l:newfile)
|
||||
endfunc
|
||||
function GoToSource()
|
||||
let newfile = expand('%:r') . '.c'
|
||||
execute "e " . fnameescape(l:newfile)
|
||||
endfunc
|
||||
function ToggleHeaderSource()
|
||||
" If in abc.c file, open abc.h
|
||||
" If in abc.h, open abc.c
|
||||
let ext = expand('%:e')
|
||||
if ext =~ 'c'
|
||||
call GoToHeader()
|
||||
else
|
||||
call GoToSource()
|
||||
end
|
||||
endfunc
|
||||
|
||||
" command H call ToggleHeaderSource()
|
||||
" command C call ToggleHeaderSource()
|
||||
|
||||
nmap H :call ToggleHeaderSource()<CR>
|
||||
|
||||
" TODO: port to lua impl
|
||||
" vim.api.nvim_set_keymap("n", "H", "", { callback=ToggleHeaderSource, desc = "cycle between .h <-> .c files" })
|
80
hosts/common/programs/newelle.nix
Normal file
80
hosts/common/programs/newelle.nix
Normal file
@@ -0,0 +1,80 @@
|
||||
# newelle: ollama llm client
|
||||
# - does some extra prompt tuning beyond ollama's defaults,
|
||||
# to decrease pathologies
|
||||
# - intelligent formatting of model output (e.g. latex, markdown)
|
||||
#
|
||||
# shortcomings (as of 2025-07-23):
|
||||
# - poorly adapts to very narrow screens.
|
||||
# - usable, but e.g. the "post" button (and the window close button) is cut off
|
||||
# - closing the UI does not fully exit the process
|
||||
# - presumably it's sitting in the background, waiting to be dbus-activated
|
||||
# - launch is delayed quite a while on moby:
|
||||
# > Matplotlib is building the font cache; this may take a moment.
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.newelle = {
|
||||
packageUnwrapped = (pkgs.newelle.override {
|
||||
python3Packages = pkgs.python3Packages // {
|
||||
# XXX(2025-07-23): these don't cross compile; disable them
|
||||
# pydub drags in opencv, but only used for text-to-speech (and only for Newelle <= 0.9.8)
|
||||
pydub = null;
|
||||
# speechrecognition has a build error due to python3Packages.standard-aifc > python3Packages.audioop
|
||||
speechrecognition = null;
|
||||
# both of these are blocked on `python3Packages.spacy`
|
||||
# llama-index-* is imported, lazily, from handlers/rag/llamaindex_handler.py
|
||||
llama-index-core = null;
|
||||
llama-index-readers-file = null;
|
||||
};
|
||||
}).overridePythonAttrs (upstream: {
|
||||
postPatch = (upstream.postPatch or "") + ''
|
||||
# patch out the toplevel speech_recognition imports so that the app
|
||||
# is launchable without it.
|
||||
# actually trying to use speech recognition will (likely) manifest as a runtime error, instead.
|
||||
find . -exec sed -i 's/import speech_recognition/# import speech_recognition/g' '{}' ';'
|
||||
'';
|
||||
});
|
||||
|
||||
buildCost = 2; #< liable to break cross during updates; not important enough to block deploy over
|
||||
|
||||
sandbox.net = "all"; # maybe only needs wireguard, actually
|
||||
sandbox.whitelistWayland = true;
|
||||
sandbox.mesaCacheDir = ".cache/Newelle/mesa";
|
||||
|
||||
gsettings."io/github/qwersyk/Newelle" = {
|
||||
language-model = "ollama";
|
||||
# the actual gsettings is HUGE (see ~/.config/glib-2.0/settings/keyfile).
|
||||
# this is sliced down, and i'll let Newelle re-populate the omitted data on launch.
|
||||
llm-settings = ''
|
||||
{
|
||||
"ollama": {
|
||||
"last_request": 1,
|
||||
"models-info": {},
|
||||
"model-library": [
|
||||
{
|
||||
"key": "qwen2.5-abliterate:14b",
|
||||
"title": "qwen2.5-abliterate:14b",
|
||||
"description": "User added model"
|
||||
}
|
||||
],
|
||||
"endpoint": "http://10.0.10.22:11434",
|
||||
"models": "[[\"qwen2.5-abliterate:14b\", \"qwen2.5-abliterate:14b\"]]",
|
||||
"model": "qwen2.5-abliterate:14b"
|
||||
}
|
||||
}
|
||||
'';
|
||||
welcome-screen-shown = true;
|
||||
# extensions-settings='{"website-reader": {}, "websearch": {}}'
|
||||
# tts-voice='{"groq_tts": {"endpoint": "https://api.groq.com/openai/v1/", "instructions": ""}}'
|
||||
# stt-settings='{"groq_sr": {"endpoint": "https://api.groq.com/openai/v1/"}}'
|
||||
# llm-settings = <json blob>;
|
||||
# embedding-settings = <json blob>;
|
||||
# llm-secondary-settings = <json blob>;
|
||||
};
|
||||
|
||||
persist.byStore.ephemeral = [
|
||||
".cache/Newelle" # extensions
|
||||
".config/Newelle" # chat logs
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@
|
||||
# and write back *all* options for you to then edit further.
|
||||
secrets.".config/nicotine/config" = ../../../secrets/common/nicotine-config.bin;
|
||||
persist.byStore.plaintext = [
|
||||
".local/share/nicotine/downloads"
|
||||
".local/share/nicotine/downloads" #< this dir is configured by `transfers.downloaddir` config
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -1,7 +1,11 @@
|
||||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
sane.programs.nix = {
|
||||
# packageUnwrapped = pkgs.nixVersions.latest; #< XXX(2025-03-17): sometimes `nixVersions.latest` fails to eval T_T
|
||||
packageUnwrapped = pkgs.nix.overrideAttrs (_: {
|
||||
# ship debug info, used by gdb (/run/current-system/sw/lib/debug)
|
||||
separateDebugInfo = true;
|
||||
});
|
||||
sandbox.method = null; #< TODO: sandbox ?
|
||||
env.NIXPKGS_ALLOW_UNFREE = "1"; #< FUCK OFF YOU'RE SO ANNOYING
|
||||
persist.byStore.plaintext = [
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user