Compare commits
1107 commits
testing/wi
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c0004409d7 | |||
| 004832fc06 | |||
| 83371117d4 | |||
| e1c02d7a91 | |||
| 4dfc898140 | |||
| 21dc584199 | |||
| 6c80606b7e | |||
| 907f2cabca | |||
| 5c13051b4b | |||
| bc3269a814 | |||
| 63d9d6b004 | |||
| 9a821fda94 | |||
| 8157d0d561 | |||
| 024a6bdbe2 | |||
| 4bb20124a7 | |||
| 509684d0bd | |||
| c782bd5e53 | |||
| 4f8249b780 | |||
| d1a8e7222f | |||
| 402c847f3c | |||
| 2a9e8e6c03 | |||
| e98a71cd1e | |||
| 6fc74bd778 | |||
| 37f271bed8 | |||
| 2990972989 | |||
| b705a21478 | |||
| 75f9cc9d2b | |||
| ea17ef30c6 | |||
| 8a85e25d72 | |||
| 9a6a29831b | |||
| 8ca9e393ea | |||
| 9a87dc63c3 | |||
| 1ad05857b7 | |||
| 72078aad6c | |||
| abe0027e5d | |||
| ee3e0868a8 | |||
| 91abcbed19 | |||
| 93354e6419 | |||
| cc2e9d1a90 | |||
| e7588e0be0 | |||
| 4851369098 | |||
| 34e649e621 | |||
| f622d5f577 | |||
| c4bedfd86e | |||
| 011ceee498 | |||
| 0735ffdb69 | |||
| a25d214b82 | |||
| 27e9546327 | |||
| 140b12fa5d | |||
| babc27c8be | |||
| 939d0cc861 | |||
| 0edeac9f4c | |||
| 10fbeac140 | |||
|
|
1d9f9f4927 | ||
|
|
1941deb004 | ||
| 4a82035d82 | |||
| 604983800f | |||
| 81c17720eb | |||
| b8a7dfa8a8 | |||
| d0e090bb68 | |||
| e5e608c580 | |||
| 69717ef92b | |||
| d13f18a189 | |||
| de857dcfbf | |||
| 5680e29cd2 | |||
| 4a91f8a165 | |||
| 52e53ba5b3 | |||
| 218da08936 | |||
| 724d30a092 | |||
| c8c6fb1b5e | |||
| 59f5913b68 | |||
| 0d99bd6015 | |||
| 865b473df7 | |||
| c323f004f1 | |||
| 220af6cf15 | |||
| ae707d33ea | |||
| 880316173f | |||
| 0638cf6f5f | |||
| 0f7393714f | |||
| cc43450dd1 | |||
| 4c28a3eecb | |||
| 575a0e9610 | |||
|
|
58d4b60f5b | ||
|
|
75e0c8f6ac | ||
| 27ba1aaede | |||
| 087ed1c323 | |||
| e303fee58d | |||
| d11d080c94 | |||
|
|
2239c1cc64 | ||
|
|
576fd7604f | ||
| 9fd117c50c | |||
| d8c016e933 | |||
| f8312bc6f2 | |||
| 2d15fb3a5e | |||
| b06c782850 | |||
| 6c7393228e | |||
| 36a161d1df | |||
| 3e56c780dd | |||
| c9c6ef4a16 | |||
| 3a612d3e90 | |||
| 3381630a7a | |||
| 5eef477e0b | |||
| de7402576d | |||
| ecdd594a1b | |||
| 465ec6f2fc | |||
| 7d479007d9 | |||
| 48db46051d | |||
| b3ffc41b76 | |||
| 215e017cd3 | |||
| 4932dad23f | |||
| dd076fab3c | |||
| 3419ab4b77 | |||
| d3ab001222 | |||
| 68ae736c2c | |||
| 52fbdfe8cf | |||
| ccafbd8ae0 | |||
| 4aaeefa97a | |||
| 75c7e7b193 | |||
| 8cf7c1815e | |||
| 0567313fa2 | |||
| b7665d9bd5 | |||
| 55e0d25251 | |||
| 518c718a5d | |||
| 66332a980a | |||
| 3a45f85c37 | |||
| c4bd8d3fa1 | |||
| 7226266c30 | |||
| 1936294ea4 | |||
| a7afbda109 | |||
| ffcd5c93d2 | |||
| 27cf526c47 | |||
| 49c161e8ab | |||
| fa3872647d | |||
| 15c4e4fc51 | |||
| d577030892 | |||
| 2a27838974 | |||
| fd3e877d3d | |||
| 18c6cb6773 | |||
| 36f214f2a4 | |||
| 249942280d | |||
| 5722249dd2 | |||
| a2f82bc7d5 | |||
| a06d0d86fc | |||
| 3bbaf8785c | |||
| a2337566da | |||
| d02d1dbb33 | |||
| 1486058b90 | |||
| 16703bade1 | |||
| c42fdb7940 | |||
| 52a3e8557e | |||
| 2a4a4c5d47 | |||
| d4768ea7bf | |||
| f8d4e05080 | |||
| 42eeba3a9f | |||
| e0f1482511 | |||
| 2f4cbd382c | |||
| 54fd3373d0 | |||
| a9e9ae41ac | |||
| dfd00aad38 | |||
| c0679f7e79 | |||
| e78c666635 | |||
| 1a8e042be5 | |||
| f84e8c1013 | |||
| 5c55793134 | |||
| 6bea391858 | |||
| 5a24bf690f | |||
| acc4d31f46 | |||
| e2832de968 | |||
| 12681f2087 | |||
| 2baffcb7a5 | |||
| 2f1ca64025 | |||
| 12a1843587 | |||
| 09aceb18f4 | |||
| e73f9d612c | |||
| 1fd2ebedb0 | |||
| cf47ffc526 | |||
| 3b73bd8f14 | |||
| 4e49291a40 | |||
|
|
4c933a598c | ||
|
|
83b68d3034 | ||
| bada516463 | |||
| 85f53fbc85 | |||
| 0772dca431 | |||
| adea95e039 | |||
| 2b9a772959 | |||
| c76de11041 | |||
| 0245b680ef | |||
|
|
0c882eb783 | ||
|
|
bcbebb0d46 | ||
| 3af1ad12fd | |||
| 58efa5527c | |||
| 57afed24ed | |||
| 4bd188cc64 | |||
| c5dd3e4f5e | |||
| 8ae384686c | |||
| b4e6a9bc04 | |||
| 45a8eadeda | |||
| 892f9bfe73 | |||
| 6d356be1f0 | |||
| 03bfa7da93 | |||
| 84ddc3b6ec | |||
|
|
a9f5d4da4d | ||
|
|
c85d5d2150 | ||
| 480208b718 | |||
| 870fc4e2d7 | |||
| c17c9873b9 | |||
| 6a3e5c147b | |||
| c4bf653e14 | |||
| 2d85d6635b | |||
| e7d5efd169 | |||
| c9520a5bc8 | |||
| d0fdbe8822 | |||
| f8dc09565f | |||
| 6fabeecd1d | |||
| 5989fc4e70 | |||
| 240ff86538 | |||
| b06bb7009c | |||
| d9df212560 | |||
| 633d781a25 | |||
| 1cfcd112e8 | |||
| 1c2f3eb1c6 | |||
| f140929d9c | |||
| e94d04ab1f | |||
| c0b9ed6b00 | |||
| 3ef987f8d9 | |||
| fdf6a3ce62 | |||
| cc066cd0f0 | |||
| ed43feb5b6 | |||
| 92a7023ba0 | |||
| 843aacb6d3 | |||
| 09830a0aa8 | |||
| c556f63ebe | |||
|
|
b05012d8c9 | ||
|
|
0b138f3148 | ||
| ea07a839ae | |||
| 718de94655 | |||
| 72eca4fb05 | |||
|
|
38e624851b | ||
|
|
b04c649e53 | ||
| e801f91435 | |||
| 83ac77b864 | |||
| 3ead5d12c5 | |||
| 071fad3bcb | |||
| c66e8d7307 | |||
| a0053fe9ee | |||
| 0f1271badb | |||
| 18b66630d0 | |||
| efb2a24118 | |||
| c2cf093a72 | |||
| fe8d26a860 | |||
| 3f52fc1e81 | |||
| 8cb9905098 | |||
| 74e7f5435f | |||
| adf5409e32 | |||
| 1fadd257f3 | |||
| 0253d64b96 | |||
| 3061733e46 | |||
| 9512dd2e41 | |||
| 5ef6a68587 | |||
| 93c91d5a6b | |||
| 817371bf01 | |||
| b8ad7638ef | |||
| bd4affdea0 | |||
| 616db33773 | |||
| 7aa3a988fe | |||
| 718437153f | |||
| 93279eb6e6 | |||
| f35d104f84 | |||
| a6348c833e | |||
| 945eb34e60 | |||
| 19ed50cc9d | |||
| 69c13bc50e | |||
| 5f5aa86ce2 | |||
| e7a7b39d41 | |||
| e90ebf6220 | |||
| cc76cdf00d | |||
| 5f5412f433 | |||
| 1db10b5b9d | |||
| 44a3d4473f | |||
| f87dfa314e | |||
| 17164b05b9 | |||
| 1ecec11727 | |||
| bdbb5fe0de | |||
| 203bc2ab53 | |||
| 3ebd082be2 | |||
| 0fe62078fa | |||
| eb91ab1540 | |||
| d86285cdf9 | |||
| ffa71a694a | |||
| 9217ce6e91 | |||
| 8b0dfd5661 | |||
| a915e57d34 | |||
| 315d480601 | |||
| b1f4fcc223 | |||
| 9787ed2636 | |||
| 37f2453f17 | |||
| 4bc19ed87e | |||
| b2ae6493d9 | |||
| a3bb553f14 | |||
| 7f4d9a5e69 | |||
| ccf3fa2f4a | |||
| d0895da153 | |||
| 3bacc817a2 | |||
| ee0a768c03 | |||
| 5ea27ceb6b | |||
| 03859cf8c7 | |||
| ba2c4f9f33 | |||
| 23693d7268 | |||
| 2b6b616dbf | |||
|
|
88b4fca28a | ||
|
|
e82fcc0c4c | ||
| 631d340887 | |||
| f85f39f7fa | |||
| cc2adb3aa8 | |||
| f957be17d0 | |||
| dfdb1afe39 | |||
|
|
cc57b59ff2 | ||
|
|
ed5e0e405d | ||
| 16a8c3e186 | |||
| 95b3116fa8 | |||
| 5a834de1dd | |||
| a224191007 | |||
| 27edd08727 | |||
| 28cca81e69 | |||
| 7a6aa37647 | |||
| dbbd96c274 | |||
| a411469b2b | |||
| 7f3df40afe | |||
| 7d50fa4b75 | |||
| 9212de3ab2 | |||
| e6f0a356af | |||
| f535775b77 | |||
| 548c2f868f | |||
| 5be539a686 | |||
| 4d751d72b3 | |||
| 3502a31065 | |||
| a4a38b4a8b | |||
|
|
1e2850dd38 | ||
| 21b7184b65 | |||
| cffbc858f7 | |||
|
|
74501e3c39 | ||
|
|
ba15ebcf4c | ||
| fd14625074 | |||
| 04d695c77a | |||
| b9681ed925 | |||
| c8f4410d94 | |||
| cdae556af4 | |||
| 78c578b7ca | |||
| c3368f7ec5 | |||
| a6b826f089 | |||
| b310b4e691 | |||
| c54fa3c517 | |||
| 9f525a8756 | |||
| ffb3659357 | |||
| e7724c0212 | |||
| 90febfba6e | |||
| c0a054c937 | |||
| f724467c76 | |||
|
|
fd45845bdf | ||
|
|
2421602b88 | ||
| 7284f81fd4 | |||
| ae26fd9a09 | |||
| 0ae63f2c72 | |||
| 7c36f87860 | |||
| a5538535c2 | |||
| 29a5866f90 | |||
| f1e9e140d6 | |||
| 571f0f6f3e | |||
| 3ccf85aa9e | |||
| 095d24b797 | |||
| d92455cebf | |||
| d9269fbb93 | |||
| cca1730f3f | |||
| 1a62545c3c | |||
| f33525f565 | |||
| e1e94504e4 | |||
| 6c2790cb05 | |||
| da47e42111 | |||
| 438eb54cea | |||
| 2e74aa5f00 | |||
| 46c30b9d5d | |||
| b89253931d | |||
| 94d72b25f0 | |||
| 30a59b4be0 | |||
| 5f1b9b17ec | |||
| 54e8025488 | |||
| 8cd8e9e3dd | |||
| f6cc66d75c | |||
| f9de112a18 | |||
| 3c5d4ba108 | |||
| bc793316b9 | |||
|
|
c826c7f381 | ||
|
|
cd1b1da2fc | ||
| 9ef4231da0 | |||
| e447adb0ce | |||
| a9e3d8421e | |||
| 8818d8a1aa | |||
| 7d8dbaef0d | |||
| c0b65cd53b | |||
| 4ce28a177c | |||
| 6eda948d6e | |||
| b6c10e7325 | |||
| faad8ea374 | |||
| 21f6b46021 | |||
| 09041e2ec8 | |||
| cc835da43c | |||
| d99a56cd95 | |||
| 79a6b783bc | |||
| ef22d9e96c | |||
| 23fc6fe637 | |||
| 5e5720a3f7 | |||
| 5b98df2cee | |||
| 9efcffd0f6 | |||
| 024a93baf8 | |||
| e02d908d58 | |||
| ffc5a80849 | |||
| cde9d8faec | |||
| 77bfc31355 | |||
| 9d6693a0ae | |||
| b288e1c78c | |||
| 282a0ae22d | |||
| 38bcba4756 | |||
| 0fed2f3599 | |||
| 210addb2a7 | |||
| aa339560b3 | |||
| 8dc54c3565 | |||
| fa2e2c3ce6 | |||
| 4b45190901 | |||
| 7f300748af | |||
| 0a6ee4cd3d | |||
| ae7ead0309 | |||
| eadc1959d0 | |||
| de92335ae5 | |||
| ae557b287e | |||
| 716c28a303 | |||
| b9df2f3a0c | |||
| 017e2bc812 | |||
| db469ad58f | |||
| 06c3f076a4 | |||
| 606dba7e08 | |||
| 27f73340de | |||
| 2f37471697 | |||
| 76197628bc | |||
| 94a89fca4b | |||
| 4326568b66 | |||
| 43573ebf99 | |||
| 70caf4cd4b | |||
| 91a993a8f7 | |||
| 88196824f6 | |||
| 6d49e2b75d | |||
| 9eb196ea3a | |||
| b0d7064ca3 | |||
| a66544d92f | |||
| 27d1c31e35 | |||
| bebaa0c14f | |||
| 4a71a4cb79 | |||
| 4b1ea1f571 | |||
| 920fb1971a | |||
| c1c6c0102f | |||
| b362462905 | |||
| c5079d7909 | |||
| f071579f58 | |||
| 82839373bf | |||
| 24aa8d0174 | |||
| 80be3da7fc | |||
| 228123e2c7 | |||
| c464b40e6a | |||
| 4423adbd61 | |||
| 4c08dd9171 | |||
| 496274c0a5 | |||
| 2631a1fadc | |||
| c3e83989a7 | |||
| 9a85f90699 | |||
| ee430bd7d0 | |||
| a4e71dcbd3 | |||
| bedb4544cc | |||
| 1e6f7a3676 | |||
| aeb5b7e9a0 | |||
| 7d79d605d3 | |||
| ec14782c77 | |||
| 2e21312570 | |||
| df3866ba66 | |||
| 367901821a | |||
| 53541504ec | |||
| 87b1632ae2 | |||
| 0785ab9bcd | |||
| cb168182b3 | |||
| 484ed2e926 | |||
| 7cebea5535 | |||
| 882e1455cd | |||
| 7e8d0a59ee | |||
| b2b9c08d73 | |||
| b72afdf856 | |||
| a669c4519b | |||
| 7b3b9354de | |||
| c57a76dd03 | |||
| b4f8e18398 | |||
| d14c02bb83 | |||
| 2b3d6fb3d7 | |||
| ef15c4ca20 | |||
| ac2b215ad6 | |||
| d4b9c485b6 | |||
| ef9c4f3a08 | |||
| 1d051e34ed | |||
| ed4062b85b | |||
| f191d4bb1e | |||
| 0df212398f | |||
| 11847ae180 | |||
| 8c54c332c3 | |||
| 1cf9f6e564 | |||
| 361aa3cddd | |||
| 217ef21de8 | |||
| 2da3206a93 | |||
| b3a285c3d5 | |||
| da89b77f68 | |||
| 602a475e7d | |||
| 1c6ac8c834 | |||
| 49acaadbf7 | |||
| 7445e14865 | |||
| 1015dbdb31 | |||
| 2c6a7690a4 | |||
| 9637bd72f6 | |||
| 9bd61c9b6a | |||
| d9e8c2bd34 | |||
| 4765663295 | |||
| 54f0700ef7 | |||
| 8a598f86f5 | |||
| b6f4f1942d | |||
| 32a7b148a5 | |||
| 909ea3e2c4 | |||
| c04568cc85 | |||
| ab18a8d0a2 | |||
| 19e9865e8a | |||
| fb9bedc940 | |||
| a45a0bbcb5 | |||
| 81f935d842 | |||
| d13a8e5cd4 | |||
| a1510113a5 | |||
| b5e2d10d8e | |||
| 56d541cfa5 | |||
| 78f45a4fe8 | |||
| 3b41385a96 | |||
| 2aad80ddb0 | |||
| 1c4fe00272 | |||
| 07eae0a0eb | |||
| 2801e946d2 | |||
| 5c343c2e0c | |||
| 5e5fc24e59 | |||
| f1b6d5c0e7 | |||
| 06251d8da5 | |||
| 1700e735f6 | |||
| 1ba66868be | |||
| 2602b8bc1c | |||
| 67798937bb | |||
| 7d9a857f77 | |||
| aaa036f0c8 | |||
| 24fe2a0b99 | |||
| 7697d85a77 | |||
| 364ecd0516 | |||
| 3a73b323b2 | |||
| 06d3121009 | |||
| 3ab1b5134b | |||
| 611bbc0cfd | |||
| 513dda4a03 | |||
| a22f09493b | |||
| dff42e604b | |||
| e4a8dd89c7 | |||
| cdb565260b | |||
| 829cb3323c | |||
| 402322c1d1 | |||
| ac103633d3 | |||
| 236d9a9edb | |||
| 011c6e470c | |||
| 3d26dce8d6 | |||
| 4ddd7b1366 | |||
| 48ee7576b9 | |||
| 3c3ac706a1 | |||
| 995936f894 | |||
| 4ca367a465 | |||
| 943f111cb6 | |||
| 87ffeb596a | |||
| 3ea548a9ea | |||
| db97603429 | |||
| b408b82dd9 | |||
| 8426f39d71 | |||
| 8993e19d33 | |||
| 3453f16e7d | |||
| 728da44b76 | |||
| c1a21234f0 | |||
| ac900ac7eb | |||
| e7509cfa4b | |||
| 6773776ddb | |||
| b97d4a3efb | |||
| c20bd4c239 | |||
| 150aad6c6f | |||
| c57fe72f49 | |||
| d9e7668ff4 | |||
| 9063ff9dda | |||
| 1747b9c918 | |||
| 4a8d7a343d | |||
| 6bba973d1d | |||
| b9448b8533 | |||
| e8f849de69 | |||
| ba80a49cef | |||
| 922466cb38 | |||
| 196ca263d6 | |||
| 28692abd1d | |||
| dcb9acf8bd | |||
| d135183d2d | |||
| 9625fd3962 | |||
| d1d6b32cc5 | |||
| efa2eb309b | |||
| 881547f380 | |||
| 16e59c6a77 | |||
| 455269847e | |||
| c6a5c808e2 | |||
| 07d84e0d9c | |||
| 3ca0f77ff5 | |||
| 4e76513668 | |||
| 466a79e619 | |||
| 416aa9e921 | |||
| 365d8cfadf | |||
| 5fd155231c | |||
| 544cfe99e1 | |||
| 65b3cfa557 | |||
| 5dc2d1baf0 | |||
| 859dfb9552 | |||
| e0c96b4628 | |||
| 7c499fed49 | |||
| 71ef24eab2 | |||
| 911ec332ad | |||
| d9804e917c | |||
| 896b218ae2 | |||
| b0ef172f01 | |||
| 6f925163cc | |||
| 98e21b982d | |||
| e5caa1d8e3 | |||
| c5956a8a56 | |||
| 92a26d1621 | |||
| ed93d94779 | |||
| 458a59cd6d | |||
| db6428adb1 | |||
| 9afcf991e6 | |||
| 5ccd763bda | |||
| 1ed0175b8c | |||
| bdfe54e695 | |||
| 6b994b621c | |||
| d84f5a0ec5 | |||
| 9040f9a932 | |||
| 14cc783cf6 | |||
| ca06a9779a | |||
| bc68befab6 | |||
| e8ed6e0eb1 | |||
| 9951ffe3e4 | |||
| 991c58b64d | |||
| ce2d82c323 | |||
| 62c8c0e480 | |||
| 22187adb1b | |||
| fd480158b1 | |||
| b035ccecd7 | |||
| f8952fc47e | |||
| 1d770f1678 | |||
| e3b11d8a6e | |||
| da99b2b263 | |||
| 7b113e161b | |||
| a4c6078ffe | |||
| fb194c9baa | |||
| 8d29dabe74 | |||
| 0c0ebdcd1c | |||
| 993abd91be | |||
| 58eae09b6e | |||
| f70f0901b1 | |||
| 032b768a3f | |||
| 7aa4d5a2e6 | |||
| cdef029894 | |||
| 88d2274808 | |||
| ea20656dac | |||
| ba7e9f2e49 | |||
| 506cb016ad | |||
| cf6f8131ed | |||
| ab706d42de | |||
| 8de41594fa | |||
| 9efff26496 | |||
| da1846a702 | |||
| 3e5e7c03fe | |||
| 2b4449f4bc | |||
| 1fd1afaa49 | |||
| a17d353755 | |||
| 77a8caf565 | |||
| df95481984 | |||
| 26f2010175 | |||
| 69b629cf07 | |||
| 5254595281 | |||
| c0c0b79eb7 | |||
| 97ad0869d2 | |||
| 99297ff02b | |||
| ab3b771978 | |||
| b6690e578c | |||
| b1da1ff4cd | |||
| 3775c76edd | |||
| 6323733eac | |||
| 166bf22b76 | |||
| 8577e9180d | |||
| 2d9161522f | |||
| 4c51e1d6ca | |||
| fda167b774 | |||
| 1fc8edb1f8 | |||
| 70fec02905 | |||
| 470b7cc4c3 | |||
| cd4f3f7126 | |||
| 97cae9af27 | |||
| f1fe14308e | |||
| 27f093d4ed | |||
| f5d2b22894 | |||
| bea94df0f6 | |||
| 189c27b289 | |||
| dd6fcf38ec | |||
| a6ea2431f0 | |||
| 972dbd5264 | |||
| f5062221eb | |||
| 77eddb1aae | |||
| ca50525c88 | |||
| 5eb6f006e2 | |||
| dc8688e0c2 | |||
| 2532d32ffd | |||
| 13d0e1ddbd | |||
| 5e6d9034ef | |||
| 2fb0b9c3e9 | |||
| 56312d4667 | |||
| 4b1483327b | |||
| 2c733de3b3 | |||
| db849ea5c2 | |||
| a4294aefbc | |||
| 467dc89de1 | |||
| 8d7a8b3e41 | |||
| 777b18c6ca | |||
| 8fc0825b1a | |||
| 1279525460 | |||
| 51e6a82ac9 | |||
| 254779bccf | |||
| f3002ff460 | |||
| dda75aba62 | |||
| 2d8674f8db | |||
| 5d5c7db4c5 | |||
| abc7716dbe | |||
| e7db438520 | |||
| 26d248d971 | |||
| 1e80b3f543 | |||
| bba52e38de | |||
| fd9ad280ad | |||
| e3f65a429a | |||
| 989abc1425 | |||
| e3955c9158 | |||
| b52c1a9e2c | |||
| eec67e6c4d | |||
| 9c6a64c708 | |||
| 5a4b56580b | |||
| ed93b93c43 | |||
| 16c091ecfc | |||
| 99339fe4c4 | |||
| 42eb325b95 | |||
| 3f7dedabd1 | |||
| 10178e576f | |||
| 9de88b2e39 | |||
| bb31997dbc | |||
| f5c72a6851 | |||
| eefa011945 | |||
| a65bce3052 | |||
| 594bfb53a6 | |||
| 5d8fe1245c | |||
| 77a007c434 | |||
| 40597acda0 | |||
| 54b888b375 | |||
| 4c3be68563 | |||
| ee3fca43a7 | |||
| aeec9b75c1 | |||
| b0923384df | |||
| 0f844b278d | |||
| dd33631430 | |||
| 06444f80cb | |||
| 2c6d7f178c | |||
| 8c932dd229 | |||
| d3f2c9bd28 | |||
| e154774368 | |||
| 0ca9746daf | |||
| dc88ab4fdb | |||
| 59a48fc8bb | |||
| a76b82cbcc | |||
| 6504f559c5 | |||
| 40f3f9b11f | |||
| 5bd03881e0 | |||
| 657d43155f | |||
| 72bbc39ce7 | |||
| 0806e9ec72 | |||
| 1d6312c258 | |||
| a0f0818884 | |||
| 3f26f71867 | |||
| 2107d55b11 | |||
| 4ff146e0fa | |||
| 4b2c36b00f | |||
| a0e4da2fd0 | |||
| e29a690a6d | |||
| 3bea2397f5 | |||
| accf26c1ea | |||
| 1ef0a5c034 | |||
| 6cafe8fb74 | |||
| 7a9d0481ee | |||
| c4e2846818 | |||
| f774334203 | |||
| 11350fb5c2 | |||
| 1d6d52d3e7 | |||
| 52e3ed6ad5 | |||
| 9a265bba77 | |||
| 41b683f451 | |||
| d3f3f640e4 | |||
| a1d7374809 | |||
| 69db6e160b | |||
| 23652b008e | |||
| 3cb4f363a5 | |||
| 61de903e04 | |||
| 1da1b2c9dd | |||
| 52dac2c01d | |||
| c0309ee541 | |||
| f768eb6fa7 | |||
| 54abb6e1c5 | |||
| 43ac1228f4 | |||
| 5578ac4c3d | |||
| f29a5aaacd | |||
| 6c651e65f1 | |||
| e62c55bb31 | |||
| 406df074d5 | |||
| 79b1bb0d35 | |||
| 8733fc7054 | |||
| 9057a029ab | |||
| 8a7c383296 | |||
| 8dcbfc1929 | |||
| 5218910a2b | |||
| 825120f549 | |||
| 069708264d | |||
| 1f8b0bd54c | |||
| 41c4362136 | |||
| e0ec7ceb2a | |||
| 1bf3cdf993 | |||
| 03128000f2 | |||
| 31bcf93498 | |||
| fb1de1415e | |||
| 8c7c64ce98 | |||
| 634e1c5cdf | |||
| d00d0280c4 | |||
| e9ca71c72e | |||
| a568420726 | |||
| 5faaa432de | |||
| f8f0efa256 | |||
| 413c2f8ea3 | |||
| a05322f734 | |||
| c740d8e69e | |||
| 578417bf68 | |||
| d8903b5bd7 | |||
| 87bac04297 | |||
| 3fb3e60768 | |||
| 74b96a4035 | |||
| 40a574c1e1 | |||
| c110e53871 | |||
| bf54c8b48b | |||
| a1346138b8 | |||
| 357774dc1b | |||
| bc7a06be63 | |||
| 2f3bcd4b10 | |||
| 7da808dafd | |||
| ff5273b720 | |||
| f8b2b091ef | |||
| 6eba275d79 | |||
| 7b8d93bd7a | |||
| 556e9ece7f | |||
| 50f1f32fe8 | |||
| 78aca03f7a | |||
| e844e3e0f9 | |||
| 542c687054 | |||
| faeea6f1a5 | |||
| 2c872c6ac6 | |||
| b2ed3a3c3d | |||
| 3a5115c86a | |||
| b333c10ac6 | |||
| 3fc8f85ed2 | |||
| 2426a3469e | |||
| e2ee6940ab | |||
| ed5c719ff7 | |||
| 2dfb51820b | |||
| c4d00b3af1 | |||
| 26bba2abfb | |||
| e0dbfc95ef | |||
| 654687b290 | |||
| df89601f5d | |||
| 1f1c4ef498 | |||
| 8aa10ce4ed | |||
| 72f173d5a7 | |||
| 3f09d77c91 | |||
| e634c7826c | |||
| 4645bf5228 | |||
| 1891401fcc | |||
| 79936cb7dd | |||
| 428a9d66c3 | |||
| 910a1c5538 | |||
| 76b6f7cfb8 | |||
| 8c75ba2a2d | |||
| eb0f2cb733 | |||
| 5773d144aa | |||
| e66c59052f | |||
| 7db9bd5ac8 | |||
| 05df8f5eb4 | |||
| 9fad534cc2 | |||
| c5a9265abe | |||
| c399a3d4ba | |||
| 598b7e8241 | |||
| a09a252024 | |||
| d16408c111 | |||
| 35ca2c2364 | |||
| 283df33be4 | |||
| c64e8bbe15 | |||
| f91c64d71e | |||
| 72c6763508 | |||
| beb0b09967 | |||
| 82c77e8d95 | |||
| effe54ab6e | |||
| 7cdfce9e78 | |||
| c2a038a580 | |||
| 21b3f31f6b | |||
| 9db1c35b80 | |||
| 28432fc061 | |||
| 365986de7b | |||
| 1a5ea7162b | |||
| 176e0e9513 | |||
| 9fa9af8899 | |||
| 17866191e1 | |||
| 8f92b6a017 | |||
| 937bdb5879 | |||
| 8ad1af7c05 | |||
| 8a92f00e3b | |||
| bb652d19e7 | |||
| 4404b67170 | |||
| 3a5aa3c79e | |||
| e2afaaaac2 | |||
| e1984adf3d | |||
| 317f768ab5 | |||
| 20cf4c7ead | |||
| 2d14369f78 | |||
| ef36724352 | |||
| f7df4c7adb | |||
| 43632a9f50 | |||
| 1e370e35f3 | |||
| 6427297c9e | |||
| 2b4cb226a1 | |||
| eee9b5df5b | |||
| 4fbeaab7eb | |||
| 804dfa8ee6 | |||
| 5d249109a0 | |||
| 994c5dad01 | |||
| 31847f6741 | |||
| 4eef6ff71d | |||
| 00ceb3cf50 | |||
| 48f93d7b98 | |||
| aac6406b9b | |||
| 851851f998 | |||
| 1e4d6d2177 | |||
| c1e33f35a6 | |||
| 228e3f02dd | |||
| 2987222270 | |||
| 363b02a889 | |||
| e99bc9742a | |||
| cd31397f53 | |||
| b2ee6c9604 | |||
| dd8d8afd55 | |||
| fd0a89b7e8 | |||
| 735e02497b | |||
| 89b7afd817 | |||
| a7ce9a61ce | |||
| 9891f02ba4 | |||
| 3b96dde9ec | |||
| 2032012f4c | |||
| 2144f96d93 | |||
| 5de6e7b75a | |||
| b0b98aa58e | |||
| a409168102 | |||
| 6d5d7e1535 | |||
| a465af7a93 | |||
| 7b3025c984 | |||
| e2597a43b1 | |||
| 2917dcbe3b | |||
| a6a5c2cbca | |||
| eb667bf6d3 | |||
| 304335ea65 | |||
| de6d9a42b2 | |||
| d859e671f9 | |||
| 29aac7e6e5 | |||
| 16c5912449 | |||
| 9aee05420c | |||
| 300134b720 | |||
| b42f7c1ee6 | |||
| 3c8d8261c5 | |||
| b85b23ba98 | |||
| ec5b0f56d6 | |||
| 05b8c3bd73 | |||
| d46c396d4a | |||
| 978c629a2f | |||
| a65f6752ba | |||
| 4b7821d289 | |||
| e815a87e7d | |||
| d17f7c6315 | |||
| 221a7800f4 | |||
| 1281836127 | |||
| b019a02d49 | |||
| 2b4292e890 | |||
| 0a70eff5fc | |||
| 9996cc243d | |||
| d7c351894c | |||
| 0269d121b0 | |||
| 3a597a9f61 | |||
| 543f0bc823 | |||
| 7b1ee73f2a | |||
| 4ce24e28db | |||
| 0b56b0e492 | |||
| 3354194a2f | |||
| c9c76d88cb | |||
| 141298ef6b | |||
| c54ad54ae8 | |||
| 0e608a0fdf | |||
| f83b5bd0f9 | |||
| 2d1ebf3806 | |||
| 60ed7f85b9 | |||
| edfa7b6cc1 | |||
| 09d374ee60 | |||
| 56560080c2 | |||
| a347f4affd | |||
| 4408a2124e | |||
| 6f92c5463a | |||
| c8a32a3c35 | |||
| b1cc1822e1 | |||
| bffc08df3a | |||
| d272ea161b | |||
| f7312b9f16 | |||
| 157a0177d9 | |||
| a5495be32b | |||
| ab6049f578 | |||
| 0f37f09199 | |||
| 4e8e8f0fed | |||
| c86be50084 | |||
| 84f08a3a1c | |||
| c8010af175 | |||
| 7cd76b2b63 | |||
| c8647160f3 | |||
| e5e4fc385c | |||
| 57f5f73554 | |||
| 38f13494a2 | |||
| 5008989f2e | |||
| 84f9815ebb | |||
| ac5e26ecda | |||
| 1432ea461c | |||
| ced0bbf2a9 | |||
| 6028b2c3b5 | |||
| ebbb84b3b5 | |||
| de251c5fdd | |||
| 112011f766 | |||
| 835b7895dc | |||
| 044bdc3ed9 | |||
| 4f7670e690 | |||
| 927488c5a9 | |||
| e3c0bc48ab | |||
| 2bc503a791 | |||
| afa16aafcc | |||
| ce0954fc61 | |||
| 34ce469784 | |||
| d900a50eaa | |||
| 4bba3359b4 | |||
| 54a5ac7099 | |||
| c087b37ab6 | |||
| 3c8155a2c4 | |||
| 1da5f5f443 | |||
| 9a6c7b2b3e | |||
| 1b1ecd9818 | |||
| 25d6a35722 | |||
| 1fb48c6a27 | |||
| 294702c330 | |||
| e2408b449c | |||
| 60deb2da8d | |||
| ce9156620f | |||
| b1e160b367 | |||
| 3206264895 | |||
| 3f121e3608 | |||
| 5ce07a047a | |||
| 9e6fd04749 | |||
| d006552755 | |||
| 3cc5c5271a | |||
| e379ff4799 | |||
| 450fd2f355 | |||
| 80bc8db0a9 | |||
| 41f125d4ca | |||
| fa42005ff8 | |||
| 94a3281cbe | |||
| d9b73bfd43 | |||
| 268a85c2ef | |||
| 510d5ace8f | |||
| 020b686d69 | |||
| 3959c0fcf6 | |||
| e6c3fd1e9a | |||
| 23002bf18d | |||
| 0de749a026 | |||
| 2f58a31d18 |
215 changed files with 6688 additions and 13700 deletions
4
.git-crypt/.gitattributes
vendored
Normal file
4
.git-crypt/.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Do not edit this file. To specify the files to encrypt, create your own
|
||||||
|
# .gitattributes file in the directory where your files are.
|
||||||
|
* !filter !diff
|
||||||
|
*.gpg binary
|
||||||
Binary file not shown.
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
secrets.gcrypt/** filter=git-crypt diff=git-crypt
|
||||||
BIN
.github/screenshots/desktop.png
vendored
Normal file
BIN
.github/screenshots/desktop.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
BIN
.github/screenshots/neovim.png
vendored
Normal file
BIN
.github/screenshots/neovim.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 183 KiB |
50
.github/workflows/autoupdate.yml
vendored
Normal file
50
.github/workflows/autoupdate.yml
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
name: Auto update
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.PAT_TOKEN }}
|
||||||
|
|
||||||
|
- name: Check for updates
|
||||||
|
id: check
|
||||||
|
run: |
|
||||||
|
local=$(cat flake.lock | jq ".nodes.nixpkgs.locked.rev")
|
||||||
|
remote=$(curl "https://api.github.com/repos/NixOS/nixpkgs/branches/nixos-unstable/commits?per_page=1" | jq ".commit.sha")
|
||||||
|
if [[ $local == $remote ]]; then
|
||||||
|
echo "skip=1" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "skip=0" >> "$GITHUB_OUTPUT"
|
||||||
|
branch=$(TZ='Australia/Melbourne' date '+staging_auto/%Y%m%d')
|
||||||
|
echo "branch_name=${branch}" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Install nix
|
||||||
|
if: steps.check.outputs.skip == 0
|
||||||
|
uses: cachix/install-nix-action@v31
|
||||||
|
|
||||||
|
- name: Configure git
|
||||||
|
if: steps.check.outputs.skip == 0
|
||||||
|
run: |
|
||||||
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
|
||||||
|
- name: Update
|
||||||
|
if: steps.check.outputs.skip == 0
|
||||||
|
run: ./update.sh
|
||||||
|
|
||||||
|
- name: Push
|
||||||
|
if: steps.check.outputs.skip == 0
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.PAT_TOKEN }}
|
||||||
|
branch: ${{ steps.check.outputs.branch_name }}
|
||||||
37
.github/workflows/cachix.yml
vendored
37
.github/workflows/cachix.yml
vendored
|
|
@ -1,35 +1,28 @@
|
||||||
name: Cachix build
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
build:
|
||||||
name: Build Linux
|
name: Build linux-lava for x86_64-linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
# credits to https://github.com/easimon/maximize-build-space/issues/45
|
||||||
- uses: cachix/install-nix-action@v13
|
- name: Remove unneeded packages to maximise build space
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
df -h
|
||||||
|
sudo rm -rf /usr/share/dotnet
|
||||||
|
sudo rm -rf /usr/local/lib/android
|
||||||
|
df -h
|
||||||
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-3.0pre20201007_5257a25/install
|
fetch-depth: 0
|
||||||
extra_nix_config: experimental-features = nix-command flakes
|
- uses: cachix/install-nix-action@v31
|
||||||
- uses: cachix/cachix-action@v10
|
- uses: cachix/cachix-action@v16
|
||||||
with:
|
with:
|
||||||
name: lava
|
name: lava
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
- run: nix build -L .#linux-lava
|
- run: nix build -L .#linux-lava
|
||||||
wine:
|
|
||||||
name: Build Wine
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2.3.4
|
|
||||||
- uses: cachix/install-nix-action@v13
|
|
||||||
with:
|
|
||||||
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-3.0pre20201007_5257a25/install
|
|
||||||
extra_nix_config: experimental-features = nix-command flakes
|
|
||||||
- uses: cachix/cachix-action@v10
|
|
||||||
with:
|
|
||||||
name: lava
|
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
||||||
- run: nix build -L .#wine-osu
|
|
||||||
|
|
|
||||||
31
.github/workflows/image.yml
vendored
Normal file
31
.github/workflows/image.yml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
name: Build images
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Build caramel-img
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: dbhi/qus/action@main
|
||||||
|
with:
|
||||||
|
targets: arm aarch64
|
||||||
|
- uses: cachix/install-nix-action@v17
|
||||||
|
with:
|
||||||
|
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.12.0pre20220930_89ca75c/install
|
||||||
|
extra_nix_config: |
|
||||||
|
extra-platforms = aarch64-linux arm-linux
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
- uses: cachix/cachix-action@v10
|
||||||
|
with:
|
||||||
|
name: lava
|
||||||
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
- run: nix build -L .#packages.aarch64-linux.caramel-img
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: caramel-sd-image
|
||||||
|
path: result/sd-image/*
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
result
|
||||||
31
README.md
Normal file
31
README.md
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
# flakes
|
||||||
|
My NixOS config!
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
## Usage
|
||||||
|
I recommend more that you only simply look at the modules as inspiration for your own config. Some of them
|
||||||
|
may or may not work on your machine if copied directly (but theoretically they should).
|
||||||
|
|
||||||
|
But if you insist, just copy-paste one of the hosts in `hosts/`, one of the users in `users/`, and modify them
|
||||||
|
to your liking. Open up `flake.nix`, add your new host config at the bottom, and then build it!
|
||||||
|
|
||||||
|
## Hosts
|
||||||
|
| Name | Description |
|
||||||
|
| ------- | ----------- |
|
||||||
|
| hyacinth | Main Desktop PC |
|
||||||
|
| anemone | Main Laptop |
|
||||||
|
| caramel | Raspberry Pi 400, stateless |
|
||||||
|
| dandelion | ARM OCI VPS, stateless |
|
||||||
|
|
||||||
|
## Users
|
||||||
|
| Name | Description |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| rin | Main user for general usage |
|
||||||
|
| hana | Lightweight user intended for inspecting stateless hosts |
|
||||||
|
|
||||||
|
## License
|
||||||
|
Licensed under CC0
|
||||||
|
|
||||||
|
Credit is appreciated but not necessary
|
||||||
47
containers/amethyst/configuration.nix
Normal file
47
containers/amethyst/configuration.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
{ lib, pkgs, ... }: {
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/transmission 755 transmission transmission"
|
||||||
|
"d /persist/transmission/.config/transmission-daemon 750 transmission transmission"
|
||||||
|
"d /persist/transmission/.incomplete 750 transmission transmission"
|
||||||
|
"d /persist/transmission/Downloads 755 transmission transmission"
|
||||||
|
"d /persist/transmission/watchdir 755 transmission transmission"
|
||||||
|
];
|
||||||
|
networking.wg-quick.interfaces.wg0 = {
|
||||||
|
configFile = "/persist/vpn.conf";
|
||||||
|
preUp = ''
|
||||||
|
# Try to access the DNS for up to 300s
|
||||||
|
for i in {1..60}; do
|
||||||
|
${pkgs.iputils}/bin/ping -c1 'google.com' && break
|
||||||
|
echo "Attempt $i: DNS still not available"
|
||||||
|
sleep 5s
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/258793
|
||||||
|
systemd.services.transmission.serviceConfig = {
|
||||||
|
BindReadOnlyPaths = lib.mkForce [ builtins.storeDir "/etc" ];
|
||||||
|
RootDirectoryStartOnly = lib.mkForce false;
|
||||||
|
RootDirectory = lib.mkForce "";
|
||||||
|
PrivateMounts = lib.mkForce false;
|
||||||
|
PrivateUsers = lib.mkForce false;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 9091 ];
|
||||||
|
services.transmission = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.transmission_4;
|
||||||
|
downloadDirPermissions = "775";
|
||||||
|
openFirewall = true;
|
||||||
|
home = "/persist/transmission";
|
||||||
|
settings = {
|
||||||
|
ratio-limit-enabled = true;
|
||||||
|
rpc-bind-address = "0.0.0.0";
|
||||||
|
rpc-enabled = true;
|
||||||
|
rpc-port = 9091;
|
||||||
|
rpc-host-whitelist-enabled = false;
|
||||||
|
rpc-whitelist-enabled = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/amethyst/flake.lock
generated
Normal file
27
containers/amethyst/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
51
containers/amethyst/flake.nix
Normal file
51
containers/amethyst/flake.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }: {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [ ./configuration.nix ];
|
||||||
|
};
|
||||||
|
nixosModule = { ... }:
|
||||||
|
let
|
||||||
|
name = "amethyst";
|
||||||
|
fqdn = "amethyst.lava.moe";
|
||||||
|
subnet = "1";
|
||||||
|
in {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
#locations."/".proxyPass = "http://[fd0d:1::${subnet}:2]:9091";
|
||||||
|
locations."/".proxyPass = "http://10.30.${subnet}.2:9091";
|
||||||
|
listenAddresses = [ "10.0.0.1" "[fd0d::1]" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "10.30.${subnet}.1";
|
||||||
|
localAddress = "10.30.${subnet}.2";
|
||||||
|
hostAddress6 = "fd0d:1::${subnet}:1";
|
||||||
|
localAddress6 = "fd0d:1::${subnet}:2";
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = [ ./configuration.nix ]; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
23
containers/beryllium/configuration.nix
Normal file
23
containers/beryllium/configuration.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
fileSystems."/var/lib/private" = {
|
||||||
|
device = "/persist";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 6167 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 6167 ];
|
||||||
|
# TODO: this should be generically set
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ "8.8.8.8" ];
|
||||||
|
|
||||||
|
services.matrix-continuwuity = {
|
||||||
|
enable = true;
|
||||||
|
settings.global = {
|
||||||
|
# TODO: link this with outer container's address
|
||||||
|
address = [ "10.30.2.2" ];
|
||||||
|
server_name = "lava.moe";
|
||||||
|
rocksdb_recovery_mode = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/beryllium/flake.lock
generated
Normal file
27
containers/beryllium/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
69
containers/beryllium/flake.nix
Normal file
69
containers/beryllium/flake.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }: {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [ ./configuration.nix ];
|
||||||
|
};
|
||||||
|
nixosModule = { ... }:
|
||||||
|
let
|
||||||
|
name = "beryllium";
|
||||||
|
fqdn = "beryllium.lava.moe";
|
||||||
|
subnet = "2";
|
||||||
|
in {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".extraConfig = "return 302 'https://lava.moe';";
|
||||||
|
locations."/_matrix".proxyPass = "http://10.30.${subnet}.2:6167";
|
||||||
|
locations."/_conduwuit".proxyPass = "http://10.30.${subnet}.2:6167";
|
||||||
|
locations."/_continuwuity".proxyPass = "http://10.30.${subnet}.2:6167";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."lava.moe" = {
|
||||||
|
locations."= /.well-known/matrix/server".extraConfig =
|
||||||
|
let
|
||||||
|
server = { "m.server" = "${fqdn}: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://${fqdn}"; };
|
||||||
|
# "m.identity_server" = { "base_url" = "https://vector.im"; };
|
||||||
|
};
|
||||||
|
in ''
|
||||||
|
add_header Content-Type application/json;
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
return 200 '${builtins.toJSON client}';
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "10.30.${subnet}.1";
|
||||||
|
localAddress = "10.30.${subnet}.2";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = [ ./configuration.nix ]; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
53
containers/citrine/configuration.nix
Normal file
53
containers/citrine/configuration.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{ config, fqdn, lib, ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
networking.firewall.allowedTCPPorts = [ 22 3000 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 22 3000 ];
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"L+ /persist/forgejo/custom/templates - - - - ${./templates}"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
settings = {
|
||||||
|
DEFAULT.APP_NAME = "cilly's botanical laboratory";
|
||||||
|
server = {
|
||||||
|
DOMAIN = fqdn;
|
||||||
|
ROOT_URL = "https://${fqdn}/";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
START_SSH_SERVER = true;
|
||||||
|
BUILTIN_SSH_SERVER_USER = "git";
|
||||||
|
SSH_DOMAIN = "git.lava.moe";
|
||||||
|
SSH_SERVER_KEY_EXCHANGES = "mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256";
|
||||||
|
};
|
||||||
|
ui = lib.mkForce {
|
||||||
|
DEFAULT_THEME = "catppuccin-maroon-auto";
|
||||||
|
THEMES = lib.strings.concatMapStringsSep "," (x: "${x}-auto") [
|
||||||
|
"catppuccin-pink"
|
||||||
|
"catppuccin-maroon"
|
||||||
|
"catppuccin-flamingo"
|
||||||
|
"catppuccin-rosewater"
|
||||||
|
"forgejo"
|
||||||
|
"gitea"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
api.ENABLE_SWAGGER = false;
|
||||||
|
other.SHOW_FOOTER_TEMPLATE_LOAD_TIME = false;
|
||||||
|
repository.ENABLE_PUSH_CREATE_USER = true;
|
||||||
|
repository.ENABLE_PUSH_CREATE_ORG = true;
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
stateDir = "/persist/forgejo";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.forgejo.serviceConfig = {
|
||||||
|
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
|
||||||
|
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
|
||||||
|
PrivateUsers = lib.mkForce false;
|
||||||
|
};
|
||||||
|
|
||||||
|
catppuccin.forgejo.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [ config.services.forgejo.package ];
|
||||||
|
}
|
||||||
62
containers/citrine/flake.lock
generated
Normal file
62
containers/citrine/flake.lock
generated
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"catppuccin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773403535,
|
||||||
|
"narHash": "sha256-47MZaFrHxNO8tVUAmtVnerXUw2WWVluBOiU9MulN/yM=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "nix",
|
||||||
|
"rev": "d45b5665cc638bad1b794350de02f4dd41b0bb47",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773122722,
|
||||||
|
"narHash": "sha256-FIqHByVqxCprNjor1NqF80F2QQoiiyqanNNefdlvOg4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "62dc67aa6a52b4364dd75994ec00b51fbf474e50",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"catppuccin": "catppuccin",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
68
containers/citrine/flake.nix
Normal file
68
containers/citrine/flake.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
catppuccin.url = "github:catppuccin/nix";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, catppuccin, ... }:
|
||||||
|
let
|
||||||
|
name = "citrine";
|
||||||
|
fqdn = "lab.lava.moe";
|
||||||
|
subnetId = "3";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:1::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
subnet4 = x: "10.30.${subnetId}.${toString x}";
|
||||||
|
host4 = subnet4 1;
|
||||||
|
client4 = subnet4 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
catppuccin.nixosModules.catppuccin
|
||||||
|
{
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ host ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { ... }: {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".proxyPass = "http://[${client}]:3000";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = host4;
|
||||||
|
localAddress = client4;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
containers/citrine/templates/base/footer_content.tmpl
Normal file
31
containers/citrine/templates/base/footer_content.tmpl
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
<footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}">
|
||||||
|
<div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}">
|
||||||
|
{{if ShowFooterPoweredBy}}
|
||||||
|
<a target="_blank" rel="noopener noreferrer" href="https://forgejo.org">Forgejo</a>
|
||||||
|
{{end}}
|
||||||
|
{{if (or .ShowFooterVersion .PageIsAdmin)}}
|
||||||
|
{{if .IsAdmin}}
|
||||||
|
<a href="{{AppSubUrl}}/admin/config">{{AppVerNoMetadata}}</a>
|
||||||
|
{{else}}
|
||||||
|
{{AppVerNoMetadata}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
|
||||||
|
{{ctx.Locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
|
||||||
|
{{ctx.Locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="right-links" role="group" aria-label="{{ctx.Locale.Tr "aria.footer.links"}}">
|
||||||
|
<div class="ui dropdown upward language">
|
||||||
|
<span class="flex-text-inline">{{svg "octicon-globe" 14}} {{ctx.Locale.LangName}}</span>
|
||||||
|
<div class="menu language-menu">
|
||||||
|
{{range .AllLangs}}
|
||||||
|
<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq ctx.Locale.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a href="{{AssetUrlPrefix}}/licenses.txt">{{ctx.Locale.Tr "licenses"}}</a>
|
||||||
|
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
|
||||||
|
{{template "custom/extra_links_footer" .}}
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
19
containers/citrine/templates/home.tmpl
Normal file
19
containers/citrine/templates/home.tmpl
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{{template "base/head" .}}
|
||||||
|
{{if not .IsSigned}}
|
||||||
|
<script>window.location.href = "/explore/repos";</script>
|
||||||
|
{{end}}
|
||||||
|
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}" class="page-content home">
|
||||||
|
<div class="tw-mb-8 tw-px-8">
|
||||||
|
<div class="center">
|
||||||
|
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
|
||||||
|
<div class="hero">
|
||||||
|
<h1 class="ui icon header title">
|
||||||
|
{{AppDisplayName}}
|
||||||
|
</h1>
|
||||||
|
<h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "home_forgejo" .}}
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
||||||
22
containers/diamond/configuration.nix
Normal file
22
containers/diamond/configuration.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ fqdn, ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/vaultwarden 755 vaultwarden vaultwarden"
|
||||||
|
];
|
||||||
|
fileSystems."/var/lib/vaultwarden" = {
|
||||||
|
device = "/persist/vaultwarden";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8000 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 8000 ];
|
||||||
|
|
||||||
|
services.vaultwarden = {
|
||||||
|
enable = true;
|
||||||
|
domain = fqdn;
|
||||||
|
config = {
|
||||||
|
DOMAIN = "https://${fqdn}";
|
||||||
|
ROCKET_ADDRESS = "::";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/diamond/flake.lock
generated
Normal file
27
containers/diamond/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
51
containers/diamond/flake.nix
Normal file
51
containers/diamond/flake.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
name = "diamond";
|
||||||
|
fqdn = "astransia.lava.moe";
|
||||||
|
subnetId = "4";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:1::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { ... }: {
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".proxyPass = "http://[${client}]:8000";
|
||||||
|
listenAddresses = [ "10.0.0.1" "[fd0d::1]" "100.67.1.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
23
containers/emerald/configuration.nix
Normal file
23
containers/emerald/configuration.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ fqdn, shareFqdn, ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/navidrome 755 navidrome navidrome"
|
||||||
|
];
|
||||||
|
networking.firewall.allowedTCPPorts = [ 4533 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 4533 ];
|
||||||
|
|
||||||
|
services.navidrome = {
|
||||||
|
enable = true;
|
||||||
|
environmentFile = "/binds/navidrome_env";
|
||||||
|
settings = {
|
||||||
|
Port = 4533;
|
||||||
|
Address = "[::]";
|
||||||
|
BaseUrl = "https://${fqdn}/";
|
||||||
|
ShareURL = "https://${shareFqdn}";
|
||||||
|
EnableSharing = true;
|
||||||
|
DataFolder = "/persist/navidrome";
|
||||||
|
MusicFolder = "/binds/music/main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.services.navidrome.serviceConfig.BindReadOnlyPaths = ["/binds/music"];
|
||||||
|
}
|
||||||
27
containers/emerald/flake.lock
generated
Normal file
27
containers/emerald/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
78
containers/emerald/flake.nix
Normal file
78
containers/emerald/flake.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
name = "emerald";
|
||||||
|
fqdn = "navia.lava.moe";
|
||||||
|
shareFqdn = "muse.lava.moe";
|
||||||
|
subnetId = "5";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:2::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
subnet4 = x: "10.32.${subnetId}.${toString x}";
|
||||||
|
host4 = subnet4 1;
|
||||||
|
client4 = subnet4 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
{
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ host ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { config, ... }: {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".proxyPass = "http://[${client}]:4533";
|
||||||
|
listenAddresses = [ "100.67.2.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = host4;
|
||||||
|
localAddress = client4;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn shareFqdn; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
bindMounts."music" = {
|
||||||
|
hostPath = "/flower/media/music";
|
||||||
|
mountPoint = "/binds/music";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
bindMounts."navidrome_env" = {
|
||||||
|
hostPath = config.age.secrets.navidrome_env.path;
|
||||||
|
mountPoint = "/binds/navidrome_env";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
22
containers/fluorite/configuration.nix
Normal file
22
containers/fluorite/configuration.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/slskd/Downloads 755 slskd slskd"
|
||||||
|
];
|
||||||
|
fileSystems."/var/lib/slskd" = {
|
||||||
|
device = "/persist/slskd";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 5030 50300 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 5030 50300 ];
|
||||||
|
|
||||||
|
services.slskd = {
|
||||||
|
enable = true;
|
||||||
|
domain = null;
|
||||||
|
environmentFile = "/binds/slskd_env";
|
||||||
|
settings = {
|
||||||
|
shares.directories = [ "/binds/music/" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/fluorite/flake.lock
generated
Normal file
27
containers/fluorite/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
89
containers/fluorite/flake.nix
Normal file
89
containers/fluorite/flake.nix
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
name = "fluorite";
|
||||||
|
fqdn = "fluorite.lava.moe";
|
||||||
|
subnetId = "6";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:1::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
subnet4 = x: "10.30.${subnetId}.${toString x}";
|
||||||
|
host4 = subnet4 1;
|
||||||
|
client4 = subnet4 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
{
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ host ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { config, ... }: {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 50300 ];
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".proxyPass = "http://[${client}]:5030";
|
||||||
|
listenAddresses = [ "10.0.0.1" "[fd0d::1]" "100.67.1.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/containers/${name} 755 root users"
|
||||||
|
"d /persist/media/music 075 nobody users"
|
||||||
|
];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = host4;
|
||||||
|
localAddress = client4;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn; };
|
||||||
|
|
||||||
|
forwardPorts = [
|
||||||
|
{
|
||||||
|
containerPort = 50300;
|
||||||
|
hostPort = 50300;
|
||||||
|
protocol = "tcp";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
bindMounts."music" = {
|
||||||
|
hostPath = "/persist/media/music";
|
||||||
|
mountPoint = "/binds/music";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
bindMounts."slskd_env" = {
|
||||||
|
hostPath = config.age.secrets.slskd_env.path;
|
||||||
|
mountPoint = "/binds/slskd_env";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
36
containers/garnet/configuration.nix
Normal file
36
containers/garnet/configuration.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
fileSystems."/var/lib/opencloud" = {
|
||||||
|
device = "/flower/data";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
fileSystems."/etc/opencloud" = {
|
||||||
|
device = "/persist/cfg";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
# TODO: hardcoded address
|
||||||
|
networking.extraHosts = ''
|
||||||
|
100.67.2.1 cloud.lava.moe
|
||||||
|
'';
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 9200 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 9200 ];
|
||||||
|
|
||||||
|
environment.etc."opencloud-admin-pass".text = ''
|
||||||
|
IDM_ADMIN_PASSWORD=supersillysecure
|
||||||
|
'';
|
||||||
|
services.opencloud = {
|
||||||
|
enable = true;
|
||||||
|
url = "https://cloud.lava.moe";
|
||||||
|
address = "10.30.7.2";
|
||||||
|
port = 9200;
|
||||||
|
environment = {
|
||||||
|
PROXY_TLS = "false";
|
||||||
|
IDP_ACCESS_TOKEN_EXPIRATION = "2592000";
|
||||||
|
IDP_ID_TOKEN_EXPIRATION = "2592000";
|
||||||
|
};
|
||||||
|
environmentFile = "/etc/opencloud-admin-pass";
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/garnet/flake.lock
generated
Normal file
27
containers/garnet/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1779560665,
|
||||||
|
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
84
containers/garnet/flake.nix
Normal file
84
containers/garnet/flake.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
name = "garnet";
|
||||||
|
fqdn = "cloud.lava.moe";
|
||||||
|
subnetId = "7";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:1::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
subnet4 = x: "10.30.${subnetId}.${toString x}";
|
||||||
|
host4 = subnet4 1;
|
||||||
|
client4 = subnet4 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
{
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ host ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { config, ... }: {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${client4}:9200";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_read_timeout 3600s;
|
||||||
|
proxy_send_timeout 3600s;
|
||||||
|
keepalive_requests 100000;
|
||||||
|
keepalive_timeout 5m;
|
||||||
|
http2_max_concurrent_streams 512;
|
||||||
|
'';
|
||||||
|
# TODO: hardcoded address
|
||||||
|
listenAddresses = [ "100.67.2.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/containers/${name} 755 root users"
|
||||||
|
];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = host4;
|
||||||
|
localAddress = client4;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
bindMounts."content" = {
|
||||||
|
hostPath = "/flower/opencloud";
|
||||||
|
mountPoint = "/flower";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
1220
flake.lock
generated
1220
flake.lock
generated
File diff suppressed because it is too large
Load diff
129
flake.nix
129
flake.nix
|
|
@ -1,64 +1,101 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; };
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
home-manager = { url = "github:LavaDesu/home-manager/xsession-profilePath"; };
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
secrets = { url = "github:LavaDesu/flakes-secrets"; };
|
|
||||||
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||||
|
catppuccin.url = "github:catppuccin/nix/8eada392fd6571a747e1c5fc358dd61c14c8704e";
|
||||||
|
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
catppuccin-palette = { url = "github:catppuccin/palette"; flake = false; };
|
||||||
|
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
|
||||||
|
neovim-nightly.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||||
|
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||||
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
||||||
|
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# services
|
||||||
|
pastel.url = "github:cillynder/pastel";
|
||||||
|
stevenblack-hosts = { url = "github:StevenBlack/hosts"; flake = false; };
|
||||||
|
website = { url = "github:cillynder/lavadesu.github.io/master"; flake = false; };
|
||||||
|
|
||||||
|
# zsh plugins
|
||||||
|
zsh-abbr = { url = "git+https://github.com/olets/zsh-abbr?submodules=1"; flake = false; };
|
||||||
|
zsh-history-substring-search = { url = "github:zsh-users/zsh-history-substring-search"; flake = false; };
|
||||||
|
fast-syntax-highlighting = { url = "github:zdharma-continuum/fast-syntax-highlighting"; flake = false; };
|
||||||
|
pure = { url = "github:sindresorhus/pure"; flake = false; };
|
||||||
|
|
||||||
|
# overlays
|
||||||
|
linux-tkg = { url = "github:Frogging-Family/linux-tkg"; flake = false; };
|
||||||
|
nvim-treesitter = { url = "github:nvim-treesitter/nvim-treesitter"; flake = false; };
|
||||||
|
spotify-adblock = { url = "github:abba23/spotify-adblock"; flake = false; };
|
||||||
|
tree-sitter-jsonc = { url = "gitlab:WhyNotHugo/tree-sitter-jsonc"; flake = false; };
|
||||||
|
wine-discord-ipc-bridge = { url = "github:0e4ef622/wine-discord-ipc-bridge"; flake = false; };
|
||||||
|
|
||||||
|
# containers
|
||||||
|
c-amethyst.url = "path:./containers/amethyst";
|
||||||
|
c-beryllium.url = "path:./containers/beryllium";
|
||||||
|
c-citrine.url = "path:./containers/citrine";
|
||||||
|
c-diamond.url = "path:./containers/diamond";
|
||||||
|
c-emerald.url = "path:./containers/emerald";
|
||||||
|
c-fluorite.url = "path:./containers/fluorite";
|
||||||
|
c-garnet.url = "path:./containers/garnet";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: with inputs;
|
outputs = { self, agenix, catppuccin, nixpkgs, ... } @ inputs:
|
||||||
let
|
let
|
||||||
revCount = "297098";
|
overlays = (import ./overlays)
|
||||||
base = { config, ... }: {
|
++ [(final: prev: {
|
||||||
system = {
|
me = prev.callPackage ./packages { inherit inputs; } // { inherit inputs; };
|
||||||
configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
})];
|
||||||
nixos = rec {
|
|
||||||
version = config.system.nixos.release + versionSuffix;
|
patchOverlaysWithLinuxLava = nixpkgs: arch: ([(self: super: {
|
||||||
versionSuffix = ".${nixpkgs.lib.substring 0 8 (nixpkgs.lastModifiedDate or nixpkgs.lastModified or "19700101")}.r${revCount}-${nixpkgs.lib.substring 0 11 (nixpkgs.rev or "dirty")}";
|
linuxLavaNixpkgs = import nixpkgs {
|
||||||
|
overlays = [ (import ./overlays/linux-lava.nix) ] ++ overlays;
|
||||||
|
system = arch;
|
||||||
};
|
};
|
||||||
|
})] ++ overlays);
|
||||||
|
|
||||||
|
mkSystem =
|
||||||
|
if !(self ? rev) then throw "Dirty git tree detected." else
|
||||||
|
nixpkgs: name: arch: extraModules: nixpkgs.lib.nixosSystem {
|
||||||
|
system = arch;
|
||||||
|
modules = [
|
||||||
|
({
|
||||||
|
nixpkgs.overlays = patchOverlaysWithLinuxLava nixpkgs arch;
|
||||||
|
})
|
||||||
|
agenix.nixosModules.age
|
||||||
|
catppuccin.nixosModules.catppuccin
|
||||||
|
(./hosts + "/${name}")
|
||||||
|
] ++ extraModules;
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
modules = import ./modules { lib = nixpkgs.lib; };
|
||||||
|
gcSecrets = builtins.fromJSON (builtins.readFile "${self}/secrets.gcrypt/shared.json");
|
||||||
};
|
};
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
|
||||||
nixpkgs.overlays = builtins.attrValues overlays;
|
|
||||||
};
|
|
||||||
hm-base = {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
};
|
|
||||||
overlays = {
|
|
||||||
discord = import ./overlays/discord.nix;
|
|
||||||
linux = import ./overlays/linux.nix;
|
|
||||||
material-icons = import ./overlays/material-icons.nix;
|
|
||||||
mps-youtube = import ./overlays/mps-youtube.nix;
|
|
||||||
picom = import ./overlays/picom.nix;
|
|
||||||
polybar = import ./overlays/polybar.nix;
|
|
||||||
transcrypt = import ./overlays/transcrypt.nix;
|
|
||||||
winetricks = import ./overlays/winetricks.nix;
|
|
||||||
wine-osu = import ./overlays/wine-osu.nix;
|
|
||||||
xinit = import ./overlays/xinit.nix;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations."winter" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations."alyssum" = mkSystem nixpkgs "alyssum" "x86_64-linux" [];
|
||||||
system = "x86_64-linux";
|
nixosConfigurations."anemone" = mkSystem nixpkgs "anemone" "x86_64-linux" [];
|
||||||
modules = [
|
nixosConfigurations."dandelion" = mkSystem nixpkgs "dandelion" "aarch64-linux" [];
|
||||||
base
|
nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" [];
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
hm-base
|
|
||||||
./hosts/winter
|
|
||||||
secrets.nixosModules.winter
|
|
||||||
];
|
|
||||||
specialArgs = { inherit overlays; };
|
|
||||||
};
|
|
||||||
|
|
||||||
packages.x86_64-linux =
|
packages."x86_64-linux" =
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs rec {
|
||||||
overlays = builtins.attrValues overlays;
|
overlays = patchOverlaysWithLinuxLava nixpkgs system;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
inherit (pkgs) linux-lava wine-osu;
|
{
|
||||||
|
inherit (pkgs.me) linux-lava spotify-adblock;
|
||||||
|
linux-lava-ccache = pkgs.me.linux-lava.override { useCcache = true; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
hosts/alyssum/default.nix
Normal file
45
hosts/alyssum/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{ inputs, lib, modules, modulesPath, ... }: {
|
||||||
|
networking.hostName = "alyssum";
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
|
age.secrets = {
|
||||||
|
acme_dns.file = ../../secrets/acme_dns.age;
|
||||||
|
passwd.file = ../../secrets/passwd.age;
|
||||||
|
navidrome_env.file = ../../secrets/navidrome_env.age;
|
||||||
|
wpa_conf = {
|
||||||
|
file = ../../secrets/wpa_conf.age;
|
||||||
|
path = "/etc/wpa_supplicant/imperative.conf";
|
||||||
|
symlink = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = with modules.system; [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
base
|
||||||
|
kernel
|
||||||
|
nix-stable
|
||||||
|
packages
|
||||||
|
security
|
||||||
|
tailscale
|
||||||
|
|
||||||
|
modules.services.nginx
|
||||||
|
modules.services.syncthing
|
||||||
|
|
||||||
|
inputs.c-emerald.nixosModule
|
||||||
|
inputs.c-garnet.nixosModule
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
./home.syncthing.nix
|
||||||
|
./samba.nix
|
||||||
|
|
||||||
|
../../users/hana
|
||||||
|
];
|
||||||
|
|
||||||
|
me.environment = "headless";
|
||||||
|
services.syncthing.user = lib.mkForce "hana";
|
||||||
|
}
|
||||||
35
hosts/alyssum/filesystem.nix
Normal file
35
hosts/alyssum/filesystem.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
bind = src: {
|
||||||
|
depends = [ "/nix" ];
|
||||||
|
device = src;
|
||||||
|
fsType = "none";
|
||||||
|
neededForBoot = true;
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
mkLabelMount = label: type: {
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
fsType = type;
|
||||||
|
options = [ "defaults" "relatime" ];
|
||||||
|
};
|
||||||
|
mkBtrfsMount = name: subvol: atime: mkLabelMount name "btrfs" // {
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
|
||||||
|
};
|
||||||
|
submount = mkBtrfsMount "alyssum";
|
||||||
|
in {
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "rootfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=8G" "mode=755" ];
|
||||||
|
};
|
||||||
|
"/boot" = mkLabelMount "stem" "vfat";
|
||||||
|
|
||||||
|
"/flower" = mkBtrfsMount "myosotis" "/@" true;
|
||||||
|
"/nix" = submount "/@/nix" false;
|
||||||
|
"/persist" = (submount "/@/persist" true) // { neededForBoot = true; };
|
||||||
|
"/persist/.snapshots" = submount "/snap/persist" false;
|
||||||
|
"/var/log/journal" = bind "/persist/journal";
|
||||||
|
};
|
||||||
|
}
|
||||||
39
hosts/alyssum/home.syncthing.nix
Normal file
39
hosts/alyssum/home.syncthing.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
configOn = user: port: {
|
||||||
|
me.binds."/home/${user}/.config/syncthing" = "${user}/syncthing/config";
|
||||||
|
me.binds."/home/${user}/.local/state/syncthing" = "${user}/syncthing/state";
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /flower/syncthing/${user} 700 ${user} users" ];
|
||||||
|
|
||||||
|
users.users.${user} = {
|
||||||
|
hashedPasswordFile = config.age.secrets.passwd.path;
|
||||||
|
isNormalUser = true;
|
||||||
|
linger = true;
|
||||||
|
};
|
||||||
|
home-manager.users.${user} = { ... }: {
|
||||||
|
home = {
|
||||||
|
username = "${user}";
|
||||||
|
homeDirectory = "/home/${user}";
|
||||||
|
stateVersion = "26.05";
|
||||||
|
};
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
guiAddress = "[::]:${toString port}";
|
||||||
|
overrideDevices = false;
|
||||||
|
overrideFolders = false;
|
||||||
|
settings = {
|
||||||
|
options.listenAddresses = [
|
||||||
|
"tcp://0.0.0.0:2${toString port}"
|
||||||
|
"quic://0.0.0.0:2${toString port}"
|
||||||
|
"dynamic+https://relays.syncthing.net/endpoint"
|
||||||
|
];
|
||||||
|
defaults.folder.path = "/flower/syncthing/${user}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in lib.mkMerge [
|
||||||
|
(configOn "kujira" 8385)
|
||||||
|
(configOn "cilly" 8386)
|
||||||
|
]
|
||||||
12
hosts/alyssum/kernel.nix
Normal file
12
hosts/alyssum/kernel.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
|
||||||
|
initrd.kernelModules = [ ];
|
||||||
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
};
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
}
|
||||||
15
hosts/alyssum/networking.nix
Normal file
15
hosts/alyssum/networking.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
networking = {
|
||||||
|
useDHCP = true;
|
||||||
|
wireless.enable = true;
|
||||||
|
|
||||||
|
interfaces.wlp1s0.useDHCP = false;
|
||||||
|
interfaces.wlp1s0.ipv4.addresses = [{
|
||||||
|
address = "192.168.1.167";
|
||||||
|
prefixLength = 24;
|
||||||
|
}];
|
||||||
|
|
||||||
|
defaultGateway = "192.168.1.1";
|
||||||
|
nameservers = [ "8.8.8.8" "8.8.4.4" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
14
hosts/alyssum/packages.nix
Normal file
14
hosts/alyssum/packages.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
htop
|
||||||
|
jq
|
||||||
|
neovim
|
||||||
|
rsync
|
||||||
|
sshfs
|
||||||
|
wget
|
||||||
|
|
||||||
|
kitty.terminfo
|
||||||
|
];
|
||||||
|
environment.variables.EDITOR = "nvim";
|
||||||
|
}
|
||||||
84
hosts/alyssum/samba.nix
Normal file
84
hosts/alyssum/samba.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
configOn = user: let
|
||||||
|
passwd_fname = "passwd_smb${user}";
|
||||||
|
in {
|
||||||
|
age.secrets.${passwd_fname}.file = ../../secrets/${passwd_fname}.age;
|
||||||
|
me.binds."/flower/smb/${user}/music" = "/flower/media/music/${user}";
|
||||||
|
me.binds."/flower/smb/${user}/syncthing" = "/flower/syncthing/${user}";
|
||||||
|
|
||||||
|
users.users.${user} = {
|
||||||
|
hashedPasswordFile = config.age.secrets.passwd.path;
|
||||||
|
isNormalUser = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.activationScripts = {
|
||||||
|
init_smbpasswd.text = let
|
||||||
|
smbpasswd = "${config.services.samba.package}/bin/smbpasswd";
|
||||||
|
in ''
|
||||||
|
printf "$(cat ${config.age.secrets.${passwd_fname}.path})\n$(cat ${config.age.secrets.${passwd_fname}.path})\n" | ${smbpasswd} -sa ${user}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
services.samba.settings."${user}" = {
|
||||||
|
"path" = "/flower/smb/${user}";
|
||||||
|
"browseable" = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "no";
|
||||||
|
"create mask" = "0644";
|
||||||
|
"directory mask" = "0755";
|
||||||
|
"force user" = user;
|
||||||
|
"force group" = "users";
|
||||||
|
"valid users" = user;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in lib.mkMerge [
|
||||||
|
(configOn "cilly")
|
||||||
|
(configOn "kujira")
|
||||||
|
{
|
||||||
|
me.binds."/flower/smb/kujira/opencloud" = "/flower/opencloud/data/storage/users/users/a8e29fc0-673c-4c67-be00-2442904acb43";
|
||||||
|
|
||||||
|
networking.firewall.allowPing = true;
|
||||||
|
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.samba4Full;
|
||||||
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
"server smb encrypt" = "required";
|
||||||
|
"workgroup" = "WORKGROUP";
|
||||||
|
"server string" = "smbnix";
|
||||||
|
"netbios name" = "smbnix";
|
||||||
|
"security" = "user";
|
||||||
|
"hosts allow" = "100.64.0.0/10 127.0.0.1 alyssum localhost";
|
||||||
|
"hosts deny" = "0.0.0.0/0";
|
||||||
|
"guest account" = "nobody";
|
||||||
|
"map to guest" = "bad user";
|
||||||
|
};
|
||||||
|
"public" = {
|
||||||
|
"path" = "/flower/smb/public";
|
||||||
|
"browseable" = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "yes";
|
||||||
|
"create mask" = "0644";
|
||||||
|
"directory mask" = "0755";
|
||||||
|
"force user" = "hana";
|
||||||
|
"force group" = "users";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.samba-wsdd = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
publish.enable = true;
|
||||||
|
publish.userServices = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
60
hosts/anemone/default.nix
Normal file
60
hosts/anemone/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
{ config, inputs, modules, overlays, pkgs, ... }: {
|
||||||
|
networking.hostName = "anemone";
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
|
nixpkgs.overlays = [ inputs.neovim-nightly.overlays.default ];
|
||||||
|
age.secrets = {
|
||||||
|
wg_anemone.file = ../../secrets/wg_anemone.age;
|
||||||
|
passwd.file = ../../secrets/passwd.age;
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = with modules.system; [
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
audio
|
||||||
|
base
|
||||||
|
bluetooth
|
||||||
|
ccache
|
||||||
|
corectrl
|
||||||
|
docker
|
||||||
|
flatpak
|
||||||
|
greetd
|
||||||
|
gui
|
||||||
|
input
|
||||||
|
kernel
|
||||||
|
nix
|
||||||
|
packages
|
||||||
|
printing
|
||||||
|
security
|
||||||
|
snapper
|
||||||
|
tailscale
|
||||||
|
wireguard
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
|
||||||
|
../../users/rin
|
||||||
|
|
||||||
|
modules.services.syncthing
|
||||||
|
];
|
||||||
|
|
||||||
|
me = {
|
||||||
|
environment = "laptop";
|
||||||
|
batteryDevice = "BATT";
|
||||||
|
kbBacklightDevice = "asus::kbd_backlight";
|
||||||
|
hasFingerprint = true;
|
||||||
|
hidpi = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.wireshark = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.wireshark;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.fprintd.enable = true;
|
||||||
|
services.tlp.enable = true;
|
||||||
|
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
}
|
||||||
36
hosts/anemone/filesystem.nix
Normal file
36
hosts/anemone/filesystem.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
mkLabelMount = label: type: lazy: {
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
fsType = type;
|
||||||
|
options = [ "defaults" "relatime" ] ++ lib.optionals lazy [ "nofail" ];
|
||||||
|
};
|
||||||
|
mkBtrfsMount = name: subvol: atime: mkLabelMount name "btrfs" false // {
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
|
||||||
|
};
|
||||||
|
submount = mkBtrfsMount "Anemone";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "rootfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=8G" "mode=755" ];
|
||||||
|
};
|
||||||
|
"/boot" = mkLabelMount "SYSTEM" "vfat" true;
|
||||||
|
|
||||||
|
"/mnt/butter" = submount "/" true;
|
||||||
|
"/nix" = submount "/current/snow" false;
|
||||||
|
"/home" = submount "/current/home" true;
|
||||||
|
"/home/.snapshots" = submount "/snapshot/home" false;
|
||||||
|
"/root" = submount "/current/root" false;
|
||||||
|
"/var" = submount "/current/var" false;
|
||||||
|
"/persist" = {
|
||||||
|
depends = [ "/var" ];
|
||||||
|
device = "/var/persist";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
62
hosts/anemone/kernel.nix
Normal file
62
hosts/anemone/kernel.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
boot = {
|
||||||
|
consoleLogLevel = 0;
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
systemd.enable = true;
|
||||||
|
verbose = false;
|
||||||
|
};
|
||||||
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
kernelPackages = lib.mkForce (pkgs.linuxPackagesFor pkgs.me.linux-lava);
|
||||||
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"console=tty2"
|
||||||
|
"systemd.show_status=0"
|
||||||
|
"rd.systemd.show_status=0"
|
||||||
|
"rd.udev.log_level=3"
|
||||||
|
"udev.log_level=3"
|
||||||
|
"udev.log_priority=3"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# swapDevices = [{
|
||||||
|
# device = "/persist/swapfile";
|
||||||
|
# size = 16 * 1024;
|
||||||
|
# }];
|
||||||
|
#
|
||||||
|
# systemd.sleep.extraConfig = ''
|
||||||
|
# HibernateMode=shutdown
|
||||||
|
# '';
|
||||||
|
/*
|
||||||
|
services.logind.lidSwitch = "suspend-then-hibernate";
|
||||||
|
systemd.sleep.extraConfig = ''
|
||||||
|
HibernateDelaySec=14400
|
||||||
|
SuspendEstimationSec=3600
|
||||||
|
HibernateOnACPower=true
|
||||||
|
'';
|
||||||
|
*/
|
||||||
|
|
||||||
|
powerManagement.cpufreq.min = 400000;
|
||||||
|
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
|
hardware.firmware = let
|
||||||
|
fw = "${pkgs.linux-firmware}/lib/firmware/cirrus/";
|
||||||
|
in [(
|
||||||
|
pkgs.runCommandNoCC "cs35l41-10431683" { } ''
|
||||||
|
mkdir -p $out/lib/firmware/cirrus
|
||||||
|
cd $out/lib/firmware/cirrus
|
||||||
|
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12-spkid0-l0.bin cs35l41-dsp1-spk-prot-10431683-spkid0-l0.bin
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12-spkid0-l0.bin cs35l41-dsp1-spk-prot-10431683-spkid0-r0.bin
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12-spkid0-l0.bin cs35l41-dsp1-spk-prot-10431683-spkid1-l0.bin
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12-spkid0-l0.bin cs35l41-dsp1-spk-prot-10431683-spkid1-r0.bin
|
||||||
|
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12.wmfw cs35l41-dsp1-spk-prot-10431683.wmfw
|
||||||
|
''
|
||||||
|
)];
|
||||||
|
}
|
||||||
4
hosts/anemone/networking.nix
Normal file
4
hosts/anemone/networking.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
networking.wireless.iwd.enable = true;
|
||||||
|
environment.etc."NetworkManager/system-connections".source = "/persist/nm_system-connections";
|
||||||
|
}
|
||||||
44
hosts/dandelion/default.nix
Normal file
44
hosts/dandelion/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
{ inputs, modules, modulesPath, ... }: {
|
||||||
|
networking.hostName = "dandelion";
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
|
age.secrets = {
|
||||||
|
acme_dns.file = ../../secrets/acme_dns.age;
|
||||||
|
slskd_env.file = ../../secrets/slskd_env.age;
|
||||||
|
wg_dandelion.file = ../../secrets/wg_dandelion.age;
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = with modules.system; [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
base
|
||||||
|
kernel
|
||||||
|
nix-stable
|
||||||
|
packages
|
||||||
|
security
|
||||||
|
tailscale
|
||||||
|
wireguard
|
||||||
|
|
||||||
|
modules.services.banksia
|
||||||
|
modules.services.nginx
|
||||||
|
modules.services.unbound
|
||||||
|
modules.services.website
|
||||||
|
|
||||||
|
inputs.c-amethyst.nixosModule
|
||||||
|
inputs.c-beryllium.nixosModule
|
||||||
|
inputs.c-citrine.nixosModule
|
||||||
|
inputs.c-diamond.nixosModule
|
||||||
|
inputs.c-fluorite.nixosModule
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
./nginx.nix
|
||||||
|
|
||||||
|
../../users/hana
|
||||||
|
];
|
||||||
|
|
||||||
|
me.environment = "headless";
|
||||||
|
}
|
||||||
34
hosts/dandelion/filesystem.nix
Normal file
34
hosts/dandelion/filesystem.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
bind = src: {
|
||||||
|
depends = [ "/nix" ];
|
||||||
|
device = src;
|
||||||
|
fsType = "none";
|
||||||
|
neededForBoot = true;
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
mkLabelMount = label: type: {
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
fsType = type;
|
||||||
|
options = [ "defaults" "relatime" ];
|
||||||
|
};
|
||||||
|
mkBtrfsMount = name: subvol: atime: mkLabelMount name "btrfs" // {
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
|
||||||
|
};
|
||||||
|
submount = mkBtrfsMount "DANDELION";
|
||||||
|
in {
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "rootfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=6G" "mode=755" ];
|
||||||
|
};
|
||||||
|
"/boot" = mkLabelMount "UEFI" "vfat";
|
||||||
|
|
||||||
|
"/nix" = submount "/@/nix" false;
|
||||||
|
"/persist" = (submount "/@/persist" true) // { neededForBoot = true; };
|
||||||
|
"/persist/.snapshots" = submount "/snap/persist" false;
|
||||||
|
"/var/log/journal" = bind "/persist/journal";
|
||||||
|
};
|
||||||
|
}
|
||||||
10
hosts/dandelion/kernel.nix
Normal file
10
hosts/dandelion/kernel.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ];
|
||||||
|
initrd.kernelModules = [ "nvme" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
4
hosts/dandelion/networking.nix
Normal file
4
hosts/dandelion/networking.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }: {
|
||||||
|
networking.useDHCP = true;
|
||||||
|
networking.interfaces.enp2s0.useDHCP = false;
|
||||||
|
}
|
||||||
8
hosts/dandelion/nginx.nix
Normal file
8
hosts/dandelion/nginx.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }: {
|
||||||
|
services.nginx.virtualHosts."muse.lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".return = "404";
|
||||||
|
locations."/share/".proxyPass = "http://[fd0d:2::5:2]:4533";
|
||||||
|
};
|
||||||
|
}
|
||||||
14
hosts/dandelion/packages.nix
Normal file
14
hosts/dandelion/packages.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
htop
|
||||||
|
jq
|
||||||
|
neovim
|
||||||
|
rsync
|
||||||
|
sshfs
|
||||||
|
wget
|
||||||
|
|
||||||
|
kitty.terminfo
|
||||||
|
];
|
||||||
|
environment.variables.EDITOR = "nvim";
|
||||||
|
}
|
||||||
47
hosts/hyacinth/default.nix
Normal file
47
hosts/hyacinth/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
{ config, inputs, modules, overlays, pkgs, ... }: {
|
||||||
|
networking.hostName = "hyacinth";
|
||||||
|
system.stateVersion = "21.11";
|
||||||
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
|
nixpkgs.overlays = [ inputs.neovim-nightly.overlays.default ];
|
||||||
|
age.secrets = {
|
||||||
|
passwd.file = ../../secrets/passwd.age;
|
||||||
|
wg_hyacinth.file = ../../secrets/wg_hyacinth.age;
|
||||||
|
wpa_conf.file = ../../secrets/wpa_conf.age;
|
||||||
|
};
|
||||||
|
imports = with modules.system; [
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
aagl
|
||||||
|
audio
|
||||||
|
base
|
||||||
|
bluetooth
|
||||||
|
ccache
|
||||||
|
corectrl
|
||||||
|
docker
|
||||||
|
flatpak
|
||||||
|
greetd
|
||||||
|
gui
|
||||||
|
input
|
||||||
|
kernel
|
||||||
|
nix
|
||||||
|
packages
|
||||||
|
printing
|
||||||
|
security
|
||||||
|
snapper
|
||||||
|
tailscale
|
||||||
|
wireguard
|
||||||
|
|
||||||
|
modules.services.syncthing
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
./packages.nix
|
||||||
|
|
||||||
|
../../users/rin
|
||||||
|
];
|
||||||
|
systemd.services.nix-daemon.environment.TMPDIR = "/nix/tmp";
|
||||||
|
|
||||||
|
me.hasBluetooth = true;
|
||||||
|
}
|
||||||
50
hosts/hyacinth/filesystem.nix
Normal file
50
hosts/hyacinth/filesystem.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
mkLabelMount = label: type: {
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
fsType = type;
|
||||||
|
options = [ "defaults" "relatime" ];
|
||||||
|
};
|
||||||
|
mkBtrfsMount = name: subvol: atime: mkLabelMount name "btrfs" // {
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
|
||||||
|
};
|
||||||
|
mkCakeMount = mkBtrfsMount "CAKE";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "rootfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=24G" "mode=755" ];
|
||||||
|
};
|
||||||
|
"/boot" = mkLabelMount "CUP" "vfat";
|
||||||
|
|
||||||
|
"/mnt/butter" = mkCakeMount "/" true;
|
||||||
|
"/mnt/cream" = mkBtrfsMount "CREAM" "/" true;
|
||||||
|
"/mnt/cream/permanence/.snapshots" = mkBtrfsMount "CREAM" "/snapshot/permanence" false;
|
||||||
|
"/nix" = mkCakeMount "/current/snow" false;
|
||||||
|
"/home" = mkCakeMount "/current/home" true;
|
||||||
|
"/home/.snapshots" = mkCakeMount "/snapshot/home" false;
|
||||||
|
"/root" = mkCakeMount "/current/root" false;
|
||||||
|
"/var" = mkCakeMount "/current/var" false;
|
||||||
|
"/persist" = {
|
||||||
|
depends = [ "/var" ];
|
||||||
|
device = "/var/persist";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.snapper.configs.cream = {
|
||||||
|
FSTYPE = "btrfs";
|
||||||
|
SUBVOLUME = "/mnt/cream/permanence";
|
||||||
|
TIMELINE_CLEANUP = true;
|
||||||
|
TIMELINE_CREATE = true;
|
||||||
|
TIMELINE_MIN_AGE = "1800";
|
||||||
|
TIMELINE_LIMIT_HOURLY = "5";
|
||||||
|
TIMELINE_LIMIT_DAILY = "7";
|
||||||
|
TIMELINE_LIMIT_WEEKLY = "0";
|
||||||
|
TIMELINE_LIMIT_MONTHLY = "0";
|
||||||
|
TIMELINE_LIMIT_YEARLY = "0";
|
||||||
|
};
|
||||||
|
}
|
||||||
20
hosts/hyacinth/kernel.nix
Normal file
20
hosts/hyacinth/kernel.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
initrd.availableKernelModules = [ "xhci_pci" "nvme" ];
|
||||||
|
initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
kernelParams = [
|
||||||
|
"amdgpu.gpu_recovery=1"
|
||||||
|
"intel_pstate=passive"
|
||||||
|
"split_lock_detect=off"
|
||||||
|
];
|
||||||
|
kernelPackages = lib.mkForce (pkgs.linuxPackagesFor pkgs.me.linux-lava);
|
||||||
|
};
|
||||||
|
hardware.amdgpu.overdrive = {
|
||||||
|
enable = true;
|
||||||
|
ppfeaturemask = "0xffffffff";
|
||||||
|
};
|
||||||
|
}
|
||||||
19
hosts/hyacinth/networking.nix
Normal file
19
hosts/hyacinth/networking.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
environment.etc."wpa_supplicant.conf".source = config.age.secrets.wpa_conf.path;
|
||||||
|
networking = {
|
||||||
|
useDHCP = true;
|
||||||
|
interfaces.enp5s0.useDHCP = false;
|
||||||
|
interfaces.enp5s0.wakeOnLan.enable = true;
|
||||||
|
|
||||||
|
interfaces.enp5s0.ipv4.addresses = [{
|
||||||
|
address = "192.168.1.201";
|
||||||
|
prefixLength = 24;
|
||||||
|
}];
|
||||||
|
defaultGateway = "192.168.1.1";
|
||||||
|
nameservers = [ "8.8.8.8" "8.8.4.4" ];
|
||||||
|
|
||||||
|
extraHosts = ''
|
||||||
|
10.100.0.1 sugarcane
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
7
hosts/hyacinth/packages.nix
Normal file
7
hosts/hyacinth/packages.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
discord
|
||||||
|
jetbrains.idea
|
||||||
|
texliveFull
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,107 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
int = {
|
|
||||||
quantum = {
|
|
||||||
min = 512;
|
|
||||||
def = 1024;
|
|
||||||
max = 2048;
|
|
||||||
};
|
|
||||||
rate = 48000;
|
|
||||||
};
|
|
||||||
str = {
|
|
||||||
quantum = {
|
|
||||||
min = toString int.quantum.min;
|
|
||||||
def = toString int.quantum.def;
|
|
||||||
max = toString int.quantum.max;
|
|
||||||
};
|
|
||||||
rate = toString int.rate;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
sound.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
|
|
||||||
config.pipewire = {
|
|
||||||
"context.properties" = {
|
|
||||||
"link.max-buffers" = 16;
|
|
||||||
"default.clock.rate" = int.rate;
|
|
||||||
"default.clock.quantum" = int.quantum.def;
|
|
||||||
"default.clock.min-quantum" = int.quantum.min;
|
|
||||||
"default.clock.max-quantum" = int.quantum.max;
|
|
||||||
"core.daemon" = true;
|
|
||||||
"core.name" = "pipewire-0";
|
|
||||||
};
|
|
||||||
|
|
||||||
"context.modules" = [
|
|
||||||
{
|
|
||||||
name = "libpipewire-module-rtkit";
|
|
||||||
args = {
|
|
||||||
"nice.level" = -15;
|
|
||||||
"rt.prio" = 88;
|
|
||||||
"rt.time.soft" = 200000;
|
|
||||||
"rt.time.hard" = 200000;
|
|
||||||
};
|
|
||||||
flags = [ "ifexists" "nofail" ];
|
|
||||||
}
|
|
||||||
{ name = "libpipewire-module-protocol-native"; }
|
|
||||||
{ name = "libpipewire-module-profiler"; }
|
|
||||||
{ name = "libpipewire-module-metadata"; }
|
|
||||||
{ name = "libpipewire-module-spa-device-factory"; }
|
|
||||||
{ name = "libpipewire-module-spa-node-factory"; }
|
|
||||||
{ name = "libpipewire-module-client-node"; }
|
|
||||||
{ name = "libpipewire-module-client-device"; }
|
|
||||||
{
|
|
||||||
name = "libpipewire-module-portal";
|
|
||||||
flags = [ "ifexists" "nofail" ];
|
|
||||||
}
|
|
||||||
{ name = "libpipewire-module-access"; args = {}; }
|
|
||||||
{ name = "libpipewire-module-adapter"; }
|
|
||||||
{ name = "libpipewire-module-link-factory"; }
|
|
||||||
{ name = "libpipewire-module-session-manager"; }
|
|
||||||
];
|
|
||||||
"stream.properties" = {
|
|
||||||
"node.latency" = "${str.quantum.min}/${str.rate}";
|
|
||||||
"resample.quality" = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config.pipewire-pulse = {
|
|
||||||
"context.modules" = [
|
|
||||||
{
|
|
||||||
name = "libpipewire-module-rtkit";
|
|
||||||
args = {
|
|
||||||
"nice.level" = -15;
|
|
||||||
"rt.prio" = 88;
|
|
||||||
"rt.time.soft" = 200000;
|
|
||||||
"rt.time.hard" = 200000;
|
|
||||||
};
|
|
||||||
flags = [ "ifexists" "nofail" ];
|
|
||||||
}
|
|
||||||
{ name = "libpipewire-module-protocol-native"; }
|
|
||||||
{ name = "libpipewire-module-client-node"; }
|
|
||||||
{ name = "libpipewire-module-adapter"; }
|
|
||||||
{ name = "libpipewire-module-metadata"; }
|
|
||||||
{
|
|
||||||
name = "libpipewire-module-protocol-pulse";
|
|
||||||
args = {
|
|
||||||
"pulse.min.req" = "${str.quantum.min}/${str.rate}";
|
|
||||||
"pulse.default.req" = "${str.quantum.def}/${str.rate}";
|
|
||||||
"pulse.max.req" = "${str.quantum.max}/${str.rate}";
|
|
||||||
"pulse.min.quantum" = "${str.quantum.min}/${str.rate}";
|
|
||||||
"pulse.max.quantum" = "${str.quantum.max}/${str.rate}";
|
|
||||||
"server.address" = [ "unix:native" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
"stream.properties" = {
|
|
||||||
"node.latency" = "${str.quantum.min}/${str.rate}";
|
|
||||||
"resample.quality" = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
{ config, overlays, pkgs, ... }: {
|
|
||||||
networking.hostName = "winter";
|
|
||||||
system.stateVersion = "20.09";
|
|
||||||
|
|
||||||
environment.etc = {
|
|
||||||
"machine-id".source = "/var/persist/machine-id";
|
|
||||||
"ssh/ssh_host_rsa_key".source = "/var/persist/ssh_host_rsa_key";
|
|
||||||
"ssh/ssh_host_rsa_key.pub".source = "/var/persist/ssh_host_rsa_key.pub";
|
|
||||||
"ssh/ssh_host_ed25519_key".source = "/var/persist/ssh_host_ed25519_key";
|
|
||||||
"ssh/ssh_host_ed25519_key.pub".source = "/var/persist/ssh_host_ed25519_key.pub";
|
|
||||||
};
|
|
||||||
environment.pathsToLink = [ "/share/zsh" ];
|
|
||||||
users.mutableUsers = false;
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./audio.nix
|
|
||||||
./gui.nix
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./kernel.nix
|
|
||||||
./networking.nix
|
|
||||||
./packages.nix
|
|
||||||
./security.nix
|
|
||||||
|
|
||||||
../../users/rin
|
|
||||||
];
|
|
||||||
nix = rec {
|
|
||||||
package = pkgs.nixUnstable;
|
|
||||||
binaryCaches = [
|
|
||||||
"https://cache.nixos.org?priority=10"
|
|
||||||
"https://lava.cachix.org"
|
|
||||||
];
|
|
||||||
binaryCachePublicKeys = [
|
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
||||||
"lava.cachix.org-1:8lTWI/3IKWHByzzYHZySunMPYs2eAJw2duL+uLZkSy0="
|
|
||||||
];
|
|
||||||
trustedBinaryCaches = binaryCaches;
|
|
||||||
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
|
||||||
console.useXkbConfig = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
|
||||||
fonts = {
|
|
||||||
enableDefaultFonts = true;
|
|
||||||
fontconfig = {
|
|
||||||
defaultFonts = {
|
|
||||||
serif = ["NotoSerif"];
|
|
||||||
sansSerif = ["NotoSans"];
|
|
||||||
monospace = ["CascadiaCode"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
fonts = with pkgs; [
|
|
||||||
cascadia-code
|
|
||||||
font-awesome-ttf
|
|
||||||
font-awesome_4
|
|
||||||
hanazono
|
|
||||||
material-icons
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk
|
|
||||||
noto-fonts-extra
|
|
||||||
open-sans
|
|
||||||
twemoji-color-font
|
|
||||||
unifont
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
autorun = false;
|
|
||||||
displayManager = {
|
|
||||||
lightdm.enable = lib.mkForce false;
|
|
||||||
startx.enable = true;
|
|
||||||
xserverArgs = [
|
|
||||||
"-ardelay 250"
|
|
||||||
"-arinterval 15"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
desktopManager.xterm.enable = false;
|
|
||||||
libinput = {
|
|
||||||
enable = true;
|
|
||||||
mouse = {
|
|
||||||
accelSpeed = "0";
|
|
||||||
accelProfile = "flat";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xkbOptions = "caps:escape";
|
|
||||||
windowManager.i3 = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.i3-gaps;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
dunst
|
|
||||||
feh
|
|
||||||
lxappearance
|
|
||||||
maim
|
|
||||||
picom
|
|
||||||
polybar
|
|
||||||
rofi
|
|
||||||
xclip
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "rootfs";
|
|
||||||
fsType = "tmpfs";
|
|
||||||
options = [ "defaults" "size=4G" "mode=755" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/E8E8-E570";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/mnt/butter" =
|
|
||||||
{ device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=5" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/nix" =
|
|
||||||
{ device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=258" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home" =
|
|
||||||
{ device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=260" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/root" =
|
|
||||||
{ device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=261" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/var" =
|
|
||||||
{ device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=259" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/mnt/hdd" =
|
|
||||||
{ device = "/dev/disk/by-uuid/d5e3cfe5-c73a-4695-b81b-fc0215d4cefe";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
{ config, pkgs, ...}: {
|
|
||||||
powerManagement.cpuFreqGovernor = "ondemand";
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
blacklistedKernelModules = ["uvcvideo"];
|
|
||||||
initrd = {
|
|
||||||
includeDefaultModules = false;
|
|
||||||
kernelModules = [ "i915" ];
|
|
||||||
};
|
|
||||||
kernel.sysctl = {
|
|
||||||
"kernel.core_pattern" = "|/bin/false";
|
|
||||||
"kernel.sysrq" = 1;
|
|
||||||
};
|
|
||||||
kernelParams = [
|
|
||||||
"amdgpu.gpu_recovery=1"
|
|
||||||
"amdgpu.si_support=1"
|
|
||||||
"radeon.si_support=0"
|
|
||||||
"intel_pstate=passive"
|
|
||||||
"msr.allow_writes=on"
|
|
||||||
];
|
|
||||||
kernelPackages = pkgs.lib.mkForce (pkgs.linuxPackagesFor pkgs.linux-lava);
|
|
||||||
};
|
|
||||||
zramSwap.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{ config, ... }: {
|
|
||||||
networking.wireless = {
|
|
||||||
enable = true;
|
|
||||||
interfaces = [ "wlp3s0" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.useDHCP = false;
|
|
||||||
networking.interfaces.eno1.useDHCP = false;
|
|
||||||
networking.interfaces.wlp3s0.useDHCP = false;
|
|
||||||
|
|
||||||
networking.interfaces.eno1.ipv4.addresses = [{
|
|
||||||
address = "10.0.0.2";
|
|
||||||
prefixLength = 24;
|
|
||||||
}];
|
|
||||||
networking.interfaces.wlp3s0.ipv4.addresses = [{
|
|
||||||
address = "192.168.100.13";
|
|
||||||
prefixLength = 24;
|
|
||||||
}];
|
|
||||||
networking.defaultGateway = "192.168.100.1";
|
|
||||||
networking.nameservers = ["192.168.100.11"];
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
{ config, pkgs, ...}: {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
efibootmgr
|
|
||||||
git
|
|
||||||
gparted
|
|
||||||
htop
|
|
||||||
libarchive
|
|
||||||
lf
|
|
||||||
msr-tools
|
|
||||||
ncdu
|
|
||||||
neovim
|
|
||||||
rsync
|
|
||||||
wget
|
|
||||||
|
|
||||||
gnome3.nautilus
|
|
||||||
];
|
|
||||||
environment.variables.EDITOR = "nvim";
|
|
||||||
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
|
||||||
vaapiIntel
|
|
||||||
vaapiVdpau
|
|
||||||
libvdpau-va-gl
|
|
||||||
intel-ocl
|
|
||||||
rocm-opencl-icd
|
|
||||||
rocm-opencl-runtime
|
|
||||||
];
|
|
||||||
programs.light.enable = true;
|
|
||||||
hardware.opentabletdriver.enable = true;
|
|
||||||
programs.steam.enable = true;
|
|
||||||
services.dbus.packages = [ pkgs.gnome3.dconf pkgs.gcr ];
|
|
||||||
services.gnome.sushi.enable = true;
|
|
||||||
# services.ipfs.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
{ config, pkgs, ... }: {
|
|
||||||
networking.firewall.enable = false;
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
security = {
|
|
||||||
polkit.enable = true;
|
|
||||||
sudo.enable = false;
|
|
||||||
doas = {
|
|
||||||
enable = true;
|
|
||||||
extraRules = [
|
|
||||||
{
|
|
||||||
groups = ["wheel"];
|
|
||||||
keepEnv = true;
|
|
||||||
persist = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
13
modules/binds.nix
Normal file
13
modules/binds.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, ...}: {
|
||||||
|
imports = [ ./options.nix ];
|
||||||
|
fileSystems = lib.mapAttrs (dest: key: let
|
||||||
|
target = if (lib.strings.hasPrefix "/" key)
|
||||||
|
then key
|
||||||
|
else "/persist/binds/${key}";
|
||||||
|
in {
|
||||||
|
depends = [ "/persist" ];
|
||||||
|
device = target;
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
}) config.me.binds;
|
||||||
|
}
|
||||||
80
modules/default.nix
Normal file
80
modules/default.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
{ lib }:
|
||||||
|
let
|
||||||
|
getName = path: lib.removeSuffix ".nix" ( # Strip extension
|
||||||
|
lib.last ( # Gets the last part (filename)
|
||||||
|
lib.splitString "/" ( # Splits the path into components
|
||||||
|
builtins.toString path # Converts the path into a string
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
mkAttrsFromPaths = paths: builtins.listToAttrs (
|
||||||
|
builtins.map (path: {
|
||||||
|
name = getName path;
|
||||||
|
value = path;
|
||||||
|
}) paths
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
binds = ./binds.nix;
|
||||||
|
options = ./options.nix;
|
||||||
|
services = mkAttrsFromPaths [
|
||||||
|
./services/banksia.nix
|
||||||
|
./services/jellyfin.nix
|
||||||
|
./services/nginx.nix
|
||||||
|
./services/postgres.nix
|
||||||
|
./services/sonarr.nix
|
||||||
|
./services/synapse.nix
|
||||||
|
./services/syncthing.nix
|
||||||
|
./services/tmptsync.nix
|
||||||
|
./services/transmission.nix
|
||||||
|
./services/unbound.nix
|
||||||
|
./services/vaultwarden.nix
|
||||||
|
./services/website.nix
|
||||||
|
];
|
||||||
|
system = mkAttrsFromPaths [
|
||||||
|
./system/aagl.nix
|
||||||
|
./system/audio.nix
|
||||||
|
./system/base.nix
|
||||||
|
./system/bluetooth.nix
|
||||||
|
./system/ccache.nix
|
||||||
|
./system/corectrl.nix
|
||||||
|
./system/docker.nix
|
||||||
|
./system/flatpak.nix
|
||||||
|
./system/greetd.nix
|
||||||
|
./system/gui.nix
|
||||||
|
./system/home-manager.nix
|
||||||
|
./system/input.nix
|
||||||
|
./system/kernel.nix
|
||||||
|
./system/nix.nix
|
||||||
|
./system/nix-stable.nix
|
||||||
|
./system/packages.nix
|
||||||
|
./system/printing.nix
|
||||||
|
./system/security.nix
|
||||||
|
./system/snapper.nix
|
||||||
|
./system/tailscale.nix
|
||||||
|
./system/virtualisation.nix
|
||||||
|
./system/wireguard.nix
|
||||||
|
];
|
||||||
|
user = mkAttrsFromPaths [
|
||||||
|
./user/catppuccin.nix
|
||||||
|
./user/comma.nix
|
||||||
|
./user/direnv.nix
|
||||||
|
./user/dunst.nix
|
||||||
|
./user/eww.nix
|
||||||
|
./user/git.nix
|
||||||
|
./user/gpg.nix
|
||||||
|
./user/hypridle.nix
|
||||||
|
./user/hyprlock.nix
|
||||||
|
./user/kitty.nix
|
||||||
|
./user/mpv.nix
|
||||||
|
./user/neovim.nix
|
||||||
|
./user/neovim-minimal.nix
|
||||||
|
./user/npm.nix
|
||||||
|
./user/obs.nix
|
||||||
|
./user/rofi.nix
|
||||||
|
./user/sessionVariables.nix
|
||||||
|
./user/spicetify.nix
|
||||||
|
./user/theming.nix
|
||||||
|
./user/xdg.nix
|
||||||
|
./user/zsh.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
53
modules/options.nix
Normal file
53
modules/options.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
mkOption
|
||||||
|
types;
|
||||||
|
in {
|
||||||
|
options.me = {
|
||||||
|
environment = mkOption {
|
||||||
|
type = types.enum [ "desktop" "laptop" "headless" ];
|
||||||
|
default = "desktop";
|
||||||
|
};
|
||||||
|
|
||||||
|
hasFingerprint = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
gui = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = config.me.environment != "headless";
|
||||||
|
};
|
||||||
|
|
||||||
|
batteryDevice = mkOption {
|
||||||
|
type = with types; nullOr (uniq str);
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
kbBacklightDevice = mkOption {
|
||||||
|
type = with types; nullOr (uniq str);
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
hasBluetooth = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = config.me.environment == "laptop";
|
||||||
|
};
|
||||||
|
|
||||||
|
hasWifi = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = config.me.environment == "laptop";
|
||||||
|
};
|
||||||
|
|
||||||
|
hidpi = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
binds = lib.mkOption {
|
||||||
|
type = with lib.types; attrsOf str;
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/services/banksia.nix
Normal file
11
modules/services/banksia.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# TODO ^^
|
||||||
|
{ ... }: {
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
"banksia.lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".return = "302 https://lab.lava.moe/cilly/Banksia";
|
||||||
|
locations."/api".proxyPass = "http://localhost:8080/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
28
modules/services/jellyfin.nix
Normal file
28
modules/services/jellyfin.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
dir = "/persist/jellyfin";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
fileSystems."/var/lib/jellyfin" = {
|
||||||
|
depends = [ "/persist" ];
|
||||||
|
device = dir;
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
system.activationScripts."jellyfin-create-bind-mount" = {
|
||||||
|
deps = [ "users" "groups" ];
|
||||||
|
text = ''
|
||||||
|
mkdir -p ${dir}
|
||||||
|
chown jellyfin:jellyfin ${dir}
|
||||||
|
chmod 700 ${dir}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /tmp/jelly-transcodes 700 jellyfin jellyfin"
|
||||||
|
"L+ /var/lib/jellyfin/transcodes - - - - /tmp/jelly-transcodes"
|
||||||
|
];
|
||||||
|
services.jellyfin = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
28
modules/services/nginx.nix
Normal file
28
modules/services/nginx.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
security.acme = {
|
||||||
|
acceptTerms = true;
|
||||||
|
defaults = {
|
||||||
|
email = "me@lava.moe";
|
||||||
|
group = "nginx";
|
||||||
|
dnsProvider = "cloudflare";
|
||||||
|
environmentFile = config.age.secrets."acme_dns".path;
|
||||||
|
};
|
||||||
|
certs."lava.moe" = {
|
||||||
|
extraDomainNames = [
|
||||||
|
"*.lava.moe"
|
||||||
|
"*.local.lava.moe"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
certs."cilly.moe" = {};
|
||||||
|
certs."cilly.dev" = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
recommendedTlsSettings = true;
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
20
modules/services/postgres.nix
Normal file
20
modules/services/postgres.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
dir = "/persist/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||||
|
uid = toString config.ids.uids.postgres;
|
||||||
|
gid = toString config.ids.gids.postgres;
|
||||||
|
in {
|
||||||
|
systemd.tmpfiles.rules = [ "d ${dir} 700 ${uid} ${gid}" ];
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = dir;
|
||||||
|
# TODO: broken :3
|
||||||
|
package = pkgs.postgresql_13;
|
||||||
|
authentication = lib.mkOverride 10 ''
|
||||||
|
#type database DBuser origin-address auth-method
|
||||||
|
local all all trust
|
||||||
|
host all all 127.0.0.1/32 trust
|
||||||
|
host all all ::1/128 trust
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/services/sonarr.nix
Normal file
11
modules/services/sonarr.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
dir = "/persist/sonarr";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.sonarr = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = dir;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
89
modules/services/synapse.nix
Normal file
89
modules/services/synapse.nix
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
{ config, lib, options, pkgs, ... }:
|
||||||
|
let
|
||||||
|
dom = "lava.moe";
|
||||||
|
sub = "matrix.lava.moe";
|
||||||
|
dir = "/persist/matrix-synapse";
|
||||||
|
uid = toString config.ids.uids.matrix-synapse;
|
||||||
|
gid = toString config.ids.gids.matrix-synapse;
|
||||||
|
in {
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
systemd.tmpfiles.rules = [ "d ${dir} 700 ${uid} ${gid}" ];
|
||||||
|
|
||||||
|
/*services.postgresql = {
|
||||||
|
ensureDatabases = [ "matrix-synapse" ];
|
||||||
|
ensureUsers = [{
|
||||||
|
name = "matrix-synapse";
|
||||||
|
ensurePermissions = {
|
||||||
|
"DATABASE matrix-synapse" = "ALL PRIVILEGES";
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};*/
|
||||||
|
# TODO this would be bad if we use postgres for other things too
|
||||||
|
services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" ''
|
||||||
|
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
|
||||||
|
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
|
||||||
|
TEMPLATE template0
|
||||||
|
LC_COLLATE = "C"
|
||||||
|
LC_CTYPE = "C";
|
||||||
|
'';
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
${dom} = {
|
||||||
|
locations."= /.well-known/matrix/server".extraConfig =
|
||||||
|
let
|
||||||
|
server = { "m.server" = "${sub}: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://${sub}"; };
|
||||||
|
"m.identity_server" = { "base_url" = "https://vector.im"; };
|
||||||
|
};
|
||||||
|
in ''
|
||||||
|
add_header Content-Type application/json;
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
return 200 '${builtins.toJSON client}';
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
${sub} = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = dom;
|
||||||
|
|
||||||
|
locations."/".extraConfig = ''
|
||||||
|
return 302 'https://${dom}';
|
||||||
|
'';
|
||||||
|
|
||||||
|
locations."/_matrix" = {
|
||||||
|
proxyPass = "http://[::1]:8008";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.matrix-synapse = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = dir;
|
||||||
|
server_name = dom;
|
||||||
|
logConfig = builtins.replaceStrings [ "INFO" ] [ "WARNING" ] options.services.matrix-synapse.logConfig.default;
|
||||||
|
listeners = [
|
||||||
|
{
|
||||||
|
port = 8008;
|
||||||
|
bind_address = "::1";
|
||||||
|
type = "http";
|
||||||
|
tls = false;
|
||||||
|
x_forwarded = true;
|
||||||
|
resources = [
|
||||||
|
{
|
||||||
|
names = [ "client" "federation" ];
|
||||||
|
compress = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
23
modules/services/syncthing.nix
Normal file
23
modules/services/syncthing.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
dir = "/persist/shared/.syncthing";
|
||||||
|
user = if config.me.gui then "rin" else "hana";
|
||||||
|
uid = toString config.users.users."${user}".uid;
|
||||||
|
gid = toString config.users.groups.users.gid;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${dir}/config 700 ${uid} ${gid}"
|
||||||
|
"d ${dir}/data 700 ${uid} ${gid}"
|
||||||
|
];
|
||||||
|
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
openDefaultPorts = true;
|
||||||
|
user = user;
|
||||||
|
group = "users";
|
||||||
|
dataDir = "/persist/shared/.syncthing/data";
|
||||||
|
configDir = "/persist/shared/.syncthing/config";
|
||||||
|
guiAddress = if config.me.gui then "127.0.0.1:8384" else ":8384";
|
||||||
|
};
|
||||||
|
}
|
||||||
32
modules/services/tmptsync.nix
Normal file
32
modules/services/tmptsync.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
dir = "/persist/tmptsync";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd = {
|
||||||
|
services = {
|
||||||
|
tmptsync-load = {
|
||||||
|
before = [ "basic.target" ];
|
||||||
|
after = [ "local-fs.target" "sysinit.target" ];
|
||||||
|
unitConfig.DefaultDependencies = false;
|
||||||
|
|
||||||
|
environment.FILE = dir;
|
||||||
|
script = "${../../scripts/tmptsync.sh} load";
|
||||||
|
wantedBy = [ "basic.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
tmptsync-save = {
|
||||||
|
environment.FILE = dir;
|
||||||
|
script = "${../../scripts/tmptsync.sh} save";
|
||||||
|
wantedBy = [ "basic.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
timers.tmptsync-save = {
|
||||||
|
timerConfig = {
|
||||||
|
Unit = "tmptsync-save.service";
|
||||||
|
OnBootSec = "30min";
|
||||||
|
OnUnitActiveSec = "2h";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/services/transmission.nix
Normal file
18
modules/services/transmission.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
networking.firewall.allowedTCPPorts = [ 9091 ];
|
||||||
|
services.transmission = {
|
||||||
|
enable = true;
|
||||||
|
downloadDirPermissions = "775";
|
||||||
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
download-dir = "/persist/transmission/Downloads";
|
||||||
|
incomplete-dir = "/persist/transmission/.incomplete";
|
||||||
|
ratio-limit-enabled = true;
|
||||||
|
rpc-bind-address = "0.0.0.0";
|
||||||
|
rpc-enabled = true;
|
||||||
|
rpc-port = 9091;
|
||||||
|
rpc-host-whitelist = "${config.networking.hostName}";
|
||||||
|
rpc-whitelist = "10.100.0.*,10.0.0.*,192.168.100.*";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
62
modules/services/unbound.nix
Normal file
62
modules/services/unbound.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
{ inputs, pkgs, gcSecrets, ... }:
|
||||||
|
let
|
||||||
|
dir = "/persist/unbound";
|
||||||
|
|
||||||
|
converted = pkgs.runCommand "stevenblack-hosts-unbound" {} ''
|
||||||
|
echo "server:" > "$out"
|
||||||
|
grep '^0\.0\.0\.0' "${inputs.stevenblack-hosts}/hosts" | awk '{print "local-zone: \""$2"\" always_refuse"}' | tail -n +2 >> "$out"
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
networking.firewall.interfaces."ve-+" = {
|
||||||
|
allowedUDPPorts = [ 53 853 ];
|
||||||
|
allowedTCPPorts = [ 53 853 ];
|
||||||
|
};
|
||||||
|
networking.firewall.interfaces.wg0 = {
|
||||||
|
allowedUDPPorts = [ 53 853 ];
|
||||||
|
allowedTCPPorts = [ 53 853 ];
|
||||||
|
};
|
||||||
|
systemd.tmpfiles.rules = [ "d ${dir} 700 unbound unbound" ];
|
||||||
|
|
||||||
|
services.unbound = {
|
||||||
|
enable = true;
|
||||||
|
stateDir = dir;
|
||||||
|
settings = {
|
||||||
|
forward-zone = [{
|
||||||
|
name = ".";
|
||||||
|
forward-tls-upstream = true;
|
||||||
|
forward-addr = [
|
||||||
|
"2606:4700:4700::1111@853#cloudflare-dns.com"
|
||||||
|
"2606:4700:4700::1001@853#cloudflare-dns.com"
|
||||||
|
"2001:4860:4860::8888@853#dns.google"
|
||||||
|
"2001:4860:4860::8844@853#dns.google"
|
||||||
|
"1.1.1.1@853#cloudflare-dns.com"
|
||||||
|
"1.0.0.1@853#cloudflare-dns.com"
|
||||||
|
"8.8.8.8@853#dns.google"
|
||||||
|
"8.8.4.4@853#dns.google"
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
|
||||||
|
server = {
|
||||||
|
interface = [ "0.0.0.0" "::0" ];
|
||||||
|
access-control = [
|
||||||
|
"127.0.0.1/8 allow"
|
||||||
|
"10.0.0.0/8 allow"
|
||||||
|
"100.64.0.0/10 allow"
|
||||||
|
"192.168.100.0/24 allow"
|
||||||
|
"fd0d::/16 allow"
|
||||||
|
"fd7a:115c:a1e0::/48 allow"
|
||||||
|
"${gcSecrets.wireguard.ipv6Subnet}:/80 allow"
|
||||||
|
];
|
||||||
|
domain-insecure = [ "\"local.lava.moe\"" ];
|
||||||
|
local-zone = [ "\"warden.local.lava.moe.\" redirect" ];
|
||||||
|
local-data = [
|
||||||
|
"\"warden.local.lava.moe. IN A 10.100.0.2\""
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
include = "${converted}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.unbound.serviceConfig.ReadWritePaths = [ dir ];
|
||||||
|
}
|
||||||
32
modules/services/vaultwarden.nix
Normal file
32
modules/services/vaultwarden.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
dir = "/persist/vaultwarden";
|
||||||
|
user = config.users.users.vaultwarden.name;
|
||||||
|
group = config.users.groups.vaultwarden.name;
|
||||||
|
in {
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${dir} 700 ${user} ${group}"
|
||||||
|
"d ${dir}_backup 700 ${user} ${group}"
|
||||||
|
];
|
||||||
|
services.vaultwarden = {
|
||||||
|
enable = true;
|
||||||
|
backupDir = "${dir}_backup";
|
||||||
|
config = {
|
||||||
|
dataFolder = dir;
|
||||||
|
signupsAllowed = false;
|
||||||
|
domain = "https://warden.local.lava.moe";
|
||||||
|
rocketPort = 8002;
|
||||||
|
};
|
||||||
|
environmentFile = config.age.secrets.warden_admin.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."warden.local.lava.moe" = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
|
||||||
|
locations."/".proxyPass = "http://localhost:8002";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.vaultwarden.serviceConfig.ReadWritePaths = [ dir ];
|
||||||
|
systemd.services.backup-vaultwarden.environment.DATA_FOLDER = lib.mkForce dir;
|
||||||
|
}
|
||||||
43
modules/services/website.nix
Normal file
43
modules/services/website.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
{ inputs, pkgs, ... }: let
|
||||||
|
pastel = inputs.pastel.packages.${pkgs.system}.default;
|
||||||
|
in {
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
"cilly.moe" = {
|
||||||
|
useACMEHost = "cilly.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
root = pastel.outPath;
|
||||||
|
};
|
||||||
|
"cilly.dev" = {
|
||||||
|
useACMEHost = "cilly.dev";
|
||||||
|
forceSSL = true;
|
||||||
|
root = pastel.outPath;
|
||||||
|
};
|
||||||
|
"lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
root = inputs.website.outPath;
|
||||||
|
};
|
||||||
|
"cdn.lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://sh.lava.moe$request_uri;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
"sh.lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
root = "/persist/cdn";
|
||||||
|
};
|
||||||
|
"_" = {
|
||||||
|
default = true;
|
||||||
|
addSSL = true;
|
||||||
|
# TODO generate this somewhere
|
||||||
|
sslCertificate = "/persist/fakeCerts/fake.crt";
|
||||||
|
sslCertificateKey = "/persist/fakeCerts/fake.key";
|
||||||
|
extraConfig = ''
|
||||||
|
return 444;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
modules/system/aagl.nix
Normal file
6
modules/system/aagl.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ inputs, ... }: {
|
||||||
|
imports = [ inputs.aagl.nixosModules.default ];
|
||||||
|
nix.settings = inputs.aagl.nixConfig;
|
||||||
|
programs.anime-game-launcher.enable = true;
|
||||||
|
programs.sleepy-launcher.enable = true;
|
||||||
|
}
|
||||||
88
modules/system/audio.nix
Normal file
88
modules/system/audio.nix
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
int = {
|
||||||
|
quantum = {
|
||||||
|
min = 64;
|
||||||
|
def = 1024;
|
||||||
|
max = 2048;
|
||||||
|
};
|
||||||
|
rate = 48000;
|
||||||
|
};
|
||||||
|
str = {
|
||||||
|
quantum = {
|
||||||
|
min = toString int.quantum.min;
|
||||||
|
def = toString int.quantum.def;
|
||||||
|
max = toString int.quantum.max;
|
||||||
|
};
|
||||||
|
rate = toString int.rate;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
services.pipewire.extraConfig.pipewire = {
|
||||||
|
"context.properties" = {
|
||||||
|
"default.clock.rate" = int.rate;
|
||||||
|
"default.clock.quantum" = int.quantum.def;
|
||||||
|
"default.clock.min-quantum" = int.quantum.min;
|
||||||
|
"default.clock.max-quantum" = int.quantum.max;
|
||||||
|
};
|
||||||
|
|
||||||
|
"context.modules" = [
|
||||||
|
{
|
||||||
|
name = "libpipewire-module-rtkit";
|
||||||
|
args = {
|
||||||
|
"nice.level" = -15;
|
||||||
|
"rt.prio" = 88;
|
||||||
|
"rt.time.soft" = 200000;
|
||||||
|
"rt.time.hard" = 200000;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
"stream.properties" = {
|
||||||
|
"node.latency" = "${str.quantum.min}/${str.rate}";
|
||||||
|
"resample.quality" = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.pipewire.extraConfig.pipewire-pulse = {
|
||||||
|
"context.modules" = [
|
||||||
|
{
|
||||||
|
name = "libpipewire-module-rtkit";
|
||||||
|
args = {
|
||||||
|
"nice.level" = -15;
|
||||||
|
"rt.prio" = 88;
|
||||||
|
"rt.time.soft" = 200000;
|
||||||
|
"rt.time.hard" = 200000;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
"pulse.properties" = {
|
||||||
|
"pulse.min.req" = "${str.quantum.min}/${str.rate}";
|
||||||
|
"pulse.default.req" = "${str.quantum.def}/${str.rate}";
|
||||||
|
"pulse.max.req" = "${str.quantum.max}/${str.rate}";
|
||||||
|
"pulse.min.quantum" = "${str.quantum.min}/${str.rate}";
|
||||||
|
"pulse.max.quantum" = "${str.quantum.max}/${str.rate}";
|
||||||
|
};
|
||||||
|
"pulse.rules" = [
|
||||||
|
{
|
||||||
|
# Discord notification sounds fix
|
||||||
|
matches = [ { "application.process.binary" = ".DiscordCanary-wrapped"; } ];
|
||||||
|
actions = {
|
||||||
|
update-props = {
|
||||||
|
"pulse.min.quantum" = "1024/48000";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
"stream.properties" = {
|
||||||
|
"node.latency" = "${str.quantum.min}/${str.rate}";
|
||||||
|
"resample.quality" = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
27
modules/system/base.nix
Normal file
27
modules/system/base.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, inputs, modules, ... }: {
|
||||||
|
imports = [ modules.binds modules.options ];
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"machine-id".source = "/persist/machine-id";
|
||||||
|
"ssh/ssh_host_rsa_key".source = "/persist/ssh_host_rsa_key";
|
||||||
|
"ssh/ssh_host_rsa_key.pub".source = "/persist/ssh_host_rsa_key.pub";
|
||||||
|
"ssh/ssh_host_ed25519_key".source = "/persist/ssh_host_ed25519_key";
|
||||||
|
"ssh/ssh_host_ed25519_key.pub".source = "/persist/ssh_host_ed25519_key.pub";
|
||||||
|
};
|
||||||
|
environment.pathsToLink = [ "/share/zsh" ];
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_AU.UTF-8";
|
||||||
|
i18n.extraLocales = [ "en_GB.UTF-8/UTF-8" ];
|
||||||
|
|
||||||
|
users.mutableUsers = false;
|
||||||
|
|
||||||
|
system = {
|
||||||
|
configurationRevision = inputs.self.rev;
|
||||||
|
nixos = rec {
|
||||||
|
version = config.system.nixos.release + versionSuffix;
|
||||||
|
versionSuffix = "-${config.system.name}.r${builtins.toString inputs.self.revCount}.${inputs.self.shortRev}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nix.registry.config.flake = inputs.self;
|
||||||
|
nix.registry.shells.flake = inputs.self;
|
||||||
|
}
|
||||||
6
modules/system/bluetooth.nix
Normal file
6
modules/system/bluetooth.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ ... }: {
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
3
modules/system/ccache.nix
Normal file
3
modules/system/ccache.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
programs.ccache.enable = true;
|
||||||
|
}
|
||||||
5
modules/system/corectrl.nix
Normal file
5
modules/system/corectrl.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs.corectrl = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/system/docker.nix
Normal file
13
modules/system/docker.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
storageDriver = "btrfs";
|
||||||
|
# rootless = {
|
||||||
|
# enable = true;
|
||||||
|
# setSocketVariable = true;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.docker-compose
|
||||||
|
];
|
||||||
|
}
|
||||||
8
modules/system/flatpak.nix
Normal file
8
modules/system/flatpak.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
config.common.default = "*";
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/system/greetd.nix
Normal file
18
modules/system/greetd.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = "${pkgs.tuigreet}/bin/tuigreet --remember --asterisks --time --cmd 'zsh -c \"source $HOME/.config/zsh/.zshrc && Hyprland > $XDG_RUNTIME_DIR/Hyprland.out\"'";
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
|
||||||
|
initial_session = {
|
||||||
|
command = "${pkgs.writeShellScript "launch.sh" ''
|
||||||
|
zsh -c "source $HOME/.config/zsh/.zshrc && Hyprland > \"$XDG_RUNTIME_DIR/Hyprland.out\""
|
||||||
|
''}";
|
||||||
|
user = "rin";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
modules/system/gui.nix
Normal file
31
modules/system/gui.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
fonts = {
|
||||||
|
enableDefaultPackages = true;
|
||||||
|
fontconfig = {
|
||||||
|
defaultFonts = {
|
||||||
|
serif = [ "NotoSerif" ];
|
||||||
|
sansSerif = [ "NotoSans" ];
|
||||||
|
monospace = [ "CascadiaCode" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
packages = with pkgs; [
|
||||||
|
material-symbols
|
||||||
|
material-icons
|
||||||
|
cascadia-code
|
||||||
|
hanazono
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
open-sans
|
||||||
|
twemoji-color-font
|
||||||
|
unifont
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.lightdm.enable = lib.mkForce false;
|
||||||
|
desktopManager.xterm.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
security.pam.services.hyprlock = {};
|
||||||
|
}
|
||||||
19
modules/system/home-manager.nix
Normal file
19
modules/system/home-manager.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, inputs, modules, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs modules;
|
||||||
|
sysConfig = config;
|
||||||
|
};
|
||||||
|
sharedModules = [
|
||||||
|
{
|
||||||
|
imports = [ modules.options ];
|
||||||
|
config.me = config.me;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
24
modules/system/input.nix
Normal file
24
modules/system/input.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{ ... }: {
|
||||||
|
services.xserver = {
|
||||||
|
displayManager = {
|
||||||
|
xserverArgs = [
|
||||||
|
"-ardelay 150"
|
||||||
|
"-arinterval 15"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.keyd = {
|
||||||
|
enable = true;
|
||||||
|
keyboards = {
|
||||||
|
default = {
|
||||||
|
ids = [ "*" ];
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
capslock = "esc";
|
||||||
|
esc = "capslock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/system/kernel.nix
Normal file
18
modules/system/kernel.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
boot = {
|
||||||
|
blacklistedKernelModules = [ "uvcvideo" ];
|
||||||
|
initrd = {
|
||||||
|
includeDefaultModules = false;
|
||||||
|
availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||||
|
};
|
||||||
|
kernel.sysctl = {
|
||||||
|
"kernel.core_pattern" = "|/bin/false";
|
||||||
|
"kernel.sysrq" = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
priority = 100;
|
||||||
|
};
|
||||||
|
}
|
||||||
23
modules/system/nix-stable.nix
Normal file
23
modules/system/nix-stable.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixVersions.latest;
|
||||||
|
|
||||||
|
settings = rec {
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org?priority=10"
|
||||||
|
"https://lava.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"lava.cachix.org-1:8lTWI/3IKWHByzzYHZySunMPYs2eAJw2duL+uLZkSy0="
|
||||||
|
];
|
||||||
|
trusted-substituters = substituters;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
programs.nh.enable = true;
|
||||||
|
}
|
||||||
28
modules/system/nix.nix
Normal file
28
modules/system/nix.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, inputs, pkgs, ... }: {
|
||||||
|
nix = {
|
||||||
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
|
package = pkgs.nixVersions.latest;
|
||||||
|
|
||||||
|
settings = rec {
|
||||||
|
extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org?priority=10"
|
||||||
|
"https://lava.cachix.org"
|
||||||
|
"https://nix-gaming.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"lava.cachix.org-1:8lTWI/3IKWHByzzYHZySunMPYs2eAJw2duL+uLZkSy0="
|
||||||
|
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||||
|
];
|
||||||
|
trusted-substituters = substituters;
|
||||||
|
trusted-users = [ "root" "rin" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
programs.nh.enable = true;
|
||||||
|
}
|
||||||
26
modules/system/packages-gui.nix
Normal file
26
modules/system/packages-gui.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
config = lib.mkIf config.me.gui {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
android-tools
|
||||||
|
gparted
|
||||||
|
nautilus
|
||||||
|
];
|
||||||
|
hardware.graphics.extraPackages = with pkgs; [
|
||||||
|
intel-vaapi-driver
|
||||||
|
libva-vdpau-driver
|
||||||
|
libvdpau-va-gl
|
||||||
|
];
|
||||||
|
hardware.opentabletdriver.enable = true;
|
||||||
|
hardware.keyboard.qmk.enable = true;
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.steam.override {
|
||||||
|
extraPkgs = pkgs: with pkgs; [
|
||||||
|
gsettings-desktop-schemas
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.dbus.packages = [ pkgs.dconf pkgs.gcr ];
|
||||||
|
services.gnome.sushi.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
25
modules/system/packages.nix
Normal file
25
modules/system/packages.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
imports = [ ./packages-gui.nix ];
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# ecryptfs
|
||||||
|
efibootmgr
|
||||||
|
fd
|
||||||
|
git
|
||||||
|
git-crypt
|
||||||
|
htop
|
||||||
|
jq
|
||||||
|
kitty.terminfo
|
||||||
|
libarchive
|
||||||
|
lf
|
||||||
|
msr-tools
|
||||||
|
ncdu
|
||||||
|
neovim
|
||||||
|
nfs-utils
|
||||||
|
ntfs3g
|
||||||
|
ripgrep
|
||||||
|
rsync
|
||||||
|
sshfs
|
||||||
|
wget
|
||||||
|
];
|
||||||
|
environment.variables.EDITOR = "nvim";
|
||||||
|
}
|
||||||
9
modules/system/printing.nix
Normal file
9
modules/system/printing.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.printing = {
|
||||||
|
enable = true;
|
||||||
|
drivers = with pkgs; [
|
||||||
|
epson-escpr
|
||||||
|
#me.epson-201112j
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
85
modules/system/security.nix
Normal file
85
modules/system/security.nix
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
networking.firewall =
|
||||||
|
let
|
||||||
|
iptables = "${pkgs.iptables}/bin/iptables";
|
||||||
|
genCmds = type: ''
|
||||||
|
${iptables} -${type} nixos-fw -p tcp --source 192.168.0.0/16 -j nixos-fw-accept ${if type == "D" then " || true" else ""}
|
||||||
|
${iptables} -${type} nixos-fw -p udp --source 192.168.0.0/16 -j nixos-fw-accept ${if type == "D" then " || true" else ""}
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
allowedUDPPortRanges = [ { from = 20000; to = 20100; } ];
|
||||||
|
allowedTCPPortRanges = [ { from = 20000; to = 20100; } ];
|
||||||
|
trustedInterfaces = [ "wg0" ];
|
||||||
|
logRefusedConnections = false;
|
||||||
|
|
||||||
|
extraCommands = genCmds "I";
|
||||||
|
extraStopCommands = genCmds "D";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
X11Forwarding = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hostKeys = [
|
||||||
|
{
|
||||||
|
bits = 4096;
|
||||||
|
path = "/persist/ssh_host_rsa_key";
|
||||||
|
rounds = 100;
|
||||||
|
type = "rsa";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
path = "/persist/ssh_host_ed25519_key";
|
||||||
|
rounds = 100;
|
||||||
|
type = "ed25519";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
security = {
|
||||||
|
polkit.enable = true;
|
||||||
|
sudo.enable = false;
|
||||||
|
doas = {
|
||||||
|
enable = true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
groups = [ "wheel" ];
|
||||||
|
keepEnv = true;
|
||||||
|
persist = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
pam = lib.mkIf (config.me.environment != "headless") {
|
||||||
|
u2f = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
cue = true;
|
||||||
|
pinverification = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.doas.rules.auth = {
|
||||||
|
u2f.settings.pinverification = lib.mkForce 0;
|
||||||
|
u2f_int = lib.mkMerge [
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
order = config.security.pam.services.doas.rules.auth.u2f.order + 1;
|
||||||
|
control = "sufficient";
|
||||||
|
modulePath = "${pkgs.pam_u2f}/lib/security/pam_u2f.so";
|
||||||
|
inherit (config.security.pam.u2f) settings;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
settings = lib.mkForce {
|
||||||
|
interactive = true;
|
||||||
|
pinverification = 0;
|
||||||
|
userpresence = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
17
modules/system/snapper.nix
Normal file
17
modules/system/snapper.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
services.snapper = {
|
||||||
|
cleanupInterval = "1h";
|
||||||
|
configs.home = {
|
||||||
|
FSTYPE = "btrfs";
|
||||||
|
SUBVOLUME = "/home";
|
||||||
|
TIMELINE_CLEANUP = true;
|
||||||
|
TIMELINE_CREATE = true;
|
||||||
|
TIMELINE_MIN_AGE = "1800";
|
||||||
|
TIMELINE_LIMIT_HOURLY = "5";
|
||||||
|
TIMELINE_LIMIT_DAILY = "7";
|
||||||
|
TIMELINE_LIMIT_WEEKLY = "0";
|
||||||
|
TIMELINE_LIMIT_MONTHLY = "0";
|
||||||
|
TIMELINE_LIMIT_YEARLY = "0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue