forked from pub-solar/infra
Compare commits
775 commits
Author | SHA1 | Date | |
---|---|---|---|
teutat3s | 0475cfdd6a | ||
teutat3s | 23b81b310a | ||
teutat3s | 475af2f82f | ||
teutat3s | 197ba721fe | ||
b12f | 642b35fb06 | ||
b12f | d5bbe3d0f5 | ||
teutat3s | 161ec7a7d1 | ||
teutat3s | 4e1678b1d1 | ||
teutat3s | 6acc3f7927 | ||
teutat3s | 386f2b2ba5 | ||
teutat3s | 6645e10afa | ||
teutat3s | eef268b21b | ||
teutat3s | 5192f382bc | ||
teutat3s | 3e32bfe106 | ||
teutat3s | aee317b463 | ||
teutat3s | 98b546f587 | ||
teutat3s | 42b3052091 | ||
teutat3s | 6a0b9e7e88 | ||
teutat3s | 90c8072f92 | ||
Akshay Mankar | 5076266842 | ||
b12f | eb63779bb6 | ||
b12f | acc537decd | ||
b12f | 2b72d9a5a8 | ||
b12f | 5366d07d44 | ||
teutat3s | 10f71b1959 | ||
teutat3s | 8b8833e9c9 | ||
teutat3s | 280dc37aa0 | ||
teutat3s | 3d8fe3cef2 | ||
teutat3s | 213c06ca87 | ||
teutat3s | a491680165 | ||
b12f | 1ae1f68ce2 | ||
b12f | 87f9bc92df | ||
teutat3s | 3b29b847b0 | ||
teutat3s | 4923f033f5 | ||
teutat3s | 2424a3ec8b | ||
teutat3s | b41edf0cfb | ||
teutat3s | 0d6da8d678 | ||
teutat3s | b87670d07d | ||
teutat3s | 73333537a5 | ||
teutat3s | 45d3b939bf | ||
teutat3s | 904c7ed1e4 | ||
teutat3s | ab85ba751a | ||
teutat3s | a9c5edfeb3 | ||
teutat3s | 7067d93ee2 | ||
teutat3s | e48fe612e2 | ||
teutat3s | 34ce43a5e0 | ||
teutat3s | 43b0c8d489 | ||
teutat3s | afe52ca6af | ||
teutat3s | da529b023e | ||
teutat3s | cf39137340 | ||
teutat3s | 18683d383f | ||
teutat3s | d8a793190d | ||
teutat3s | 3ec5c9f343 | ||
teutat3s | 7ba5a7bdd6 | ||
b12f | 041d311bb2 | ||
teutat3s | 9d9bcf9a15 | ||
b12f | 4434a90136 | ||
teutat3s | 472f9aa68b | ||
teutat3s | c9c2d06a98 | ||
teutat3s | 8244e605b6 | ||
teutat3s | 9d7d251369 | ||
teutat3s | 7775ad332e | ||
teutat3s | d6cc9c8164 | ||
teutat3s | 4c51eda8b6 | ||
b12f | 471d7650ff | ||
teutat3s | 9cc50ed678 | ||
teutat3s | 4309cc9cdd | ||
teutat3s | 08f5c5ce67 | ||
teutat3s | 870e81ee4c | ||
teutat3s | cef7a561f3 | ||
teutat3s | 281701b7b6 | ||
teutat3s | 90bbaad7b7 | ||
teutat3s | 6a15c09509 | ||
teutat3s | 94d7db1331 | ||
teutat3s | 633f0a4402 | ||
teutat3s | 9758aeda5d | ||
teutat3s | 2c29d27ce7 | ||
teutat3s | 31a885926b | ||
teutat3s | 0ae6bc637b | ||
teutat3s | 5300f381b0 | ||
teutat3s | 8a18ee452b | ||
teutat3s | 666de2c8f4 | ||
teutat3s | b1391521b9 | ||
teutat3s | 987c0919ca | ||
teutat3s | c39cf9c0b9 | ||
teutat3s | 3943f34c92 | ||
b12f | e85807a29b | ||
teutat3s | c53d48384a | ||
teutat3s | 9579f6adde | ||
teutat3s | 01ca3b21c2 | ||
teutat3s | d085e49925 | ||
teutat3s | 092a45e3bd | ||
teutat3s | a8d865bbca | ||
teutat3s | df2f0d4442 | ||
teutat3s | 8c8a757f8f | ||
teutat3s | 8600fc64c5 | ||
teutat3s | 37f210c96f | ||
teutat3s | d675fd8d00 | ||
teutat3s | 2e5a7bea4b | ||
b12f | 4831430455 | ||
teutat3s | 663ef8feb1 | ||
teutat3s | 63fa03e971 | ||
teutat3s | faa71b7797 | ||
teutat3s | 21a1ae15cb | ||
teutat3s | 19723f3812 | ||
teutat3s | ec5e9896fd | ||
teutat3s | 47b076e0a6 | ||
teutat3s | 02a146c507 | ||
teutat3s | 7e48428fb9 | ||
teutat3s | f4f6c14faa | ||
b12f | 1ec5bafa30 | ||
teutat3s | 02629598aa | ||
teutat3s | 44f708ec76 | ||
teutat3s | cd82b83427 | ||
teutat3s | 2d94ed5a0d | ||
teutat3s | 83e4bcd2df | ||
teutat3s | 09804f5c25 | ||
teutat3s | 2eb54a331e | ||
teutat3s | 77b642f646 | ||
teutat3s | 2e16c77956 | ||
teutat3s | e2ba1aacf4 | ||
teutat3s | 27dc20dd04 | ||
teutat3s | a0fb6a60c3 | ||
teutat3s | d2389497c2 | ||
teutat3s | c056d9c35e | ||
teutat3s | 4626fd85c0 | ||
teutat3s | c0a3d90d63 | ||
teutat3s | 1d92ef53ca | ||
teutat3s | 751d82f7e3 | ||
teutat3s | fb8ee1278a | ||
teutat3s | 66ed87e666 | ||
teutat3s | 88b76beb5c | ||
teutat3s | e857c6198b | ||
teutat3s | 998cf4c63d | ||
teutat3s | a0b52d51e5 | ||
teutat3s | 701c62dd69 | ||
teutat3s | 711347abe6 | ||
teutat3s | 13bf3f5beb | ||
teutat3s | f639fbe050 | ||
teutat3s | f236962e17 | ||
teutat3s | d32abd7a7f | ||
teutat3s | 15b507904f | ||
teutat3s | b0790876ec | ||
teutat3s | b6be95d032 | ||
teutat3s | b6070d0f75 | ||
teutat3s | 25827a97d3 | ||
teutat3s | 4a3d3ce84b | ||
teutat3s | 9eb746313e | ||
teutat3s | 83b7e3e11e | ||
teutat3s | 4ef9781d10 | ||
teutat3s | ca8e578b11 | ||
teutat3s | 49c21fe740 | ||
teutat3s | 99308bfe24 | ||
teutat3s | 50eb1d4f32 | ||
teutat3s | c0fcf2352f | ||
teutat3s | 3708d77d9b | ||
teutat3s | 7f2bfd923f | ||
teutat3s | 30d18c725a | ||
teutat3s | 387d97a2ea | ||
teutat3s | 6f2eeeb99e | ||
teutat3s | 21a28e1212 | ||
teutat3s | c3bf5df1d8 | ||
b12f | 563aa9ef46 | ||
teutat3s | 8bf1e1d1a3 | ||
teutat3s | 79679720ff | ||
teutat3s | 2b1a5d6f7f | ||
teutat3s | 5a84628e42 | ||
teutat3s | 0fc0c6d595 | ||
Benjamin Yule Bädorf | 13c381ff3d | ||
Benjamin Yule Bädorf | c59fac512e | ||
Benjamin Yule Bädorf | 68be6b9303 | ||
Benjamin Yule Bädorf | 8ce50bb73b | ||
Benjamin Yule Bädorf | cf830a9770 | ||
teutat3s | 0685d16d33 | ||
teutat3s | e1e0faa592 | ||
teutat3s | 26e96dfac5 | ||
teutat3s | 730c6ccb61 | ||
teutat3s | 35c554bbc3 | ||
teutat3s | 5e6784f21a | ||
teutat3s | dfb523133e | ||
teutat3s | 70ae84272c | ||
teutat3s | 9e2d9a06b3 | ||
teutat3s | f8f67b8908 | ||
teutat3s | 57a5ace727 | ||
teutat3s | 7ce66f38fc | ||
teutat3s | b4dd570b2d | ||
teutat3s | bdd4290e8d | ||
teutat3s | 0b0074a65b | ||
teutat3s | f5034c4e08 | ||
teutat3s | f0347b945c | ||
teutat3s | 2ebe4bd109 | ||
teutat3s | e90d923e91 | ||
teutat3s | bc9ac6011e | ||
teutat3s | 153ef69daf | ||
teutat3s | af5abfc712 | ||
teutat3s | 99f84268e7 | ||
teutat3s | f38aa289ea | ||
teutat3s | aa244087d3 | ||
teutat3s | 002f6945dc | ||
teutat3s | 02af5fb8c9 | ||
teutat3s | d21ae91c3e | ||
teutat3s | 2a9686798f | ||
teutat3s | c18a9da4e9 | ||
teutat3s | b687997390 | ||
teutat3s | bc3752683b | ||
teutat3s | 1ae6d9ecfe | ||
teutat3s | e2691988bf | ||
teutat3s | d3fedd84e9 | ||
teutat3s | d8866860d5 | ||
teutat3s | e127c668f6 | ||
teutat3s | ba76973cc5 | ||
teutat3s | 6ea916603c | ||
teutat3s | bae41b07a8 | ||
teutat3s | 3b865a688c | ||
teutat3s | eaed05c834 | ||
teutat3s | 9707edf2de | ||
teutat3s | 2fdfd3b80e | ||
teutat3s | 4350cbf7c4 | ||
teutat3s | b93608a8fa | ||
teutat3s | 6143f56c01 | ||
teutat3s | 008e14f2d2 | ||
teutat3s | 509a40b829 | ||
teutat3s | 6aa18b0a2c | ||
teutat3s | 10ed117dfe | ||
teutat3s | e93a56e594 | ||
teutat3s | 27c239b985 | ||
teutat3s | 61ea0ad7c2 | ||
teutat3s | 8f1b932fdc | ||
teutat3s | 56f692740e | ||
teutat3s | 0286719dce | ||
teutat3s | 20ebf92f1f | ||
teutat3s | a10027ed21 | ||
teutat3s | 8f46e22636 | ||
teutat3s | 0038be3d2c | ||
teutat3s | 9a9dccf5bb | ||
teutat3s | fcd9af314e | ||
teutat3s | c5dfb472f8 | ||
teutat3s | 9d8026a31a | ||
teutat3s | 1ca1168d7a | ||
teutat3s | a3f7afd7a0 | ||
teutat3s | a424152f94 | ||
teutat3s | b6f64a1e04 | ||
teutat3s | 9635367c82 | ||
Benjamin Yule Bädorf | 3bcdd33b5a | ||
Hendrik Sokolowski | af233793fb | ||
teutat3s | 6d8d34123f | ||
teutat3s | 2b873f8d3e | ||
teutat3s | 941eff6d87 | ||
teutat3s | b039dec111 | ||
teutat3s | 5aa1276e85 | ||
teutat3s | cc70a740a1 | ||
teutat3s | 866785ef47 | ||
teutat3s | 692c152406 | ||
teutat3s | e71cbfc461 | ||
Hendrik Sokolowski | 946585d1ca | ||
teutat3s | 2eeef069a2 | ||
teutat3s | 1235a4f878 | ||
teutat3s | 9113f995e9 | ||
teutat3s | 04ee83737d | ||
teutat3s | a86ce80c47 | ||
teutat3s | 708cf947de | ||
teutat3s | c015a1ec2e | ||
teutat3s | 39221b3874 | ||
teutat3s | d7a6da30f5 | ||
teutat3s | 67b9b84e01 | ||
teutat3s | 0cb89a9fe8 | ||
teutat3s | 47c9424459 | ||
teutat3s | e52324209f | ||
teutat3s | bd4241e71d | ||
teutat3s | d1a68a7c13 | ||
teutat3s | 9245fa6797 | ||
teutat3s | a8a8155114 | ||
Pablo Ovelleiro Corral | 11f5557a7a | ||
Pablo Ovelleiro Corral | 2679b897a0 | ||
Pablo Ovelleiro Corral | 8b7f547276 | ||
Pablo Ovelleiro Corral | 7e2bcfc5cf | ||
teutat3s | f9f2b45611 | ||
teutat3s | ece7c42efc | ||
teutat3s | f329fbe26d | ||
teutat3s | c2df933174 | ||
teutat3s | 091256b67a | ||
teutat3s | 05be0ab39d | ||
teutat3s | 71f2b70725 | ||
teutat3s | c856130766 | ||
teutat3s | 12be57b04e | ||
teutat3s | 599e69fcaf | ||
teutat3s | 2ca0bd7c3e | ||
teutat3s | affdc02afe | ||
teutat3s | 5bfb7de44b | ||
teutat3s | 1184fcedb3 | ||
b12f | c7f6810e6c | ||
teutat3s | d47e1b9e2e | ||
teutat3s | a5de110181 | ||
Benjamin Yule Bädorf | 68278ad983 | ||
teutat3s | aa7ab4bc6b | ||
teutat3s | ff9703e542 | ||
teutat3s | 9a3a00d25f | ||
teutat3s | a91ff24a7d | ||
teutat3s | 5ffde90324 | ||
teutat3s | def76f8776 | ||
teutat3s | c738f2d41f | ||
Pablo Ovelleiro Corral | 512ab12de1 | ||
teutat3s | 477e419312 | ||
b12f | 667824928b | ||
Benjamin Yule Bädorf | ef94681e11 | ||
Pablo Ovelleiro Corral | c7b743e4dd | ||
teutat3s | f18fee25e4 | ||
Hendrik Sokolowski | fee6ce74c7 | ||
Hendrik Sokolowski | a278c178b0 | ||
Hendrik Sokolowski | 75c7e2dcf5 | ||
teutat3s | 41798a1cd6 | ||
Hendrik Sokolowski | 10c86c6b20 | ||
Hendrik Sokolowski | 1d6c5003e8 | ||
Hendrik Sokolowski | fef1874938 | ||
Hendrik Sokolowski | c74394449d | ||
Benjamin Yule Bädorf | d280b29394 | ||
Benjamin Yule Bädorf | c49e47dc30 | ||
teutat3s | 5e34acd765 | ||
teutat3s | 2fa3ccf28e | ||
teutat3s | 505d0f34ea | ||
teutat3s | ddc5c65bf7 | ||
teutat3s | a11255b433 | ||
teutat3s | d62b6cda92 | ||
teutat3s | c580fe0fbb | ||
teutat3s | 60aef1d038 | ||
teutat3s | fa9ce9d435 | ||
teutat3s | 9541e5029e | ||
teutat3s | c4d0d34807 | ||
teutat3s | d5fe65b60d | ||
teutat3s | 0e7dc95250 | ||
teutat3s | c86e22b292 | ||
Hendrik Sokolowski | 4992819742 | ||
Hendrik Sokolowski | a9411d05a8 | ||
teutat3s | e8530caf1d | ||
teutat3s | 7c492e7391 | ||
teutat3s | a0c6f0dc08 | ||
teutat3s | 46c7c9ecb1 | ||
teutat3s | fb4004e9f0 | ||
teutat3s | 3030b0f84d | ||
teutat3s | c07d24f6a7 | ||
teutat3s | 0f297c4711 | ||
teutat3s | 679d9b236f | ||
teutat3s | 78d5e5a4f0 | ||
teutat3s | c768203bed | ||
teutat3s | b0c466869e | ||
teutat3s | b6a54efd9a | ||
Benjamin Yule Bädorf | 7e145040cc | ||
b12f | 9d94b888ae | ||
teutat3s | 8a9fe3b8fe | ||
teutat3s | 8743ea7b0c | ||
b12f | 8743b50f7f | ||
Benjamin Yule Bädorf | 316ba9ef53 | ||
teutat3s | afca75441c | ||
teutat3s | 9698c47530 | ||
teutat3s | ccb029dde3 | ||
teutat3s | 41e4d3427c | ||
teutat3s | 16e9d476cb | ||
teutat3s | 3caf085d0b | ||
teutat3s | c5159dd66d | ||
teutat3s | b27f8c1380 | ||
b12f | 76ca43142a | ||
Benjamin Yule Bädorf | 16c6aa3b61 | ||
teutat3s | 315cbf5813 | ||
b12f | 9191729f5c | ||
Hendrik Sokolowski | b6b8d69852 | ||
b12f | 4380c3b0ab | ||
Benjamin Yule Bädorf | e618b9f9c2 | ||
b12f | ae0c90e4f8 | ||
Benjamin Yule Bädorf | d7c9333ff4 | ||
teutat3s | 18a62b8d35 | ||
Hendrik Sokolowski | 9ec77e2a30 | ||
b12f | 1bcb8bb7e0 | ||
Akshay Mankar | cf1e6f8134 | ||
b12f | 83e293016f | ||
Benjamin Yule Bädorf | 91a2b66134 | ||
b12f | 2851273d18 | ||
Benjamin Yule Bädorf | b1519c8f22 | ||
Benjamin Yule Bädorf | f7eaef0d18 | ||
b12f | 51523439e7 | ||
Benjamin Yule Bädorf | 48845d6cf6 | ||
Hendrik Sokolowski | c53adf51f7 | ||
Benjamin Yule Bädorf | a795f0824f | ||
Benjamin Yule Bädorf | 83125ae472 | ||
teutat3s | 147ed44b9a | ||
Benjamin Yule Bädorf | 621e9336ed | ||
Benjamin Yule Bädorf | eacf60974c | ||
b12f | 6748e44824 | ||
teutat3s | 815dccc0b4 | ||
b12f | dda8ed6938 | ||
Benjamin Yule Bädorf | 9433a8aea7 | ||
b12f | 37ebcb3669 | ||
b12f | 6aea728583 | ||
b12f | a5e72f9cc7 | ||
Benjamin Yule Bädorf | b9cffad02a | ||
Benjamin Yule Bädorf | 2bb2247716 | ||
teutat3s | ef943f02e3 | ||
teutat3s | 45e91d7ef1 | ||
teutat3s | e33529ad4b | ||
b12f | 1f8e53053b | ||
Benjamin Yule Bädorf | c8c10269c4 | ||
teutat3s | 27116f053a | ||
teutat3s | b76b7821a7 | ||
teutat3s | 14e689486b | ||
teutat3s | c49ffb2d5b | ||
b12f | aa607396e4 | ||
Benjamin Yule Bädorf | de04556191 | ||
Benjamin Yule Bädorf | 0e89b7f210 | ||
b12f | 1878595af2 | ||
Benjamin Yule Bädorf | 24b77b6de5 | ||
Akshay Mankar | 50fa98eebb | ||
Akshay Mankar | f7d7964299 | ||
Akshay Mankar | afcfb4fe0f | ||
Akshay Mankar | bbc01be474 | ||
teutat3s | 0bf113e3a9 | ||
teutat3s | 842ec945f4 | ||
teutat3s | d67190d175 | ||
teutat3s | 840a250278 | ||
teutat3s | b54ff7d6bf | ||
teutat3s | 700173a874 | ||
teutat3s | f43ba01ee6 | ||
teutat3s | fcc74784ea | ||
teutat3s | bf0ab84979 | ||
teutat3s | 4f558e8a9b | ||
teutat3s | 0deb8eb6be | ||
teutat3s | e007b034ed | ||
teutat3s | 4eb78dd94f | ||
teutat3s | 4ce188edec | ||
teutat3s | 62c248348a | ||
teutat3s | 27c0cbabf4 | ||
teutat3s | 031bab4a4e | ||
teutat3s | 33d80dc558 | ||
teutat3s | 576ceb6875 | ||
teutat3s | 101cc3a9d2 | ||
teutat3s | 507c088316 | ||
teutat3s | b2e845876a | ||
teutat3s | 69b976607f | ||
teutat3s | 62429bca08 | ||
teutat3s | 3cfdd9d20a | ||
teutat3s | 2f75ae7e62 | ||
teutat3s | 750d73a22b | ||
teutat3s | 9e80c52965 | ||
teutat3s | 3c7a434b0d | ||
teutat3s | 815033c764 | ||
teutat3s | 0c5a42cb67 | ||
teutat3s | a335dcf8f5 | ||
teutat3s | 0ac447f6f5 | ||
teutat3s | 766a2770d8 | ||
teutat3s | b3b3725c9f | ||
teutat3s | be668fbb17 | ||
teutat3s | e527120879 | ||
b12f | 3ab82b814c | ||
teutat3s | ffdf55993f | ||
teutat3s | 94ae6c9302 | ||
teutat3s | ebc34e50bc | ||
teutat3s | 67ff6f8656 | ||
b12f | 28e77fa6ce | ||
teutat3s | 5590b5b1b3 | ||
teutat3s | 95f224a9b7 | ||
teutat3s | 8d06c61d2f | ||
teutat3s | 1d018ade9b | ||
teutat3s | 05f7dbe262 | ||
teutat3s | 1c05fd39a4 | ||
teutat3s | a7f98c2d45 | ||
teutat3s | a59e9cb6ea | ||
b12f | 99ff776932 | ||
teutat3s | f2217a1409 | ||
Hendrik Sokolowski | 0fe02a9f73 | ||
Hendrik Sokolowski | b37ad608a4 | ||
teutat3s | 5e3a4b159f | ||
b12f | 737f6ec35d | ||
teutat3s | 2da3aecfbe | ||
teutat3s | f993c0a94a | ||
Benjamin Bädorf | 9cf04fd710 | ||
teutat3s | 9bde9237d2 | ||
teutat3s | e3f00b7d19 | ||
teutat3s | 7e8f3c8cf5 | ||
teutat3s | 92c606b28f | ||
teutat3s | afca5c3735 | ||
teutat3s | e97ce6d40f | ||
teutat3s | e1cab88e3d | ||
teutat3s | 7cc3a261ed | ||
teutat3s | 2e2ca2fc82 | ||
teutat3s | a310b414f7 | ||
teutat3s | 768d4c78bc | ||
teutat3s | a56f8d2a00 | ||
teutat3s | 14fa3fdec2 | ||
teutat3s | c48a405e44 | ||
teutat3s | 4de835127f | ||
teutat3s | 17baf5aa2f | ||
teutat3s | e6177069ab | ||
teutat3s | 4562bda0bf | ||
teutat3s | efb789d658 | ||
teutat3s | 294f3b7836 | ||
teutat3s | e8bab677db | ||
teutat3s | f0fb575c81 | ||
teutat3s | d734adce58 | ||
teutat3s | e3d4f61a42 | ||
teutat3s | 10bb3295de | ||
teutat3s | e8cf4dceb0 | ||
teutat3s | 1b9a6bb0c2 | ||
teutat3s | 219b67df20 | ||
teutat3s | 6c1fa290e8 | ||
teutat3s | d5b59ea18a | ||
teutat3s | fdda65eea9 | ||
teutat3s | 0e290f080e | ||
teutat3s | 6b15d72d85 | ||
teutat3s | 35487b53c7 | ||
teutat3s | 2f7eccc970 | ||
teutat3s | 630723516d | ||
teutat3s | 8dc908aabd | ||
teutat3s | 6f0801d419 | ||
teutat3s | efe31cadd9 | ||
teutat3s | ebc7abf685 | ||
teutat3s | e4c4644a8e | ||
teutat3s | 6bfeb835c2 | ||
Benjamin Bädorf | 97a592a53e | ||
teutat3s | a3ce107c73 | ||
teutat3s | ac582d3f6f | ||
teutat3s | 75e4179f42 | ||
teutat3s | 21e620a12c | ||
teutat3s | caaab0e14d | ||
teutat3s | 5c664a0401 | ||
teutat3s | 3ac327a750 | ||
teutat3s | 790848ef69 | ||
Akshay Mankar | 75270321d5 | ||
teutat3s | becaa9d649 | ||
teutat3s | 37528c0874 | ||
teutat3s | 1cfe140e77 | ||
teutat3s | 038d80a801 | ||
teutat3s | f911ac7bad | ||
teutat3s | 904a73b51d | ||
teutat3s | 35a4ac5619 | ||
teutat3s | 3e7af270c1 | ||
teutat3s | 7cf6f51516 | ||
teutat3s | 2ee4bc5682 | ||
Benjamin Bädorf | 1d3934693b | ||
teutat3s | 4d7e1c3c94 | ||
teutat3s | 46861d61a2 | ||
teutat3s | ad2eb1fa16 | ||
Akshay Mankar | 2cbc46c154 | ||
teutat3s | 9f633582d1 | ||
Akshay Mankar | ccbfb211fd | ||
Akshay Mankar | 8a2d946206 | ||
Akshay Mankar | 35afcd9682 | ||
Akshay Mankar | fe284a20d9 | ||
Akshay Mankar | f0c3178b4d | ||
Akshay Mankar | 7fcefe4b85 | ||
Akshay Mankar | 8a2f83c96a | ||
Akshay Mankar | 6d39ccc6d4 | ||
Akshay Mankar | a2e7adbc79 | ||
Akshay Mankar | 569bb5f875 | ||
Akshay Mankar | e12b3d5c40 | ||
teutat3s | a9ac74efc6 | ||
teutat3s | 7037abb8f3 | ||
teutat3s | 353d24e643 | ||
teutat3s | 5f7e8108c2 | ||
teutat3s | 8bc731da6e | ||
teutat3s | 40ed46b05b | ||
teutat3s | e41127593b | ||
b12f | 7d58094d23 | ||
teutat3s | a461fc72f6 | ||
b12f | 62d751e7bd | ||
b12f | aa23765ff3 | ||
teutat3s | 2195b7ed0a | ||
teutat3s | 37176a52ce | ||
teutat3s | eeb15c93fc | ||
teutat3s | b7657db2cb | ||
teutat3s | 4861593b25 | ||
teutat3s | d26b3c12f4 | ||
teutat3s | c88a0608f6 | ||
teutat3s | f213f93085 | ||
Benjamin Bädorf | 33e003d4b4 | ||
teutat3s | 38a6e5e084 | ||
teutat3s | 50e84225c3 | ||
teutat3s | 7d68dec709 | ||
b12f | 0e83deff1b | ||
teutat3s | da393fa1ed | ||
teutat3s | 3104253b89 | ||
teutat3s | 31002fbf11 | ||
teutat3s | f2364b314a | ||
b12f | f5185e5c15 | ||
b12f | 6642a69ca4 | ||
teutat3s | 25549fdc53 | ||
b12f | e3650e2ecd | ||
teutat3s | d5922ff2b8 | ||
teutat3s | 3e0af35c75 | ||
teutat3s | 9c1d19d49f | ||
teutat3s | 43512ae6e7 | ||
teutat3s | 1bd7e5c0e7 | ||
teutat3s | f24a29196c | ||
teutat3s | 7be3567e6d | ||
b12f | 7cc7517d9c | ||
teutat3s | 72badc7283 | ||
b12f | e1827c7fc6 | ||
teutat3s | e041f05505 | ||
b12f | ef56e0f206 | ||
teutat3s | c66846d148 | ||
teutat3s | dbc99864df | ||
teutat3s | b8e213d626 | ||
b12f | fda21f8633 | ||
Benjamin Bädorf | b085c2e2b2 | ||
Benjamin Bädorf | 6fa03994b1 | ||
b12f | 8f603dad45 | ||
Benjamin Bädorf | d69e0350ef | ||
Benjamin Bädorf | 07df547f33 | ||
b12f | 77a4460a36 | ||
teutat3s | 428fcab009 | ||
teutat3s | f576c7385d | ||
Benjamin Bädorf | c8233cf6a7 | ||
Benjamin Bädorf | 052d752d27 | ||
Benjamin Bädorf | e8f72b6cf7 | ||
Benjamin Bädorf | 20fbcbb571 | ||
Benjamin Bädorf | 841757517f | ||
Benjamin Bädorf | 42fbde31e5 | ||
Benjamin Bädorf | e7c70c6cd0 | ||
teutat3s | a63e0e2154 | ||
teutat3s | 487e12015a | ||
teutat3s | 6a96345760 | ||
b12f | 62e1e0cddc | ||
Benjamin Bädorf | e8ad662631 | ||
b12f | 65a660117a | ||
Benjamin Bädorf | d011cb04e1 | ||
Akshay Mankar | a9beccc31f | ||
Benjamin Bädorf | 633549159e | ||
b12f | 90b0fb53e6 | ||
b12f | b8fb9fd867 | ||
teutat3s | b9e18a167c | ||
teutat3s | cd1fa3daef | ||
teutat3s | 7a7e4ba4b4 | ||
teutat3s | 9fc42c44a8 | ||
teutat3s | 92996fb0c0 | ||
Benjamin Bädorf | cb26fa3d00 | ||
Benjamin Bädorf | 1db27813dd | ||
teutat3s | a7b3490c15 | ||
teutat3s | 6f9df4d6c3 | ||
teutat3s | 505602bd73 | ||
teutat3s | 9898e35208 | ||
teutat3s | 5f32669fe8 | ||
Benjamin Bädorf | edc76ebb1b | ||
teutat3s | e28cedb274 | ||
Benjamin Bädorf | 8e5f5d425c | ||
Benjamin Bädorf | fe6edd54b1 | ||
b12f | 4c874dae4a | ||
teutat3s | 94c7b6d7db | ||
teutat3s | 67c3be1c43 | ||
Benjamin Bädorf | f013c6e3f8 | ||
Benjamin Bädorf | a10d77dcf6 | ||
Benjamin Bädorf | 13d46c22c5 | ||
Benjamin Bädorf | 2c2d77456e | ||
Benjamin Bädorf | 7b4b79f5d4 | ||
Benjamin Bädorf | 8ad19f72fc | ||
b12f | 90c6108b8f | ||
Benjamin Bädorf | 7a3b9a8cef | ||
Benjamin Bädorf | c718eff9d6 | ||
teutat3s | bafa56ea57 | ||
teutat3s | 20277f23ff | ||
Akshay Mankar | 9cf2ba9d67 | ||
teutat3s | cc24383f23 | ||
teutat3s | 0cc3926aac | ||
teutat3s | 73f9d84b31 | ||
b12f | f55820414e | ||
teutat3s | 4897317f4f | ||
teutat3s | f48782e987 | ||
teutat3s | b61eb12325 | ||
b12f | b47bfc13d3 | ||
Benjamin Bädorf | 4d50282ab3 | ||
Benjamin Bädorf | 42879bde05 | ||
Benjamin Bädorf | 569ff3ee03 | ||
Benjamin Bädorf | d2c6756371 | ||
Benjamin Bädorf | a14af74d82 | ||
Benjamin Bädorf | f33a7c48e7 | ||
Hendrik Sokolowski | 1577462c94 | ||
Benjamin Bädorf | c187b59bd7 | ||
Benjamin Bädorf | 422b1ba33e | ||
Benjamin Bädorf | 41c5f1797c | ||
Benjamin Bädorf | c6453f2631 | ||
Benjamin Bädorf | 8a2889fd46 | ||
Benjamin Bädorf | b42917de78 | ||
Benjamin Bädorf | ac817a7ca2 | ||
Akshay Mankar | 83bcb225f3 | ||
Benjamin Bädorf | 25f4c8d296 | ||
Benjamin Bädorf | 3cb548d77a | ||
Hendrik Sokolowski | ea7996ce0a | ||
Benjamin Bädorf | ece8e9156a | ||
Benjamin Bädorf | 9244a42a20 | ||
Benjamin Bädorf | 1425492e19 | ||
Benjamin Bädorf | 8737ddbe6c | ||
Benjamin Bädorf | db77fcc378 | ||
Akshay Mankar | eaf99a2d78 | ||
Akshay Mankar | 0fa32ec92f | ||
teutat3s | 5aa4f8b947 | ||
teutat3s | e859cbbc10 | ||
Benjamin Bädorf | f1fc31eea7 | ||
Benjamin Bädorf | b7d0e23703 | ||
Akshay Mankar | 7bbccd855f | ||
teutat3s | e9ef6be915 | ||
teutat3s | f168a5393f | ||
teutat3s | 688f9279d1 | ||
Benjamin Bädorf | 531c3554ef | ||
b12f | a601ae4606 | ||
Benjamin Bädorf | b8431f595e | ||
teutat3s | 2916ca4cd3 | ||
Akshay Mankar | 4d0ddf6fb1 | ||
b12f | 15d6d0d64e | ||
Benjamin Bädorf | b311b513d0 | ||
Benjamin Bädorf | cda39f5e2a | ||
b12f | f49eb67d67 | ||
teutat3s | 620c1715b4 | ||
Benjamin Bädorf | 4f7b30c2c3 | ||
Benjamin Bädorf | 806e9dde34 | ||
Benjamin Bädorf | 16a5ee93cc | ||
Benjamin Bädorf | ce24876f3d | ||
Benjamin Bädorf | 5139cbe2db | ||
b12f | a02d1ee5b2 | ||
teutat3s | 347d175a8a | ||
teutat3s | 310723a18c | ||
teutat3s | 401baf5900 | ||
teutat3s | e9fc2dabbe | ||
Benjamin Bädorf | 8da5f0b48a | ||
teutat3s | 8b09f19add | ||
Benjamin Bädorf | 8e07034aad | ||
Benjamin Bädorf | d27328fd1f | ||
teutat3s | 6f4741fae0 | ||
teutat3s | 1983edcc5b | ||
teutat3s | b718a29d3a | ||
teutat3s | d4ab1756b3 | ||
Hendrik Sokolowski | 1d68ed73c3 | ||
teutat3s | 8a0ac64eac | ||
teutat3s | f804de372c | ||
teutat3s | c162d46094 | ||
teutat3s | 1e19efe20e | ||
teutat3s | 5ffc4f67ff | ||
b12f | a35969e8e4 | ||
teutat3s | 6408288049 | ||
teutat3s | 0944b2d11c | ||
teutat3s | e43cb021ce | ||
teutat3s | 65689ae524 | ||
teutat3s | 2135a5e841 | ||
hensoko | 0f527e3f41 | ||
hensoko | 5dcbb8e526 | ||
Benjamin Bädorf | c56f11a034 | ||
Hendrik Sokolowski | 6630dd8ce6 | ||
Hendrik Sokolowski | 05b880da4b | ||
hensoko | 1fde142895 | ||
Hendrik Sokolowski | 710b81c94c | ||
b12f | f0eb3fd4f4 | ||
teutat3s | 3690b3cf9d | ||
b12f | 14c647e8f7 | ||
teutat3s | a5b32302c1 | ||
teutat3s | 3c9f9c9fc7 | ||
Akshay Mankar | 49890bc53d | ||
Akshay Mankar | fcc2115c0b | ||
Akshay Mankar | c42fadab6d | ||
Akshay Mankar | bdc5033bf4 | ||
b12f | 44f301c772 | ||
Benjamin Bädorf | 8aee160fd1 | ||
Benjamin Bädorf | b921201645 | ||
Akshay Mankar | 41d6c334bc | ||
teutat3s | b6f75c2c27 | ||
teutat3s | e7febf5403 | ||
Akshay Mankar | c23bc00f19 | ||
Akshay Mankar | 5a7d81d787 | ||
Akshay Mankar | c9beea7f82 | ||
teutat3s | 3ceec80aab | ||
Akshay Mankar | b788a9f383 | ||
b12f | 02e570c85a | ||
Akshay Mankar | e0c6530d97 | ||
b12f | 41b85714a6 | ||
Akshay Mankar | d8e0bbb43b | ||
b12f | 6cf680a2df | ||
Akshay Mankar | d935c946b5 | ||
Akshay Mankar | de553e6c7b | ||
Akshay Mankar | 5554b5191e | ||
b12f | f28fb83e5e | ||
Akshay Mankar | 8b85ee7778 |
43
.editorconfig
Normal file
43
.editorconfig
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Editor configuration, see http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Ignore diffs/patches
|
||||
[*.{diff,patch}]
|
||||
end_of_line = unset
|
||||
insert_final_newline = unset
|
||||
trim_trailing_whitespace = unset
|
||||
indent_size = unset
|
||||
charset = unset
|
||||
indent_style = unset
|
||||
indent_size = unset
|
||||
|
||||
[{.*,secrets}/**]
|
||||
end_of_line = false
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = unset
|
||||
charset = unset
|
||||
indent_style = unset
|
||||
indent_size = unset
|
||||
|
||||
[*.rom]
|
||||
end_of_line = unset
|
||||
insert_final_newline = unset
|
||||
trim_trailing_whitespace = unset
|
||||
charset = unset
|
||||
indent_style = unset
|
||||
indent_size = unset
|
||||
|
||||
[*.py]
|
||||
indent_size = 4
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
37
.forgejo/workflows/check.yml
Normal file
37
.forgejo/workflows/check.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: Flake checks
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
Check:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
nix --accept-flake-config --access-tokens '' develop --command treefmt --ci
|
||||
|
||||
- name: Run flake checks
|
||||
run: |
|
||||
set -exuo pipefail
|
||||
# Prevent cache garbage collection by creating GC roots
|
||||
mkdir -p /var/lib/gitea-runner/tankstelle/.local/state/nix/results
|
||||
|
||||
for target in $(nix flake show --json --all-systems | jq --raw-output '
|
||||
.["nixosConfigurations"] |
|
||||
to_entries[] |
|
||||
.key'
|
||||
); do
|
||||
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
|
||||
build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
|
||||
done
|
||||
|
||||
for check in $(nix flake show --json --all-systems | jq --raw-output '
|
||||
.checks."x86_64-linux" |
|
||||
to_entries[] |
|
||||
.key'
|
||||
); do
|
||||
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
|
||||
build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$check" ".#checks.x86_64-linux.${check}"
|
||||
done
|
4
.git-blame-ignore-revs
Normal file
4
.git-blame-ignore-revs
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Apply treewide formatting with treefmt
|
||||
2ca0bd7c3e743e699edb6e9c09d48b7c9106a64d
|
||||
# Apply treewide formatting with nixpkgs-fmt
|
||||
815033c764660e1468b1564a02570bad0f84f77a
|
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,2 +1,7 @@
|
|||
*.tf.json
|
||||
/tags.*
|
||||
.direnv
|
||||
.terraform
|
||||
*.plan
|
||||
result
|
||||
results
|
||||
|
|
35
CONTRIBUTING.md
Normal file
35
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Contributing guide
|
||||
|
||||
Things you'll need:
|
||||
|
||||
- To create [Pull Requests](https://forgejo.org/docs/latest/user/pull-requests-and-git-flow/), you will need to register your [pub.solar ID](https://auth.pub.solar) first.
|
||||
- For small changes, e.g. to documentation, you can directly edit files in the browser.
|
||||
|
||||
### Getting a development shell
|
||||
|
||||
First, get a local copy of this repository:
|
||||
|
||||
```
|
||||
git clone https://git.pub.solar/pub-solar/infra.git
|
||||
cd infra
|
||||
```
|
||||
|
||||
then, install [the package manager nix](https://nixos.org/download).
|
||||
|
||||
Finally, run:
|
||||
|
||||
```
|
||||
nix develop
|
||||
```
|
||||
|
||||
This will install a development shell (devshell) with all required tools.
|
||||
|
||||
### Final checks before creating a Pull Request
|
||||
|
||||
Before creating a pull request, it's recommended to check the formatting:
|
||||
|
||||
```
|
||||
treefmt
|
||||
```
|
||||
|
||||
If you are a terminal-lover, the [AGit alternative](https://forgejo.org/docs/latest/user/agit-support/) to the web based Pull Request workflow might be interesting.
|
660
LICENSE.md
Normal file
660
LICENSE.md
Normal file
|
@ -0,0 +1,660 @@
|
|||
### GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
<https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
### Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains
|
||||
free software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing
|
||||
under this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
### TERMS AND CONDITIONS
|
||||
|
||||
#### 0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a "modified version" of
|
||||
the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
#### 1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for
|
||||
making modifications to it. "Object code" means any non-source form of
|
||||
a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
#### 2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
||||
it unnecessary.
|
||||
|
||||
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
#### 4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
#### 5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
- a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
- b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under
|
||||
section 7. This requirement modifies the requirement in section 4
|
||||
to "keep intact all notices".
|
||||
- c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
- d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
#### 6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
- a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
- b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the Corresponding
|
||||
Source from a network server at no charge.
|
||||
- c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
- d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
- e) Convey the object code using peer-to-peer transmission,
|
||||
provided you inform other peers where the object code and
|
||||
Corresponding Source of the work are being offered to the general
|
||||
public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
"normally used" refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
#### 7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
- a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
- b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
- c) Prohibiting misrepresentation of the origin of that material,
|
||||
or requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
- d) Limiting the use for publicity purposes of names of licensors
|
||||
or authors of the material; or
|
||||
- e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
- f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions
|
||||
of it) with contractual assumptions of liability to the recipient,
|
||||
for any liability that these contractual assumptions directly
|
||||
impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
#### 8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
#### 9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
#### 10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
#### 11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
#### 12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree to
|
||||
terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
#### 13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your
|
||||
version supports such interaction) an opportunity to receive the
|
||||
Corresponding Source of your version by providing access to the
|
||||
Corresponding Source from a network server at no charge, through some
|
||||
standard or customary means of facilitating copying of software. This
|
||||
Corresponding Source shall include the Corresponding Source for any
|
||||
work covered by version 3 of the GNU General Public License that is
|
||||
incorporated pursuant to the following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
#### 14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Affero General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever
|
||||
published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
#### 15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
#### 16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
#### 17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
### How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively state
|
||||
the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper
|
||||
mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for
|
||||
the specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. For more information on this, and how to apply and follow
|
||||
the GNU AGPL, see <https://www.gnu.org/licenses/>.
|
11
README.md
Normal file
11
README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# The pub.solar infrastructure
|
||||
|
||||
This repository contains almost all of the configuration for the whole pub.solar infrastructure. Our goal is to have everything, from host configurations to Terraform DNS in this repository.
|
||||
|
||||
The architecture we are working towards is a vast simplification of what it was before: one dedicated Hetzner server running [NixOS](https://nixos.org/) with all services. Offsite backups go to several different locations with [restic](https://github.com/restic/restic).
|
||||
|
||||
## Contributing
|
||||
|
||||
If you'd like to contribute, it makes sense to talk to the crew on Matrix via [#hakken](https://matrix.to/#/#hakken:pub.solar?via=chat.pub.solar). We can help figuring out how things work and can make sure your ideas fit the pub.solar philosophy. Of course [popping a pull request](https://forgejo.org/docs/latest/user/pull-requests-and-git-flow/) is always celebrated.
|
||||
|
||||
To start, check our [contributing guide](./CONTRIBUTING.md).
|
157
dns.nix
157
dns.nix
|
@ -1,157 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
# https://registry.terraform.io/providers/namecheap/namecheap/latest/docs
|
||||
resource."namecheap_domain_records"."pub-solar" = {
|
||||
domain = "pub.solar";
|
||||
mode = "OVERWRITE";
|
||||
email_type = "MX";
|
||||
|
||||
record = [
|
||||
{
|
||||
hostname = "flora-6";
|
||||
type = "CNAME";
|
||||
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "auth";
|
||||
type = "CNAME";
|
||||
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "ci";
|
||||
type = "CNAME";
|
||||
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "git";
|
||||
type = "CNAME";
|
||||
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "stream";
|
||||
type = "CNAME";
|
||||
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "list";
|
||||
type = "A";
|
||||
address = "80.71.153.210";
|
||||
}
|
||||
{
|
||||
hostname = "obs-portal";
|
||||
type = "CNAME";
|
||||
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "vpn";
|
||||
type = "CNAME";
|
||||
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "cache";
|
||||
type = "A";
|
||||
address = "95.217.225.160";
|
||||
}
|
||||
{
|
||||
hostname = "factorio";
|
||||
type = "A";
|
||||
address = "80.244.242.2";
|
||||
}
|
||||
{
|
||||
hostname = "collabora";
|
||||
type = "A";
|
||||
address = "95.217.225.160";
|
||||
}
|
||||
{
|
||||
hostname = "@";
|
||||
type = "ALIAS";
|
||||
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
ttl = 300;
|
||||
}
|
||||
{
|
||||
hostname = "chat";
|
||||
type = "CNAME";
|
||||
address = "matrix.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "cloud";
|
||||
type = "CNAME";
|
||||
address = "nc-web.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "coturn";
|
||||
type = "CNAME";
|
||||
address = "nc-hpb.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "hpb";
|
||||
type = "CNAME";
|
||||
address = "nc-hpb.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "dimension";
|
||||
type = "CNAME";
|
||||
address = "matrix.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "element";
|
||||
type = "CNAME";
|
||||
address = "matrix.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "files";
|
||||
type = "CNAME";
|
||||
address = "mastodon-proxy.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "mastodon";
|
||||
type = "CNAME";
|
||||
address = "mastodon-proxy.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "matrix";
|
||||
type = "CNAME";
|
||||
address = "matrix.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "www";
|
||||
type = "CNAME";
|
||||
address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone.";
|
||||
}
|
||||
{
|
||||
hostname = "@";
|
||||
type = "TXT";
|
||||
address = "v=spf1 include:spf.greenbaum.cloud a:list.pub.solar ~all";
|
||||
}
|
||||
{
|
||||
hostname = "list";
|
||||
type = "TXT";
|
||||
address = "v=spf1 a:list.pub.solar ?all";
|
||||
}
|
||||
{
|
||||
hostname = "_dmarc";
|
||||
type = "TXT";
|
||||
address = "v=DMARC1; p=reject;";
|
||||
}
|
||||
{
|
||||
hostname = "_dmarc.list";
|
||||
type = "TXT";
|
||||
address = "v=DMARC1; p=reject;";
|
||||
}
|
||||
{
|
||||
hostname = "@";
|
||||
type = "MX";
|
||||
address = "mx2.greenbaum.cloud.";
|
||||
mx_pref = "0";
|
||||
}
|
||||
{
|
||||
hostname = "list";
|
||||
type = "MX";
|
||||
address = "list.pub.solar";
|
||||
mx_pref = "0";
|
||||
}
|
||||
# SRV records can only be changed via NameCheap Web UI
|
||||
# add comment
|
||||
];
|
||||
};
|
||||
}
|
126
docs/administrative-access.md
Normal file
126
docs/administrative-access.md
Normal file
|
@ -0,0 +1,126 @@
|
|||
# Adminstrative access
|
||||
|
||||
People with admin access to the infrastructure are added to [`logins/admins.nix`](../logins/admins.nix). This is a attrset with the following structure:
|
||||
|
||||
```
|
||||
{
|
||||
<username> = {
|
||||
sshPubKeys = {
|
||||
<name> = <pubkey-string>;
|
||||
};
|
||||
|
||||
wireguardDevices = [
|
||||
{
|
||||
publicKey = <pubkey-string>;
|
||||
allowedIPs = [ "10.7.6.<ip-address>/32" "fd00:fae:fae:fae:fae:<ip-address>::/96" ];
|
||||
}
|
||||
];
|
||||
|
||||
secretEncryptionKeys = {
|
||||
<name> = <encryption-key-string>;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
# SSH Access
|
||||
|
||||
SSH is not reachable from the open internet. Instead, SSH Port 22 is protected by a wireguard VPN network. Thus, to get root access on the servers, at least two pieces of information have to be added to the admins config:
|
||||
|
||||
1. **SSH Public key**: self-explanatory. Add your public key to your user attrset under `sshPubKeys`.
|
||||
2. **Wireguard device**: each wireguard device has two parts: the public key and the IP addresses it should have in the wireguard network. The pub.solar wireguard network uses the subnets `10.7.6.0/24` and `fd00:fae:fae:fae:fae::/80`. To add your device, it's best to choose a free number between 200 and 255 and use that in both the ipv4 and ipv6 ranges: `10.7.6.<ip-address>/32` `fd00:fae:fae:fae:fae:<ip-address>::/96`. For more information on how to generate keypairs, see [the NixOS Wireguard docs](https://nixos.wiki/wiki/WireGuard#Generate_keypair).
|
||||
|
||||
One can access our hosts using this domain scheme:
|
||||
|
||||
```
|
||||
ssh <unix-username>@<hostname>.wg.pub.solar
|
||||
```
|
||||
|
||||
So, for example for `nachtigall`:
|
||||
|
||||
```
|
||||
ssh teutat3s@nachtigall.wg.pub.solar
|
||||
```
|
||||
|
||||
Example NixOS snippet for WireGuard client config
|
||||
|
||||
```
|
||||
{
|
||||
networking = {
|
||||
wireguard.enable = true;
|
||||
wg-quick.interfaces = {
|
||||
wg-pub-solar = {
|
||||
address = ["10.7.6.201/32"];
|
||||
address = ["10.7.6.201/32" "fd00:fae:fae:fae:fae:201::/96"];
|
||||
privateKeyFile = "/etc/wireguard/wg-pub-solar.privatekey";
|
||||
|
||||
peers = [
|
||||
{ # nachtigall.pub.solar
|
||||
publicKey = "qzNywKY9RvqTnDO8eLik75/SHveaSk9OObilDzv+xkk=";
|
||||
allowedIPs = [ "10.7.6.1/32" "fd00:fae:fae:fae:fae:1::/96" ];
|
||||
endpoint = "[2a01:4f8:172:1c25::1]:51820";
|
||||
# Use this endpoint in IPv4 only networks
|
||||
#endpoint = "138.201.80.102:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
{ # metronom.pub.solar
|
||||
publicKey = "zOSYGO7MfnOOUnzaTcWiKRQM0qqxR3JQrwx/gtEtHmo=";
|
||||
allowedIPs = [ "10.7.6.3/32" "fd00:fae:fae:fae:fae:3::/96" ];
|
||||
#endpoint = "[2a01:4f8:c2c:7082::]:51820";
|
||||
# Use this endpoint in IPv4 only networks
|
||||
endpoint = "49.13.236.167:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
{ # tankstelle.pub.solar
|
||||
publicKey = "iRTlY1lB7nPXf2eXzX8ZZDkfMmXyGjff5/joccbP8Cg=";
|
||||
allowedIPs = [ "10.7.6.4/32" "fd00:fae:fae:fae:fae:4::/96" ];
|
||||
endpoint = "[2001:4d88:1ffa:26::5]:51820";
|
||||
# Use this endpoint in IPv4 only networks
|
||||
#endpoint = "80.244.242.5:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
{
|
||||
# trinkgenossin.pub.solar
|
||||
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";
|
||||
allowedIPs = [
|
||||
"10.7.6.5/32"
|
||||
"fd00:fae:fae:fae:fae:5::/96"
|
||||
];
|
||||
#endpoint = "85.215.152.22:51820";
|
||||
endpoint = "[2a01:239:35d:f500::1]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
{
|
||||
# delite.pub.solar
|
||||
publicKey = "ZT2qGWgMPwHRUOZmTQHWCRX4m14YwOsiszjsA5bpc2k=";
|
||||
allowedIPs = [
|
||||
"10.7.6.6/32"
|
||||
"fd00:fae:fae:fae:fae:6::/96"
|
||||
];
|
||||
#endpoint = "5.255.119.132:51820";
|
||||
endpoint = "[2a04:52c0:124:9d8c::2]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
{
|
||||
# blue-shell.pub.solar
|
||||
publicKey = "bcrIpWrKc1M+Hq4ds3aN1lTaKE26f2rvXhd+93QrzR8=";
|
||||
allowedIPs = [
|
||||
"10.7.6.7/32"
|
||||
"fd00:fae:fae:fae:fae:7::/96"
|
||||
];
|
||||
#endpoint = "194.13.83.205:51820";
|
||||
endpoint = "[2a03:4000:43:24e::1]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
# Secret encryption
|
||||
|
||||
Deployment secrets are added to the repository in encrypted files. To be able to work with these encrypted files, your public key(s) will have to be added to your user attrset under `secretEncryptionKeys`.
|
||||
|
||||
See also the docs on [working with secrets](./secrets.md).
|
36
docs/backups.md
Normal file
36
docs/backups.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Backups
|
||||
|
||||
We use [Restic](https://restic.readthedocs.io/en/stable/) to create backups and push them to two repositories.
|
||||
Check `./modules/backups.nix` and `./hosts/nachtigall/backups.nix` for working examples.
|
||||
|
||||
### Hetzner Storagebox
|
||||
|
||||
- Uses SFTP for transfer of backups
|
||||
|
||||
Adding a new host SSH public key to the storagebox:
|
||||
|
||||
First, [SSH to nachtigall](./administrative-access.md#ssh-access), then become root and add the new SSH public key
|
||||
|
||||
```
|
||||
sudo -i
|
||||
echo '<ssh-public-key>' | ssh -p23 u377325@u377325.your-storagebox.de install-ssh-key
|
||||
```
|
||||
|
||||
[Link to Hetzner storagebox docs](https://docs.hetzner.com/robot/storage-box/backup-space-ssh-keys).
|
||||
|
||||
### Garage S3 buckets
|
||||
|
||||
- Uses S3 for transfer of backups
|
||||
- One bucket per host, e.g. `nachtigall-backups`, `metronom-backups`
|
||||
|
||||
To start transfering backups from a new hosts, this is how to create a new bucket:
|
||||
|
||||
First, [SSH to trinkgenossin](./administrative-access.md#ssh-access), then use the `garage` CLI to create a new key and bucket:
|
||||
|
||||
```
|
||||
export GARAGE_RPC_SECRET=<secret-in-keepass>
|
||||
|
||||
garage bucket create <hostname>-backups
|
||||
garage key create <hostname>-backups-key
|
||||
garage bucket allow <hostname>-backups --read --write --key <hostname>-backups-key
|
||||
```
|
55
docs/cachix.md
Normal file
55
docs/cachix.md
Normal file
|
@ -0,0 +1,55 @@
|
|||
# Cachix usage
|
||||
|
||||
URL: https://pub-solar.cachix.org
|
||||
|
||||
Requirements:
|
||||
|
||||
- [Install cachix](https://docs.cachix.org/installation)
|
||||
- Optional: To push to the cache, you need to set `CACHIX_AUTH_TOKEN` in your environment. To generate one for you, follow the [Getting Started](https://docs.cachix.org/getting-started#authenticating) docs and login with your GitHub account.
|
||||
- Add our binary cache [to your nix config](https://docs.cachix.org/faq#cachix-use-effects). To add the pub-solar cache, run:
|
||||
|
||||
```
|
||||
cachix use pub-solar
|
||||
```
|
||||
|
||||
Example to build and push a custom package of a host in this flake (e.g. after creating an overlay):
|
||||
|
||||
```
|
||||
nix build --json -f . '.#nixosConfigurations.nachtigall.pkgs.keycloak^*' \
|
||||
| jq -r '.[].outputs | to_entries[].value' \
|
||||
| cachix push pub-solar
|
||||
```
|
||||
|
||||
Example to build and push a package in the `nixpkgs` repo:
|
||||
|
||||
```
|
||||
cd nixpkgs
|
||||
nix build --json -f . 'pkgs.lix^*' \
|
||||
| jq -r '.[].outputs | to_entries[].value' \
|
||||
| cachix push pub-solar
|
||||
```
|
||||
|
||||
Checking if a package has been correctly pushed to the cache:
|
||||
|
||||
```
|
||||
❯ nix build --json '/nix/store/f76xi83z4xk9sn6pbh38rh97yvqhb5m0-noto-fonts-color-emoji-png-2.042.drv^*' | jq -r '.[].outputs | to_entries[].value' | cachix push pub-solar
|
||||
Pushing 1 paths (0 are already present) using zstd to cache pub-solar ⏳
|
||||
|
||||
✓ /nix/store/xpgpi84765dxqja3gd5pldj49xx2v0xl-noto-fonts-color-emoji-png-2.042 (10.30 MiB)
|
||||
|
||||
All done.
|
||||
|
||||
❯ curl -I https://pub-solar.cachix.org/xpgpi84765dxqja3gd5pldj49xx2v0xl.narinfo
|
||||
HTTP/2 200
|
||||
date: Mon, 26 Aug 2024 09:31:10 GMT
|
||||
content-type: text/x-nix-narinfo
|
||||
traceparent: 00-b99db37cc9c2581b8d226cdf81e54507-794fc49193659c03-01
|
||||
tracestate:
|
||||
cache-control: public, max-age=14400
|
||||
last-modified: Mon, 26 Aug 2024 09:31:10 GMT
|
||||
cf-cache-status: EXPIRED
|
||||
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=A67KGsCIsYjoFdvndxJ0rkmb7BZ5ztIpm8WUJKAiUPRVWvbYeXU9gU27P7zryiUtArbwrLzHhhMija0yyXk0kwNa3suz8gNzKK6z1CX1FWDZiiP07rnq7zAg8nZbSBiEU%2FZrU9nSrR6mhuL9ihbmW1Hf"}],"group":"cf-nel","max_age":604800}
|
||||
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
|
||||
server: cloudflare
|
||||
cf-ray: 8b92ceab0d19c80e-DUS
|
||||
```
|
60
docs/deletion-request.md
Normal file
60
docs/deletion-request.md
Normal file
|
@ -0,0 +1,60 @@
|
|||
# Process for handling a deletion request
|
||||
|
||||
### Keycloak
|
||||
|
||||
Required:
|
||||
|
||||
- auth.pub.solar `admin-cli` service user credentials
|
||||
- [SSH access to host `nachtigall`](./administrative-access.md#ssh-access)
|
||||
|
||||
Run each of the following after SSH'ing to `nachtigall`:
|
||||
|
||||
```
|
||||
sudo --user keycloak kcadm.sh config credentials --config /tmp/kcadm.config --server http://localhost:8080 --realm pub.solar --client admin-cli
|
||||
|
||||
# Take note of user id in response from following command
|
||||
sudo --user keycloak kcadm.sh get --config /tmp/kcadm.config users --realm pub.solar --query email=<email-address>
|
||||
|
||||
# To avoid impersonification, we deactivate the account by resetting the password and email address
|
||||
# Use user id from previous command, for example
|
||||
sudo --user keycloak kcadm.sh update --config /tmp/kcadm.config users/2ec6f173-3c10-4b82-9808-e2f2d393ff11/reset-password --realm pub.solar --set type=password --set value=<random-password> --no-merge
|
||||
sudo --user keycloak kcadm.sh update --config /tmp/kcadm.config users/2ec6f173-3c10-4b82-9808-e2f2d393ff11 --realm pub.solar --set email=<username>@deactivated.pub.solar
|
||||
```
|
||||
|
||||
Docs: https://www.keycloak.org/docs/latest/server_admin/index.html#updating-a-user
|
||||
|
||||
### Nextcloud
|
||||
|
||||
```
|
||||
nextcloud-occ user:delete <username>
|
||||
```
|
||||
|
||||
Docs: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#user-commands-label
|
||||
|
||||
### Mastodon
|
||||
|
||||
```
|
||||
sudo -u mastodon mastodon-tootctl accounts delete --email <mail-address>
|
||||
```
|
||||
|
||||
Docs: https://docs.joinmastodon.org/admin/tootctl/#accounts-delete
|
||||
|
||||
### Forgejo
|
||||
|
||||
```
|
||||
sudo -u gitea gitea admin user delete --config /var/lib/forgejo/custom/conf/app.ini --purge --email <mail-address>
|
||||
```
|
||||
|
||||
Docs: https://forgejo.org/docs/latest/admin/command-line/#delete
|
||||
|
||||
### Matrix
|
||||
|
||||
```
|
||||
curl --header "Authorization: Bearer <admin-access-token>" --request POST http://127.0.0.1:8008/_synapse/admin/v1/deactivate/@<username>:pub.solar --data '{"erase": true}'
|
||||
```
|
||||
|
||||
Docs: https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#deactivate-account
|
||||
|
||||
### OpenBikeSensor
|
||||
|
||||
Not implemented, see: https://github.com/openbikesensor/portal/issues/95
|
50
docs/deploying.md
Normal file
50
docs/deploying.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Deploying new versions
|
||||
|
||||
We use [deploy-rs](https://github.com/serokell/deploy-rs) to deploy changes.
|
||||
Currently this process is not automated, so configuration changes will have to
|
||||
be manually deployed.
|
||||
|
||||
To deploy, make sure you have a [working development shell](./development-shell.md).
|
||||
Then, run `deploy-rs` with the hostname of the server you want to deploy:
|
||||
|
||||
### Dry-run
|
||||
|
||||
Use `--dry-activate` to show a diff of updated packages and all services that
|
||||
would be restarted by the update. This will also put all files in place without
|
||||
switching to the new generation, enabling a quick switch to the new config at a
|
||||
later moment.
|
||||
|
||||
For nachtigall.pub.solar:
|
||||
|
||||
```
|
||||
deploy --targets '.#nachtigall' --ssh-user <unix-username> --magic-rollback false --auto-rollback false --keep-result --result-path ./results --dry-activate
|
||||
```
|
||||
|
||||
After reviewing the changes, apply the update with:
|
||||
|
||||
```
|
||||
deploy --targets '.#nachtigall' --ssh-user <unix-username> --magic-rollback false --auto-rollback false --keep-result --result-path ./results
|
||||
```
|
||||
|
||||
For metronom.pub.solar (aarch64-linux):
|
||||
|
||||
```
|
||||
deploy --targets '.#metronom' --ssh-user <unix-username> --magic-rollback false --auto-rollback false --keep-result --result-path ./results --remote-build
|
||||
```
|
||||
|
||||
Usually we skip all rollback functionality, but if you want to deploy a change
|
||||
that might lock you out, e.g. to SSH, it might make sense to set these to `true`.
|
||||
|
||||
To skip flake checks, e.g. because you already ran them manually before
|
||||
deployment, add the flag `--skip-checks` at the end of the command.
|
||||
|
||||
We use `--keep-result --result-path ./results` to keep the last `result`
|
||||
symlink of each `deploy` from being garbage collected. That way, we keep builds
|
||||
cached in the Nix store. This is optional and both flags can be removed if disk
|
||||
space is a scarce resource on your machine.
|
||||
|
||||
You'll need to have SSH Access to the boxes to be able to run `deploy`.
|
||||
|
||||
### Getting SSH access
|
||||
|
||||
See [administrative-access.md](./administrative-access.md).
|
61
docs/dns.md
Normal file
61
docs/dns.md
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Changing DNS entries
|
||||
|
||||
Our current DNS provider is [namecheap](https://www.namecheap.com/).
|
||||
We use [OpenTofu](https://opentofu.org) to declaratively manage our pub.solar DNS records.
|
||||
|
||||
### Initial setup
|
||||
|
||||
You will need to setup the following [namecheap API credentials](https://www.namecheap.com/support/api/intro),
|
||||
look for "namecheap API key" in the pub.solar Keepass database.
|
||||
|
||||
```
|
||||
NAMECHEAP_API_KEY
|
||||
NAMECHEAP_API_USER
|
||||
NAMECHEAP_USER_NAME
|
||||
```
|
||||
|
||||
You will probably also need to add your external IP to the [API allow list](https://ap.www.namecheap.com/settings/tools/apiaccess/whitelisted-ips).
|
||||
|
||||
```
|
||||
dig -4 ip @dns.toys
|
||||
```
|
||||
|
||||
Now, change into the terraform directory and initialize the terraform providers. To decrypt existing state,
|
||||
search for "terraform state passphrase" in the pub.solar Keepass database.
|
||||
|
||||
```
|
||||
cd terraform
|
||||
export TF_VAR_state_passphrase=$(secret-tool lookup pub.solar terraform-state-passphrase-dns)
|
||||
|
||||
alias tofu="terraform-backend-git --access-logs --tf tofu git terraform"
|
||||
tofu init
|
||||
```
|
||||
|
||||
Make your changes, e.g. in `dns.tf`.
|
||||
|
||||
```
|
||||
$EDITOR dns.tf
|
||||
```
|
||||
|
||||
Plan your changes using:
|
||||
|
||||
```
|
||||
tofu plan -out pub-solar-infra.plan
|
||||
```
|
||||
|
||||
After verification, apply your changes with:
|
||||
|
||||
```
|
||||
tofu apply "pub-solar-infra.plan"
|
||||
```
|
||||
|
||||
### Useful links
|
||||
|
||||
We use terraform-backend-git remote backend with opentofu state encryption for collaboration.
|
||||
|
||||
- https://github.com/plumber-cd/terraform-backend-git
|
||||
- https://opentofu.org/docs/language/state/encryption
|
||||
|
||||
Namecheap Terraform provider docs:
|
||||
|
||||
- https://registry.terraform.io/providers/namecheap/namecheap/latest/docs
|
7
docs/forgejo-actions.md
Normal file
7
docs/forgejo-actions.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Forgejo Actions
|
||||
|
||||
Admin docs
|
||||
https://forgejo.org/docs/latest/admin/actions/
|
||||
|
||||
User guide
|
||||
https://forgejo.org/docs/latest/user/actions/
|
84
docs/garage.md
Normal file
84
docs/garage.md
Normal file
|
@ -0,0 +1,84 @@
|
|||
# Garage
|
||||
|
||||
### How-To create a new bucket + keys
|
||||
|
||||
Requirements:
|
||||
|
||||
- `garage` RPC credentials, in the shared keepass, search for 'garage rpc secret'.
|
||||
- [Setup WireGuard](./administrative-access.md#ssh-access) for hosts: `trinkgenossin`, optionally: `delite`, `blue-shell`
|
||||
|
||||
```
|
||||
ssh <unix-username>@trinkgenossin.wg.pub.solar
|
||||
```
|
||||
|
||||
```
|
||||
# Add a few spaces to avoid leaking the secret to the shell history
|
||||
export GARAGE_RPC_SECRET=<secret-in-keepass>
|
||||
```
|
||||
|
||||
Now, you can run the following command to check the cluster status:
|
||||
|
||||
```
|
||||
garage status
|
||||
```
|
||||
|
||||
Command to list all existing buckets:
|
||||
|
||||
```
|
||||
garage bucket list
|
||||
```
|
||||
|
||||
Creating a new bucket and access keys:
|
||||
|
||||
```
|
||||
garage bucket create <bucket-name>
|
||||
garage key create <bucket-name>-key
|
||||
garage bucket allow <bucket-name> --read --write --key <bucket-name>-key
|
||||
```
|
||||
|
||||
Full example for `mastodon` bucket:
|
||||
|
||||
```
|
||||
garage bucket create mastodon
|
||||
|
||||
garage key create mastodon-key
|
||||
|
||||
garage bucket allow mastodon --read --write --key mastodon-key
|
||||
```
|
||||
|
||||
Then [setup your favourite S3 client](https://garagehq.deuxfleurs.fr/documentation/connect/cli/)
|
||||
or use the bucket with any [S3 compatible software](https://garagehq.deuxfleurs.fr/documentation/connect/).
|
||||
|
||||
Further reading:
|
||||
|
||||
- https://garagehq.deuxfleurs.fr/documentation/quick-start/
|
||||
- https://garagehq.deuxfleurs.fr/documentation/connect/
|
||||
- https://garagehq.deuxfleurs.fr/documentation/connect/apps/#mastodon
|
||||
|
||||
### Notes on manual setup steps
|
||||
|
||||
```
|
||||
ssh <unix-username>@trinkgenossin.wg.pub.solar
|
||||
|
||||
# Add a few spaces to avoid leaking the secret to the shell history
|
||||
export GARAGE_RPC_SECRET=<secret-in-keepass>
|
||||
|
||||
# Uses the default config /etc/garage.toml
|
||||
garage node id
|
||||
|
||||
garage node connect <node-id2>
|
||||
garage node connect <node-id3>
|
||||
|
||||
garage status
|
||||
|
||||
#Zones
|
||||
#DE-1 DE-2 NL-1
|
||||
|
||||
garage layout assign fdaa -z DE-1 -c 800G -t trinkgenossin
|
||||
garage layout assign 8835 -z DE-2 -c 800G -t blue-shell
|
||||
garage layout assign 73da -z NL-1 -c 800G -t delite
|
||||
garage layout show
|
||||
garage layout apply --version 1
|
||||
```
|
||||
|
||||
Source: https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/#creating-a-cluster-layout
|
79
docs/keycloak/delete-unverified-accounts.md
Normal file
79
docs/keycloak/delete-unverified-accounts.md
Normal file
|
@ -0,0 +1,79 @@
|
|||
# Delete accounts without verified email address
|
||||
|
||||
### Keycloak
|
||||
|
||||
Required:
|
||||
|
||||
- auth.pub.solar admin-cli service user credentials
|
||||
- [SSH access to host `nachtigall`](../administrative-access.md#ssh-access)
|
||||
|
||||
Run following after SSH'ing to `nachtigall`.
|
||||
|
||||
Credentials for the following command are in keepass. Create a keycloak
|
||||
config/credentials file at `/tmp/kcadm.config`:
|
||||
|
||||
```
|
||||
sudo --user keycloak kcadm.sh config credentials \
|
||||
--config /tmp/kcadm.config \
|
||||
--server https://auth.pub.solar \
|
||||
--realm pub.solar \
|
||||
--client admin-cli
|
||||
```
|
||||
|
||||
Get list of accounts without a verified email address:
|
||||
|
||||
```
|
||||
sudo --user keycloak kcadm.sh get \
|
||||
--config /tmp/kcadm.config \
|
||||
users \
|
||||
--realm pub.solar \
|
||||
--query emailVerified=false \
|
||||
> /tmp/keycloak-unverified-accounts
|
||||
```
|
||||
|
||||
Review list of accounts, especially check `createdTimestamp` if any accounts
|
||||
were created in the past 2 days. If so, delete those from the
|
||||
`/tmp/keycloak-unverified-accounts` file.
|
||||
|
||||
```
|
||||
createdTimestamps=( $( nix run nixpkgs#jq -- -r '.[].createdTimestamp' < /tmp/keycloak-unverified-accounts ) )
|
||||
|
||||
# timestamps are in nanoseconds since epoch, so we need to strip the last three digits
|
||||
for timestamp in ${createdTimestamps[@]}; do date --date="@${timestamp::-3}"; done
|
||||
|
||||
vim /tmp/keycloak-unverified-accounts
|
||||
```
|
||||
|
||||
Check how many accounts are going to be deleted:
|
||||
|
||||
```
|
||||
jq -r '.[].id' < /tmp/keycloak-unverified-accounts | wc -l
|
||||
```
|
||||
|
||||
```
|
||||
jq -r '.[].id' < /tmp/keycloak-unverified-accounts > /tmp/keycloak-unverified-account-ids
|
||||
```
|
||||
|
||||
Final check before deletion (dry-run):
|
||||
|
||||
```
|
||||
for id in $(cat /tmp/keycloak-unverified-account-ids)
|
||||
do
|
||||
echo sudo --user keycloak kcadm.sh delete \
|
||||
--config /tmp/kcadm.config \
|
||||
users/$id \
|
||||
--realm pub.solar
|
||||
done
|
||||
```
|
||||
|
||||
THIS WILL DELETE ACCOUNTS:
|
||||
|
||||
```
|
||||
for id in $(cat /tmp/keycloak-unverified-account-ids)
|
||||
do
|
||||
sudo --user keycloak kcadm.sh delete \
|
||||
--config /tmp/kcadm.config \
|
||||
users/$id \
|
||||
--realm pub.solar
|
||||
done
|
||||
```
|
25
docs/keycloak/keycloak-email-list.md
Normal file
25
docs/keycloak/keycloak-email-list.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Process for getting a list of email addresses of all keycloak users
|
||||
|
||||
### Keycloak
|
||||
|
||||
Required:
|
||||
|
||||
- auth.pub.solar admin-cli service user credentials
|
||||
- [SSH access to host `nachtigall`](../administrative-access.md#ssh-access)
|
||||
|
||||
Run following after SSH'ing to `nachtigall`:
|
||||
|
||||
```
|
||||
sudo --user keycloak kcadm.sh get users \
|
||||
-r pub.solar \
|
||||
--offset 0 \
|
||||
--limit 1000 \
|
||||
--no-config \
|
||||
--server http://localhost:8080 \
|
||||
--realm master \
|
||||
--user admin \
|
||||
--password <admin password> \
|
||||
> keycloak-user-list.json
|
||||
|
||||
jq -r '.[].email' < keycloak-user-list.json
|
||||
```
|
36
docs/keycloak/keycloak-reset-user-password.md
Normal file
36
docs/keycloak/keycloak-reset-user-password.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Process for resetting keycloak user passwords
|
||||
|
||||
### Keycloak
|
||||
|
||||
Required:
|
||||
|
||||
- auth.pub.solar admin-cli service user credentials
|
||||
- [SSH access to host `nachtigall`](../administrative-access.md#ssh-access)
|
||||
|
||||
Run the following after SSH'ing to `nachtigall`:
|
||||
|
||||
```
|
||||
mkdir /tmp/keycloak-credential-reset
|
||||
|
||||
sudo --user keycloak kcadm.sh config credentials --config /tmp/kcadm.config --server http://localhost:8080 --realm pub.solar --client admin-cli
|
||||
|
||||
sudo --user keycloak kcadm.sh get --config /tmp/kcadm.config users --realm pub.solar | jq --raw-output '.[] | .id' > /tmp/keycloak-credential-reset/all-uuids
|
||||
|
||||
for UUID in $(cat /tmp/keycloak-credential-reset/all-uuids); do
|
||||
sudo --user keycloak kcadm.sh get --config /tmp/kcadm.config users/$UUID/credentials --realm pub.solar > /tmp/keycloak-credential-reset/$UUID
|
||||
done
|
||||
|
||||
mkdir /tmp/keycloak-credential-reset/accounts-with-creds
|
||||
|
||||
find /tmp/keycloak-credential-reset -type f -size +3c -exec mv '{}' /tmp/keycloak-credential-reset/accounts-with-creds/ \;
|
||||
|
||||
rm -r /tmp/keycloak-credential-reset/accounts-with-creds/
|
||||
|
||||
find /tmp/keycloak-credential-reset/ -type f -exec basename '{}' \; > /tmp/keycloak-credential-reset/accounts-without-credentials
|
||||
|
||||
vim /tmp/keycloak-credential-reset/accounts-without-credentials
|
||||
|
||||
for UUID in $(cat /tmp/keycloak-credential-reset/accounts-without-credentials); do
|
||||
sudo --user keycloak kcadm.sh update --config /tmp/kcadm.config users/$UUID/reset-password --target-realm pub.solar --set type=password --set value=$(< /dev/urandom tr -dc A-Z-a-z-0-9 | head -c${1:-32};echo;) --set temporary=true --no-merge
|
||||
done
|
||||
```
|
22
docs/keycloak/keycloak-update-realm.md
Normal file
22
docs/keycloak/keycloak-update-realm.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Process for updating a keycloak realm via CLI
|
||||
|
||||
### Keycloak
|
||||
|
||||
Required:
|
||||
|
||||
- auth.pub.solar admin-cli service user credentials
|
||||
- [SSH access to host `nachtigall`](../administrative-access.md#ssh-access)
|
||||
|
||||
Run the following after SSH'ing to `nachtigall`:
|
||||
|
||||
```
|
||||
sudo -u keycloak kcadm.sh config credentials --config /tmp/kcadm.config --server http://localhost:8080 --realm master --user admin
|
||||
|
||||
sudo -u keycloak kcadm.sh get --config /tmp/kcadm.config realms/pub.solar
|
||||
|
||||
sudo -u keycloak kcadm.sh update --config /tmp/kcadm.config realms/pub.solar -s browserFlow='Webauthn Browser'
|
||||
|
||||
sudo -u keycloak kcadm.sh get --config /tmp/kcadm.config realms/pub.solar
|
||||
```
|
||||
|
||||
Source: https://keycloak.ch/keycloak-tutorials/tutorial-webauthn/
|
4
docs/mail.md
Normal file
4
docs/mail.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
### Mail
|
||||
|
||||
mail.pub.solar aka metronom.pub.solar hosts our internal mails.
|
||||
This is a small Hetzner cloud instance on https://console.hetzner.cloud.
|
21
docs/mailman.md
Normal file
21
docs/mailman.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Mailman on NixOS docs
|
||||
|
||||
- add reverse DNS record for IP
|
||||
|
||||
Manual setup done for mailman, adapted from https://nixos.wiki/wiki/Mailman:
|
||||
|
||||
```
|
||||
# Add DNS records in infra repo using terraform:
|
||||
|
||||
# https://git.pub.solar/pub-solar/infra-vintage/commit/db234cdb5b55758a3d74387ada0760e06e166b9d
|
||||
|
||||
# Generate initial postfix_domains.db and postfix_lmtp.db databases for Postfix
|
||||
|
||||
sudo -u mailman mailman aliases
|
||||
|
||||
# Create a django superuser account
|
||||
|
||||
sudo -u mailman-web mailman-web createsuperuser
|
||||
|
||||
# Followed outlined steps in web UI
|
||||
```
|
30
docs/mediawiki-updates.md
Normal file
30
docs/mediawiki-updates.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Updating mediawiki docker container
|
||||
|
||||
See the [mediawiki-oidc-docker repository](https://git.pub.solar/pub-solar/mediawiki-oidc-docker#updating-the-docker-image)
|
||||
for instructions on updating our customized mediawiki docker image.
|
||||
|
||||
To deploy a new docker image to `nachtigall`, first bump the mediawiki version
|
||||
of the docker image tag in `modules/mediawiki/default.nix` (search for
|
||||
`image`).
|
||||
|
||||
Next, push your changes to https://git.pub.solar and get them reviewed and
|
||||
approved.
|
||||
|
||||
After approval, create a fresh backup of the database and deploy the changes to
|
||||
`nachtigall`. Run the following after [SSH'ing to `nachtigall`](./administrative-access.md#ssh-access):
|
||||
|
||||
```
|
||||
sudo -u postgres pg_dump --create -Fc mediawiki > mediawiki-db-$(date +%F).dump
|
||||
exit
|
||||
```
|
||||
|
||||
```
|
||||
deploy --targets '.#nachtigall' --magic-rollback false --auto-rollback false --keep-result --result-path ./results
|
||||
```
|
||||
|
||||
Then, finalize the update by running the database migration script (in a [SSH](./administrative-access.md#ssh-access) shell on `nachtigall`):
|
||||
|
||||
```
|
||||
docker exec -it mediawiki bash
|
||||
php maintenance/run.php update.php
|
||||
```
|
19
docs/nextcloud.md
Normal file
19
docs/nextcloud.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Nextcloud debugging
|
||||
|
||||
Set loglevel to `0` for debug logs:
|
||||
|
||||
```nix
|
||||
services.nextcloud.settings.loglevel = 0;
|
||||
```
|
||||
|
||||
Then, logs appear in the `phpfpm-nextcloud.service` logs:
|
||||
|
||||
```bash
|
||||
sudo journalctl -fu phpfpm-nextcloud
|
||||
```
|
||||
|
||||
Make sure to set the loglevel back to the default `2` warning after debugging:
|
||||
|
||||
```nix
|
||||
services.nextcloud.settings.loglevel = 2;
|
||||
```
|
47
docs/nix-flake-updates.md
Normal file
47
docs/nix-flake-updates.md
Normal file
|
@ -0,0 +1,47 @@
|
|||
Use these commands to show the diff between versions for planning updates:
|
||||
|
||||
```
|
||||
OLD_CLOSURE=$(nix build --print-out-paths .#nixosConfigurations.nachtigall.config.system.build.toplevel)
|
||||
/nix/store/c6wqp1vzvyr3bq2igd8p460613ddwrmj-nixos-system-nachtigall-23.11.20231201.5de0b32
|
||||
```
|
||||
|
||||
```
|
||||
nix flake update
|
||||
...
|
||||
```
|
||||
|
||||
```
|
||||
NEW_CLOSURE=$(nix build --print-out-paths .#nixosConfigurations.nachtigall.config.system.build.toplevel)
|
||||
/nix/store/xynyf943d2nw1wgawhzxh13xkkf1whb0-nixos-system-nachtigall-23.11.20231210.781e2a9
|
||||
```
|
||||
|
||||
```
|
||||
nix store diff-closures $OLD_CLOSURE $NEW_CLOSURE
|
||||
cpupower: 6.1.64 → 6.1.66
|
||||
element-web: 1.11.47 → 1.11.51, +5325.9 KiB
|
||||
element-web-wrapped: 1.11.47 → 1.11.51
|
||||
initrd-linux: 6.1.64 → 6.1.66
|
||||
keycloak: 22.0.5 → 23.0.0, +15201.4 KiB
|
||||
linux: 6.1.64, 6.1.64-modules → 6.1.66, 6.1.66-modules, +8.3 KiB
|
||||
mastodon: 4.2.1 → 4.2.3, +16.3 KiB
|
||||
mastodon-gems: 4.2.1 → 4.2.3, +14.4 KiB
|
||||
mastodon-modules: 4.2.1 → 4.2.3
|
||||
nix: +18.8 KiB
|
||||
nixos-manual: +73.6 KiB
|
||||
nixos-system-nachtigall: 23.11.20231201.5de0b32 → 23.11.20231210.781e2a9
|
||||
opensearch: 2.11.0 → 2.11.1, +560.5 KiB
|
||||
owncast: 0.1.1 → 0.1.2, +798.9 KiB
|
||||
ruby3.2.2-bcp47_spec: ∅ → 0.2.1, +13.6 KiB
|
||||
ruby3.2.2-json-canonicalization: 0.3.2 → 1.0.0
|
||||
ruby3.2.2-json-ld: 3.2.5 → 3.3.1
|
||||
ruby3.2.2-rdf: 3.2.11 → 3.3.1
|
||||
samba: +12.5 KiB
|
||||
source: +3888.1 KiB
|
||||
wrapped-ruby-mastodon-gems: 4.2.1 → 4.2.3
|
||||
zfs-kernel: 2.2.1-6.1.64 → 2.2.2-6.1.66
|
||||
zfs-user: 2.2.1 → 2.2.2
|
||||
```
|
||||
|
||||
### Deploying updates
|
||||
|
||||
See [deploying.md](./deploying.md).
|
13
docs/nixos-anywhere.md
Normal file
13
docs/nixos-anywhere.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
```
|
||||
curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root
|
||||
/root/kexec/run
|
||||
```
|
||||
|
||||
```
|
||||
mkdir -p /etc/secrets/initrd
|
||||
ssh-keygen -t ed25519 -f /etc/secrets/initrd/ssh_host_ed25519_key
|
||||
```
|
||||
|
||||
```
|
||||
nix run github:nix-community/nixos-anywhere -- --flake .#blue-shell root@194.13.83.205
|
||||
```
|
32
docs/obs-portal.md
Normal file
32
docs/obs-portal.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# OpenBikeSensor Portal
|
||||
|
||||
## Docker Containers
|
||||
|
||||
- portal
|
||||
- worker
|
||||
- db
|
||||
|
||||
## Run database migrations
|
||||
|
||||
After an upgrade it is sometimes necessary to run database migrations or regenerate tiles.
|
||||
|
||||
```
|
||||
docker exec -ti obs-portal tools/upgrade.py
|
||||
```
|
||||
|
||||
## Dump database
|
||||
|
||||
Save database dump to `dump.sql` in the current working directory.
|
||||
|
||||
```
|
||||
docker exec -ti --user postgres obs-portal-db pg_dump obs > dump.sql
|
||||
```
|
||||
|
||||
## Restore database
|
||||
|
||||
Load database dump from `dump.sql` file.
|
||||
`obs` database needs to exist before importing the dump.
|
||||
|
||||
```
|
||||
cat dump.sql | docker exec -ti --user postgres obs-portal-db psql obs
|
||||
```
|
11
docs/privacy-hardening.md
Normal file
11
docs/privacy-hardening.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Privacy hardening
|
||||
|
||||
Some default options in the services we run are not as privacy friendly as they can be. Oftentimes, services assume they are running for an organization in which everyone knows (or wants to know) everyone else. However, when running a public service accounts should be hidden from other users.
|
||||
|
||||
## Nextcloud account leaking
|
||||
|
||||
By default, accounts are visible globally across the instance. To prevent this, go into the administration settings -> Sharing. Check the option saying "Restrict users to only share with users in their group".
|
||||
|
||||
## Forgejo email leaking
|
||||
|
||||
By default, emails are visible on the explore page for other logged in users. We have disabled this in the config by setting `service.DEFAULT_KEEP_EMAIL_PRIVATE` to `true`.
|
5
docs/rescue.md
Normal file
5
docs/rescue.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Rescue and remote console
|
||||
|
||||
Rescue is enabled in the Hetzner interface. Check the shared keepass file for credentials.
|
||||
|
||||
The remote console can be requested with Hetzner support. See [the Hetzner docs](https://docs.hetzner.com/robot/dedicated-server/maintainance/kvm-console/) for more information.
|
1
docs/reverting-version.md
Normal file
1
docs/reverting-version.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Reverting to an old version
|
5
docs/secrets.md
Normal file
5
docs/secrets.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Working with secrets
|
||||
|
||||
Secrets are handled with [agenix](https://github.com/ryantm/agenix). To be able to view secrets, your public key will have to be added to the admins config. See [Administrative Access](./administrative-access.md) on how to do this.
|
||||
|
||||
For a comprehensive tutorial, see [the agenix repository](https://github.com/ryantm/agenix?tab=readme-ov-file#tutorial).
|
20
docs/unlocking-zfs-pool.md
Normal file
20
docs/unlocking-zfs-pool.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Unlocking the ZFS pool on boot
|
||||
|
||||
After a reboot, the encrypted ZFS pool will have to be unlocked. This is done by
|
||||
accessing the server via SSH as user `root` on port 2222.
|
||||
|
||||
Nachtigall:
|
||||
|
||||
```
|
||||
ssh -4 root@nachtigall.pub.solar -p2222
|
||||
```
|
||||
|
||||
Metronom:
|
||||
|
||||
```
|
||||
ssh -4 root@metronom.pub.solar -p2222
|
||||
```
|
||||
|
||||
After connecting, paste the encryption passphrase you can find in the shared
|
||||
keepass. This will disconnect the SSH session immediately and the server will
|
||||
continue to boot into stage 2.
|
529
flake.lock
529
flake.lock
|
@ -1,34 +1,182 @@
|
|||
{
|
||||
"nodes": {
|
||||
"bats-assert": {
|
||||
"flake": false,
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": [
|
||||
"nix-darwin"
|
||||
],
|
||||
"home-manager": [
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1636059754,
|
||||
"narHash": "sha256-ewME0l27ZqfmAwJO4h5biTALc9bDLv7Bl3ftBzBuZwk=",
|
||||
"owner": "bats-core",
|
||||
"repo": "bats-assert",
|
||||
"rev": "34551b1d7f8c7b677c1a66fc0ac140d6223409e5",
|
||||
"lastModified": 1723293904,
|
||||
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "bats-core",
|
||||
"repo": "bats-assert",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"bats-support": {
|
||||
"blobs": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1548869839,
|
||||
"narHash": "sha256-Gr4ntadr42F2Ks8Pte2D4wNDbijhujuoJi4OPZnTAZU=",
|
||||
"owner": "bats-core",
|
||||
"repo": "bats-support",
|
||||
"rev": "d140a65044b2d6810381935ae7f0c94c7023c8c3",
|
||||
"lastModified": 1604995301,
|
||||
"narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=",
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "blobs",
|
||||
"rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "blobs",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"deploy-rs": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727447169,
|
||||
"narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=",
|
||||
"owner": "serokell",
|
||||
"repo": "deploy-rs",
|
||||
"rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "bats-core",
|
||||
"repo": "bats-support",
|
||||
"owner": "serokell",
|
||||
"repo": "deploy-rs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"keycloak-theme-pub-solar",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705332421,
|
||||
"narHash": "sha256-USpGLPme1IuqG78JNqSaRabilwkCyHmVWY0M9vYyqEA=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "83cb93d6d063ad290beee669f4badf9914cc16ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734343412,
|
||||
"narHash": "sha256-b7G8oFp0Nj01BYUJ6ENC9Qf/HsYAIZvN9k/p0Kg/PFU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "a08bfe06b39e94eec98dd089a2c1b18af01fef19",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"element-stickers": {
|
||||
"inputs": {
|
||||
"maunium-stickerpicker": [
|
||||
"maunium-stickerpicker"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714430716,
|
||||
"narHash": "sha256-+WmgGbONe5u2wpvkUC5wNhYnrE6eziIv3Liq4pv7jro=",
|
||||
"ref": "main",
|
||||
"rev": "85716a9e30fb6fae47336ed0cae3d1425c80f17c",
|
||||
"revCount": 6,
|
||||
"type": "git",
|
||||
"url": "https://git.pub.solar/pub-solar/maunium-stickerpicker-nix"
|
||||
},
|
||||
"original": {
|
||||
"ref": "main",
|
||||
"type": "git",
|
||||
"url": "https://git.pub.solar/pub-solar/maunium-stickerpicker-nix"
|
||||
}
|
||||
},
|
||||
"element-themes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718859621,
|
||||
"narHash": "sha256-ZOOm6UFGNSkGrdwbG5saLAYgAPYJ7E80ogA40CaW+E4=",
|
||||
"owner": "aaronraimist",
|
||||
"repo": "element-themes",
|
||||
"rev": "3bc82abc3dd468dabc933f0f9d0b443ed97554a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "aaronraimist",
|
||||
"ref": "master",
|
||||
"repo": "element-themes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
@ -37,11 +185,11 @@
|
|||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688466019,
|
||||
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -51,12 +199,15 @@
|
|||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1634851050,
|
||||
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c91f3de5adaf1de973b797ef7485e441a65b8935",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -65,6 +216,40 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fork": {
|
||||
"locked": {
|
||||
"lastModified": 1729963002,
|
||||
"narHash": "sha256-2zrYfd/qdfExU5zVwvH80uJnKc/dMeK6zp3O1UtW2Mo=",
|
||||
"owner": "teutat3s",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "005faaacbeede0296dec5c844f508027ab8a3ff6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "teutat3s",
|
||||
"ref": "init-matrix-authentication-service-module",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -72,19 +257,62 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690652600,
|
||||
"narHash": "sha256-Dy09g7mezToVwtFPyY25fAx1hzqNXv73/QmY5/qyR44=",
|
||||
"lastModified": 1726989464,
|
||||
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f58889c07efa8e1328fdf93dc1796ec2a5c47f38",
|
||||
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"keycloak-theme-pub-solar": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731518114,
|
||||
"narHash": "sha256-h9Wb3VjmXBZwTO3prRweUKwp2H9hZHCQKrkbU+2WPQs=",
|
||||
"ref": "main",
|
||||
"rev": "060ecccc5f8c92a0705ab91ff047811efd559468",
|
||||
"revCount": 36,
|
||||
"type": "git",
|
||||
"url": "https://git.pub.solar/pub-solar/keycloak-theme"
|
||||
},
|
||||
"original": {
|
||||
"ref": "main",
|
||||
"type": "git",
|
||||
"url": "https://git.pub.solar/pub-solar/keycloak-theme"
|
||||
}
|
||||
},
|
||||
"maunium-stickerpicker": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"dir": "web",
|
||||
"lastModified": 1733177811,
|
||||
"narHash": "sha256-1n7bPSCRw7keTCIu4tJGnUlkoId6H1+dPsTPzKo3Rrk=",
|
||||
"owner": "maunium",
|
||||
"repo": "stickerpicker",
|
||||
"rev": "89d3aece041c85ebe5a1ad4e620388af5227cbb0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "web",
|
||||
"owner": "maunium",
|
||||
"ref": "master",
|
||||
"repo": "stickerpicker",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -92,11 +320,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690431538,
|
||||
"narHash": "sha256-Uml8ivMMOFPB9fNSDcw72imGHRdJpaK12sRm2DTLLe8=",
|
||||
"lastModified": 1733570843,
|
||||
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "16c07487ac9bc59f58b121d13160c67befa3342e",
|
||||
"rev": "a35b08d09efda83625bef267eb24347b446c80b8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -106,114 +334,203 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1690424850,
|
||||
"narHash": "sha256-pPELqUXbNdZ7nMLPL8A+BSyUsxjxMO3q2Wb7plW/Wf8=",
|
||||
"owner": "srid",
|
||||
"repo": "nixos-flake",
|
||||
"rev": "df6fe273ff64dc29de2c93805045b5348d70bc26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "srid",
|
||||
"repo": "nixos-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1690548937,
|
||||
"narHash": "sha256-x3ZOPGLvtC0/+iFAg9Kvqm/8hTAIkGjc634SqtgaXTA=",
|
||||
"lastModified": 1734202038,
|
||||
"narHash": "sha256-LwcGIkORU8zfQ/8jAgptgPY8Zf9lGKB0vtNdQyEkaN8=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2a9d660ff0f7ffde9d73be328ee6e6f10ef66b28",
|
||||
"rev": "bcba2fbf6963bf6bed3a749f9f4cf5bff4adb96d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1688049487,
|
||||
"narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9",
|
||||
"lastModified": 1733096140,
|
||||
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"deploy-rs": "deploy-rs",
|
||||
"disko": "disko",
|
||||
"element-stickers": "element-stickers",
|
||||
"element-themes": "element-themes",
|
||||
"flake-parts": "flake-parts",
|
||||
"fork": "fork",
|
||||
"home-manager": "home-manager",
|
||||
"keycloak-theme-pub-solar": "keycloak-theme-pub-solar",
|
||||
"maunium-stickerpicker": "maunium-stickerpicker",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"simple-nixos-mailserver": "simple-nixos-mailserver",
|
||||
"unstable": "unstable"
|
||||
}
|
||||
},
|
||||
"simple-nixos-mailserver": {
|
||||
"inputs": {
|
||||
"blobs": "blobs",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixpkgs": [
|
||||
"unstable"
|
||||
],
|
||||
"nixpkgs-24_05": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718084203,
|
||||
"narHash": "sha256-Cx1xoVfSMv1XDLgKg08CUd1EoTYWB45VmB9XIQzhmzI=",
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "nixos-mailserver",
|
||||
"rev": "29916981e7b3b5782dc5085ad18490113f8ff63b",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixos-mailserver",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1734119587,
|
||||
"narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1636823747,
|
||||
"narHash": "sha256-oWo1nElRAOZqEf90Yek2ixdHyjD+gqtS/pAgwaQ9UhQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f6a2ed2082d9a51668c86ba27d0b5496f7a2ea93",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixos-flake": "nixos-flake",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"terranix": "terranix"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"terranix": {
|
||||
"utils_2": {
|
||||
"inputs": {
|
||||
"bats-assert": "bats-assert",
|
||||
"bats-support": "bats-support",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"terranix-examples": "terranix-examples"
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1684906298,
|
||||
"narHash": "sha256-pNuJxmVMGbBHw7pa+Bx0HY0orXIXoyyAXOKuQ1zpfus=",
|
||||
"owner": "terranix",
|
||||
"repo": "terranix",
|
||||
"rev": "c0dd15076856c6cb425795b8c7d5d37d3a1e922a",
|
||||
"lastModified": 1709126324,
|
||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "terranix",
|
||||
"repo": "terranix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"terranix-examples": {
|
||||
"locked": {
|
||||
"lastModified": 1636300201,
|
||||
"narHash": "sha256-0n1je1WpiR6XfCsvi8ZK7GrpEnMl+DpwhWaO1949Vbc=",
|
||||
"owner": "terranix",
|
||||
"repo": "terranix-examples",
|
||||
"rev": "a934aa1cf88f6bd6c6ddb4c77b77ec6e1660bd5e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "terranix",
|
||||
"repo": "terranix-examples",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
|
|
218
flake.nix
218
flake.nix
|
@ -1,114 +1,160 @@
|
|||
{
|
||||
inputs = {
|
||||
# Principle inputs (updated by `nix run .#update`)
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
# Track channels with commits tested and built by hydra
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
fork.url = "github:teutat3s/nixpkgs/init-matrix-authentication-service-module";
|
||||
|
||||
nix-darwin.url = "github:lnl7/nix-darwin/master";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixos-flake.url = "github:srid/nixos-flake";
|
||||
|
||||
terranix.url = "github:terranix/terranix";
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
disko.url = "github:nix-community/disko";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
agenix.inputs.darwin.follows = "nix-darwin";
|
||||
agenix.inputs.home-manager.follows = "home-manager";
|
||||
|
||||
keycloak-theme-pub-solar.url = "git+https://git.pub.solar/pub-solar/keycloak-theme?ref=main";
|
||||
keycloak-theme-pub-solar.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
element-themes.url = "github:aaronraimist/element-themes/master";
|
||||
element-themes.flake = false;
|
||||
|
||||
maunium-stickerpicker.url = "github:maunium/stickerpicker?ref=master&dir=web";
|
||||
maunium-stickerpicker.flake = false;
|
||||
|
||||
element-stickers.url = "git+https://git.pub.solar/pub-solar/maunium-stickerpicker-nix?ref=main";
|
||||
element-stickers.inputs.maunium-stickerpicker.follows = "maunium-stickerpicker";
|
||||
element-stickers.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
||||
simple-nixos-mailserver.inputs.nixpkgs-24_05.follows = "nixpkgs";
|
||||
simple-nixos-mailserver.inputs.nixpkgs.follows = "unstable";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, terranix, ... }:
|
||||
outputs =
|
||||
inputs@{ self, ... }:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
|
||||
|
||||
imports = [
|
||||
inputs.nixos-flake.flakeModule
|
||||
./terraform.nix
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
|
||||
perSystem = { config, ... }: { };
|
||||
imports = [
|
||||
./logins
|
||||
./lib
|
||||
./overlays
|
||||
./hosts
|
||||
];
|
||||
|
||||
flake =
|
||||
perSystem =
|
||||
{
|
||||
system,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
_module.args = {
|
||||
inherit inputs;
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ inputs.agenix.overlays.default ];
|
||||
};
|
||||
unstable = import inputs.unstable { inherit system; };
|
||||
master = import inputs.master { inherit system; };
|
||||
};
|
||||
|
||||
checks =
|
||||
let
|
||||
# TODO: Change username
|
||||
myUserName = "john";
|
||||
system = "x86_64-linux";
|
||||
nixos-lib = import (inputs.nixpkgs + "/nixos/lib") { };
|
||||
testDir = builtins.attrNames (builtins.readDir ./tests);
|
||||
testFiles = builtins.filter (n: builtins.match "^.*.nix$" n != null) testDir;
|
||||
in
|
||||
{
|
||||
# Configurations for Linux (NixOS) machines
|
||||
nixosConfigurations = {
|
||||
# TODO: Change hostname from "example1" to something else.
|
||||
example1 = self.nixos-flake.lib.mkLinuxSystem "x86_64-linux" {
|
||||
imports = [
|
||||
self.nixosModules.common # See below for "nixosModules"!
|
||||
self.nixosModules.linux
|
||||
./hosts/example1/default.nix
|
||||
self.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.${myUserName} = {
|
||||
imports = [
|
||||
self.homeModules.common # See below for "homeModules"!
|
||||
self.homeModules.linux
|
||||
];
|
||||
home.stateVersion = "22.11";
|
||||
};
|
||||
builtins.listToAttrs (
|
||||
map (x: {
|
||||
name = "test-${lib.strings.removeSuffix ".nix" x}";
|
||||
value = nixos-lib.runTest (
|
||||
import (./tests + "/${x}") {
|
||||
inherit self;
|
||||
inherit pkgs;
|
||||
inherit lib;
|
||||
inherit config;
|
||||
}
|
||||
);
|
||||
}) testFiles
|
||||
);
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
deploy-rs
|
||||
nixpkgs-fmt
|
||||
agenix
|
||||
age-plugin-yubikey
|
||||
cachix
|
||||
editorconfig-checker
|
||||
nodePackages.prettier
|
||||
nvfetcher
|
||||
shellcheck
|
||||
shfmt
|
||||
inputs.unstable.legacyPackages.${system}.treefmt2
|
||||
nixos-generators
|
||||
inputs.unstable.legacyPackages.${system}.opentofu
|
||||
terraform-backend-git
|
||||
terraform-ls
|
||||
jq
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Configurations for macOS machines
|
||||
darwinConfigurations = {
|
||||
# TODO: Change hostname from "example1" to something else.
|
||||
example1 = self.nixos-flake.lib.mkMacosSystem "aarch64-darwin" {
|
||||
imports = [
|
||||
self.nixosModules.common # See below for "nixosModules"!
|
||||
self.nixosModules.darwin
|
||||
./hosts/example1/default.nix
|
||||
self.darwinModules.home-manager
|
||||
{
|
||||
home-manager.users.${myUserName} = {
|
||||
imports = [
|
||||
self.homeModules.common # See below for "homeModules"!
|
||||
self.homeModules.darwin
|
||||
];
|
||||
home.stateVersion = "22.11";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
devShells.ci = pkgs.mkShell { buildInputs = with pkgs; [ nodejs ]; };
|
||||
};
|
||||
|
||||
# All nixos/nix-darwin configurations are kept here.
|
||||
nixosModules = {
|
||||
# Common nixos/nix-darwin configuration shared between Linux and macOS.
|
||||
common = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
hello
|
||||
];
|
||||
};
|
||||
# NixOS specific configuration
|
||||
linux = { pkgs, ... }: {
|
||||
users.users.${myUserName}.isNormalUser = true;
|
||||
services.netdata.enable = true;
|
||||
};
|
||||
# nix-darwin specific configuration
|
||||
darwin = { pkgs, ... }: {
|
||||
security.pam.enableSudoTouchIdAuth = true;
|
||||
};
|
||||
};
|
||||
flake = {
|
||||
nixosModules = builtins.listToAttrs (
|
||||
map (x: {
|
||||
name = x;
|
||||
value = import (./modules + "/${x}");
|
||||
}) (builtins.attrNames (builtins.readDir ./modules))
|
||||
);
|
||||
|
||||
# All home-manager configurations are kept here.
|
||||
homeModules = {
|
||||
# Common home-manager configuration shared between Linux and macOS.
|
||||
common = { pkgs, ... }: {
|
||||
programs.git.enable = true;
|
||||
programs.starship.enable = true;
|
||||
programs.bash.enable = true;
|
||||
checks = builtins.mapAttrs (
|
||||
system: deployLib: deployLib.deployChecks self.deploy
|
||||
) inputs.deploy-rs.lib;
|
||||
|
||||
formatter."x86_64-linux" = inputs.unstable.legacyPackages."x86_64-linux".nixfmt-rfc-style;
|
||||
|
||||
deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations {
|
||||
nachtigall = {
|
||||
hostname = "nachtigall.wg.pub.solar";
|
||||
};
|
||||
# home-manager config specific to NixOS
|
||||
linux = {
|
||||
xsession.enable = true;
|
||||
metronom = {
|
||||
hostname = "metronom.wg.pub.solar";
|
||||
};
|
||||
# home-manager config specifi to Darwin
|
||||
darwin = {
|
||||
targets.darwin.search = "Bing";
|
||||
tankstelle = {
|
||||
hostname = "tankstelle.wg.pub.solar";
|
||||
};
|
||||
underground = {
|
||||
hostname = "80.244.242.3";
|
||||
};
|
||||
trinkgenossin = {
|
||||
hostname = "trinkgenossin.wg.pub.solar";
|
||||
};
|
||||
delite = {
|
||||
hostname = "delite.wg.pub.solar";
|
||||
};
|
||||
blue-shell = {
|
||||
hostname = "blue-shell.wg.pub.solar";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
33
hosts/blue-shell/configuration.nix
Normal file
33
hosts/blue-shell/configuration.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.loader.grub.enable = true;
|
||||
|
||||
boot.kernelParams = [
|
||||
"boot.shell_on_fail=1"
|
||||
"ip=dhcp"
|
||||
];
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
13
hosts/blue-shell/default.nix
Normal file
13
hosts/blue-shell/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ flake, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
./disk-config.nix
|
||||
|
||||
./networking.nix
|
||||
./wireguard.nix
|
||||
#./backups.nix
|
||||
];
|
||||
}
|
101
hosts/blue-shell/disk-config.nix
Normal file
101
hosts/blue-shell/disk-config.nix
Normal file
|
@ -0,0 +1,101 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/vdb";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
bios = {
|
||||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
};
|
||||
boot = {
|
||||
size = "1G";
|
||||
type = "8300";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptroot";
|
||||
extraOpenArgs = [ ];
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
passwordFile = "/tmp/luks-password";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "vg0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
data = {
|
||||
type = "disk";
|
||||
device = "/dev/vdc";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptdata";
|
||||
extraOpenArgs = [ ];
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
passwordFile = "/tmp/luks-password";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "xfs";
|
||||
mountpoint = "/var/lib/garage/data";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
vg0 = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "16G";
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
};
|
||||
metadata = {
|
||||
size = "50G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "btrfs";
|
||||
mountpoint = "/var/lib/garage/meta";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
27
hosts/blue-shell/hardware-configuration.nix
Normal file
27
hosts/blue-shell/hardware-configuration.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
# 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 + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"sr_mod"
|
||||
"virtio_blk"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
26
hosts/blue-shell/networking.nix
Normal file
26
hosts/blue-shell/networking.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.garage.settings.rpc_public_addr = "[2a03:4000:43:24e::1]:3901";
|
||||
|
||||
networking.hostName = "blue-shell";
|
||||
networking.hostId = "00000005";
|
||||
|
||||
networking.useDHCP = false;
|
||||
systemd.network.enable = true;
|
||||
systemd.network.networks."10-wan" = {
|
||||
matchConfig.Name = "ens3";
|
||||
address = [
|
||||
"194.13.83.205/22"
|
||||
"2a03:4000:43:24e::1/64"
|
||||
];
|
||||
gateway = [
|
||||
"194.13.80.1"
|
||||
"fe80::1"
|
||||
];
|
||||
};
|
||||
}
|
51
hosts/blue-shell/wireguard.nix
Normal file
51
hosts/blue-shell/wireguard.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
wireguardIPv4 = "10.7.6.7";
|
||||
wireguardIPv6 = "fd00:fae:fae:fae:fae:7::";
|
||||
in
|
||||
{
|
||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
age.secrets.wg-private-key.file = "${flake.self}/secrets/blue-shell-wg-private-key.age";
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
wg-ssh = {
|
||||
listenPort = 51820;
|
||||
mtu = 1300;
|
||||
ips = [
|
||||
"${wireguardIPv4}/32"
|
||||
"${wireguardIPv6}/96"
|
||||
];
|
||||
privateKeyFile = config.age.secrets.wg-private-key.path;
|
||||
peers = flake.self.logins.wireguardDevices ++ [
|
||||
{
|
||||
# trinkgenossin.pub.solar
|
||||
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";
|
||||
allowedIPs = [
|
||||
"10.7.6.5/32"
|
||||
"fd00:fae:fae:fae:fae:5::/96"
|
||||
];
|
||||
#endpoint = "85.215.152.22:51820";
|
||||
endpoint = "[2a01:239:35d:f500::1]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.listenAddresses = [
|
||||
{
|
||||
addr = wireguardIPv4;
|
||||
port = 22;
|
||||
}
|
||||
{
|
||||
addr = "[${wireguardIPv6}]";
|
||||
port = 22;
|
||||
}
|
||||
];
|
||||
}
|
207
hosts/default.nix
Normal file
207
hosts/default.nix
Normal file
|
@ -0,0 +1,207 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake = {
|
||||
nixosModules = {
|
||||
home-manager = {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
flake = {
|
||||
inherit self inputs config;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
nixosConfigurations = {
|
||||
nachtigall = self.inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
flake = {
|
||||
inherit self inputs config;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
self.inputs.agenix.nixosModules.default
|
||||
self.nixosModules.home-manager
|
||||
./nachtigall
|
||||
self.nixosModules.overlays
|
||||
self.nixosModules.unlock-zfs-on-boot
|
||||
self.nixosModules.core
|
||||
self.nixosModules.docker
|
||||
self.nixosModules.backups
|
||||
|
||||
self.nixosModules.nginx
|
||||
self.nixosModules.collabora
|
||||
self.nixosModules.coturn
|
||||
self.nixosModules.forgejo
|
||||
self.nixosModules.keycloak
|
||||
self.nixosModules.mailman
|
||||
self.nixosModules.mastodon
|
||||
self.nixosModules.nginx-mastodon
|
||||
self.nixosModules.nginx-mastodon-files
|
||||
self.nixosModules.mediawiki
|
||||
self.nixosModules.nextcloud
|
||||
self.nixosModules.nginx-prometheus-exporters
|
||||
self.nixosModules.nginx-website
|
||||
self.nixosModules.nginx-website-miom
|
||||
self.nixosModules.opensearch
|
||||
self.nixosModules.owncast
|
||||
self.nixosModules.postgresql
|
||||
self.nixosModules.prometheus-exporters
|
||||
self.nixosModules.promtail
|
||||
self.nixosModules.searx
|
||||
self.nixosModules.tmate
|
||||
self.nixosModules.tt-rss
|
||||
self.nixosModules.obs-portal
|
||||
self.nixosModules.matrix
|
||||
self.nixosModules.matrix-irc
|
||||
self.nixosModules.matrix-telegram
|
||||
self.nixosModules.nginx-matrix
|
||||
];
|
||||
};
|
||||
|
||||
metronom = self.inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
flake = {
|
||||
inherit self inputs config;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
self.inputs.agenix.nixosModules.default
|
||||
self.nixosModules.home-manager
|
||||
./metronom
|
||||
self.nixosModules.overlays
|
||||
self.nixosModules.unlock-zfs-on-boot
|
||||
self.nixosModules.core
|
||||
self.nixosModules.backups
|
||||
self.nixosModules.mail
|
||||
self.nixosModules.prometheus-exporters
|
||||
self.nixosModules.promtail
|
||||
|
||||
self.inputs.simple-nixos-mailserver.nixosModule
|
||||
];
|
||||
};
|
||||
|
||||
tankstelle = self.inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
flake = {
|
||||
inherit self inputs config;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
self.inputs.agenix.nixosModules.default
|
||||
self.nixosModules.home-manager
|
||||
./tankstelle
|
||||
self.nixosModules.overlays
|
||||
self.nixosModules.core
|
||||
self.nixosModules.backups
|
||||
self.nixosModules.prometheus-exporters
|
||||
self.nixosModules.promtail
|
||||
];
|
||||
};
|
||||
|
||||
trinkgenossin = self.inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
flake = {
|
||||
inherit self inputs config;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
self.inputs.agenix.nixosModules.default
|
||||
self.nixosModules.home-manager
|
||||
./trinkgenossin
|
||||
self.nixosModules.backups
|
||||
self.nixosModules.overlays
|
||||
self.nixosModules.unlock-luks-on-boot
|
||||
self.nixosModules.core
|
||||
|
||||
self.nixosModules.garage
|
||||
self.nixosModules.nginx
|
||||
|
||||
# This module is already using options, and those options are used by the grafana module
|
||||
self.nixosModules.keycloak
|
||||
self.nixosModules.grafana
|
||||
self.nixosModules.prometheus
|
||||
self.nixosModules.loki
|
||||
];
|
||||
};
|
||||
|
||||
delite = self.inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
flake = {
|
||||
inherit self inputs config;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
self.inputs.agenix.nixosModules.default
|
||||
self.inputs.disko.nixosModules.disko
|
||||
self.nixosModules.home-manager
|
||||
./delite
|
||||
self.nixosModules.overlays
|
||||
self.nixosModules.unlock-luks-on-boot
|
||||
self.nixosModules.core
|
||||
self.nixosModules.prometheus-exporters
|
||||
self.nixosModules.promtail
|
||||
|
||||
self.nixosModules.garage
|
||||
self.nixosModules.nginx
|
||||
];
|
||||
};
|
||||
|
||||
blue-shell = self.inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
flake = {
|
||||
inherit self inputs config;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
self.inputs.agenix.nixosModules.default
|
||||
self.inputs.disko.nixosModules.disko
|
||||
self.nixosModules.home-manager
|
||||
./blue-shell
|
||||
self.nixosModules.overlays
|
||||
self.nixosModules.unlock-luks-on-boot
|
||||
self.nixosModules.core
|
||||
self.nixosModules.prometheus-exporters
|
||||
self.nixosModules.promtail
|
||||
|
||||
self.nixosModules.garage
|
||||
self.nixosModules.nginx
|
||||
];
|
||||
};
|
||||
|
||||
underground = self.inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
flake = {
|
||||
inherit self inputs config;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
self.inputs.agenix.nixosModules.default
|
||||
self.nixosModules.home-manager
|
||||
./underground
|
||||
self.nixosModules.overlays
|
||||
self.nixosModules.unlock-luks-on-boot
|
||||
self.nixosModules.core
|
||||
|
||||
self.nixosModules.backups
|
||||
self.nixosModules.keycloak
|
||||
self.nixosModules.postgresql
|
||||
self.nixosModules.matrix
|
||||
self.nixosModules.matrix-irc
|
||||
self.nixosModules.nginx
|
||||
self.nixosModules.nginx-matrix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
33
hosts/delite/configuration.nix
Normal file
33
hosts/delite/configuration.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.loader.grub.enable = true;
|
||||
|
||||
boot.kernelParams = [
|
||||
"boot.shell_on_fail=1"
|
||||
"ip=5.255.119.132::5.255.119.1:255.255.255.0:delite::off"
|
||||
];
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
13
hosts/delite/default.nix
Normal file
13
hosts/delite/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ flake, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
./disk-config.nix
|
||||
|
||||
./networking.nix
|
||||
./wireguard.nix
|
||||
#./backups.nix
|
||||
];
|
||||
}
|
84
hosts/delite/disk-config.nix
Normal file
84
hosts/delite/disk-config.nix
Normal file
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/vda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
bios = {
|
||||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
};
|
||||
boot = {
|
||||
size = "1G";
|
||||
type = "8300";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptroot";
|
||||
extraOpenArgs = [ ];
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
passwordFile = "/tmp/luks-password";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "vg0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
vg0 = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "40G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "8G";
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
};
|
||||
data = {
|
||||
size = "800G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "xfs";
|
||||
mountpoint = "/var/lib/garage/data";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
metadata = {
|
||||
size = "50G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "btrfs";
|
||||
mountpoint = "/var/lib/garage/meta";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
26
hosts/delite/hardware-configuration.nix
Normal file
26
hosts/delite/hardware-configuration.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
# 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 + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"virtio_blk"
|
||||
];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
26
hosts/delite/networking.nix
Normal file
26
hosts/delite/networking.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.garage.settings.rpc_public_addr = "[2a04:52c0:124:9d8c::2]:3901";
|
||||
|
||||
networking.hostName = "delite";
|
||||
networking.hostId = "00000004";
|
||||
|
||||
networking.useDHCP = false;
|
||||
systemd.network.enable = true;
|
||||
systemd.network.networks."10-wan" = {
|
||||
matchConfig.Name = "ens3";
|
||||
address = [
|
||||
"5.255.119.132/24"
|
||||
"2a04:52c0:124:9d8c::2/48"
|
||||
];
|
||||
gateway = [
|
||||
"5.255.119.1"
|
||||
"2a04:52c0:124::1"
|
||||
];
|
||||
};
|
||||
}
|
51
hosts/delite/wireguard.nix
Normal file
51
hosts/delite/wireguard.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
wireguardIPv4 = "10.7.6.6";
|
||||
wireguardIPv6 = "fd00:fae:fae:fae:fae:6::";
|
||||
in
|
||||
{
|
||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
age.secrets.wg-private-key.file = "${flake.self}/secrets/delite-wg-private-key.age";
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
wg-ssh = {
|
||||
listenPort = 51820;
|
||||
mtu = 1300;
|
||||
ips = [
|
||||
"${wireguardIPv4}/32"
|
||||
"${wireguardIPv6}/96"
|
||||
];
|
||||
privateKeyFile = config.age.secrets.wg-private-key.path;
|
||||
peers = flake.self.logins.wireguardDevices ++ [
|
||||
{
|
||||
# trinkgenossin.pub.solar
|
||||
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";
|
||||
allowedIPs = [
|
||||
"10.7.6.5/32"
|
||||
"fd00:fae:fae:fae:fae:5::/96"
|
||||
];
|
||||
#endpoint = "85.215.152.22:51820";
|
||||
endpoint = "[2a01:239:35d:f500::1]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.listenAddresses = [
|
||||
{
|
||||
addr = wireguardIPv4;
|
||||
port = 22;
|
||||
}
|
||||
{
|
||||
addr = "[${wireguardIPv6}]";
|
||||
port = 22;
|
||||
}
|
||||
];
|
||||
}
|
29
hosts/metronom/backups.nix
Normal file
29
hosts/metronom/backups.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, flake, ... }:
|
||||
{
|
||||
age.secrets."restic-repo-storagebox-metronom" = {
|
||||
file = "${flake.self}/secrets/restic-repo-storagebox-metronom.age";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
age.secrets.restic-repo-garage-metronom = {
|
||||
file = "${flake.self}/secrets/restic-repo-garage-metronom.age";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
age.secrets.restic-repo-garage-metronom-env = {
|
||||
file = "${flake.self}/secrets/restic-repo-garage-metronom-env.age";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
|
||||
pub-solar-os.backups.repos.storagebox = {
|
||||
passwordFile = config.age.secrets."restic-repo-storagebox-metronom".path;
|
||||
repository = "sftp:u377325@u377325.your-storagebox.de:/metronom-backups";
|
||||
};
|
||||
|
||||
pub-solar-os.backups.repos.garage = {
|
||||
passwordFile = config.age.secrets."restic-repo-garage-metronom".path;
|
||||
environmentFile = config.age.secrets."restic-repo-garage-metronom-env".path;
|
||||
repository = "s3:https://buckets.pub.solar/metronom-backups";
|
||||
};
|
||||
}
|
47
hosts/metronom/configuration.nix
Normal file
47
hosts/metronom/configuration.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
|
||||
boot.kernelParams = [
|
||||
"boot.shell_on_fail=1"
|
||||
"ip=dhcp"
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "igb" ];
|
||||
|
||||
# https://nixos.wiki/wiki/ZFS#declarative_mounting_of_ZFS_datasets
|
||||
systemd.services.zfs-mount.enable = false;
|
||||
|
||||
services.zfs.autoScrub = {
|
||||
enable = true;
|
||||
pools = [ "root_pool" ];
|
||||
};
|
||||
|
||||
# Declarative SSH private key
|
||||
age.secrets."metronom-root-ssh-key" = {
|
||||
file = "${flake.self}/secrets/metronom-root-ssh-key.age";
|
||||
path = "/root/.ssh/id_ed25519";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
|
||||
# Declarative SSH private key
|
||||
#age.secrets."metronom-root-ssh-key" = {
|
||||
# file = "${flake.self}/secrets/metronom-root-ssh-key.age";
|
||||
# path = "/root/.ssh/id_ed25519";
|
||||
# mode = "400";
|
||||
# owner = "root";
|
||||
#};
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
# should.
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
12
hosts/metronom/default.nix
Normal file
12
hosts/metronom/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ flake, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
|
||||
./networking.nix
|
||||
./wireguard.nix
|
||||
./backups.nix
|
||||
];
|
||||
}
|
48
hosts/metronom/hardware-configuration.nix
Normal file
48
hosts/metronom/hardware-configuration.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
# 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 + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"usbhid"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "root_pool/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2083-C68E";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
19
hosts/metronom/networking.nix
Normal file
19
hosts/metronom/networking.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
networking.hostName = "metronom";
|
||||
networking.extraHosts = ''
|
||||
127.0.0.2 mail.pub.solar mail
|
||||
::1 mail.pub.solar mail
|
||||
'';
|
||||
networking.hostId = "00000002";
|
||||
|
||||
networking.enableIPv6 = true;
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces."enp1s0".useDHCP = true;
|
||||
}
|
56
hosts/metronom/wireguard.nix
Normal file
56
hosts/metronom/wireguard.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
age.secrets.wg-private-key.file = "${flake.self}/secrets/metronom-wg-private-key.age";
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
wg-ssh = {
|
||||
listenPort = 51820;
|
||||
mtu = 1300;
|
||||
ips = [
|
||||
"10.7.6.3/32"
|
||||
"fd00:fae:fae:fae:fae:3::/96"
|
||||
];
|
||||
privateKeyFile = config.age.secrets.wg-private-key.path;
|
||||
peers = flake.self.logins.wireguardDevices ++ [
|
||||
{
|
||||
# nachtigall.pub.solar
|
||||
endpoint = "138.201.80.102:51820";
|
||||
publicKey = "qzNywKY9RvqTnDO8eLik75/SHveaSk9OObilDzv+xkk=";
|
||||
allowedIPs = [
|
||||
"10.7.6.1/32"
|
||||
"fd00:fae:fae:fae:fae:1::/96"
|
||||
];
|
||||
}
|
||||
{
|
||||
# trinkgenossin.pub.solar
|
||||
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";
|
||||
allowedIPs = [
|
||||
"10.7.6.5/32"
|
||||
"fd00:fae:fae:fae:fae:5::/96"
|
||||
];
|
||||
#endpoint = "85.215.152.22:51820";
|
||||
endpoint = "[2a01:239:35d:f500::1]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.listenAddresses = [
|
||||
{
|
||||
addr = "10.7.6.3";
|
||||
port = 22;
|
||||
}
|
||||
{
|
||||
addr = "[fd00:fae:fae:fae:fae:3::]";
|
||||
port = 22;
|
||||
}
|
||||
];
|
||||
}
|
34
hosts/nachtigall/backups.nix
Normal file
34
hosts/nachtigall/backups.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ config, flake, ... }:
|
||||
{
|
||||
age.secrets."restic-repo-droppie" = {
|
||||
file = "${flake.self}/secrets/restic-repo-droppie.age";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
age.secrets."restic-repo-storagebox-nachtigall" = {
|
||||
file = "${flake.self}/secrets/restic-repo-storagebox-nachtigall.age";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
age.secrets.restic-repo-garage-nachtigall = {
|
||||
file = "${flake.self}/secrets/restic-repo-garage-nachtigall.age";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
age.secrets.restic-repo-garage-nachtigall-env = {
|
||||
file = "${flake.self}/secrets/restic-repo-garage-nachtigall-env.age";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
|
||||
pub-solar-os.backups.repos.storagebox = {
|
||||
passwordFile = config.age.secrets."restic-repo-storagebox-nachtigall".path;
|
||||
repository = "sftp:u377325@u377325.your-storagebox.de:/backups";
|
||||
};
|
||||
|
||||
pub-solar-os.backups.repos.garage = {
|
||||
passwordFile = config.age.secrets."restic-repo-garage-nachtigall".path;
|
||||
environmentFile = config.age.secrets."restic-repo-garage-nachtigall-env".path;
|
||||
repository = "s3:https://buckets.pub.solar/nachtigall-backups";
|
||||
};
|
||||
}
|
128
hosts/nachtigall/configuration.nix
Normal file
128
hosts/nachtigall/configuration.nix
Normal file
|
@ -0,0 +1,128 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Use GRUB2 as the boot loader.
|
||||
# We don't use systemd-boot because Hetzner uses BIOS legacy boot.
|
||||
boot.loader.systemd-boot.enable = false;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = false;
|
||||
mirroredBoots = [
|
||||
{
|
||||
devices = [ "/dev/disk/by-id/nvme-SAMSUNG_MZVL21T0HCLR-00B00_S676NF0R517371" ];
|
||||
path = "/boot1";
|
||||
}
|
||||
{
|
||||
devices = [ "/dev/disk/by-id/nvme-KXG60ZNV1T02_TOSHIBA_Z9NF704ZF9ZL" ];
|
||||
path = "/boot2";
|
||||
}
|
||||
];
|
||||
copyKernels = true;
|
||||
};
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
|
||||
boot.kernelParams = [
|
||||
"boot.shell_on_fail=1"
|
||||
"ip=138.201.80.102::138.201.80.65:255.255.255.192:nachtigall::off"
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "igb" ];
|
||||
|
||||
# https://nixos.wiki/wiki/ZFS#declarative_mounting_of_ZFS_datasets
|
||||
systemd.services.zfs-mount.enable = false;
|
||||
|
||||
services.zfs.autoScrub = {
|
||||
enable = true;
|
||||
pools = [ "root_pool" ];
|
||||
};
|
||||
|
||||
# Declarative SSH private key
|
||||
age.secrets."nachtigall-root-ssh-key" = {
|
||||
file = "${flake.self}/secrets/nachtigall-root-ssh-key.age";
|
||||
path = "/root/.ssh/id_ed25519";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
|
||||
# keycloak
|
||||
age.secrets.keycloak-database-password = {
|
||||
file = "${flake.self}/secrets/keycloak-database-password.age";
|
||||
mode = "600";
|
||||
#owner = "keycloak";
|
||||
};
|
||||
|
||||
pub-solar-os.auth = {
|
||||
enable = true;
|
||||
database-password-file = config.age.secrets.keycloak-database-password.path;
|
||||
};
|
||||
|
||||
# matrix-synapse
|
||||
age.secrets."matrix-synapse-signing-key" = {
|
||||
file = "${flake.self}/secrets/matrix-synapse-signing-key.age";
|
||||
mode = "400";
|
||||
owner = "matrix-synapse";
|
||||
};
|
||||
|
||||
age.secrets."matrix-synapse-secret-config.yaml" = {
|
||||
file = "${flake.self}/secrets/matrix-synapse-secret-config.yaml.age";
|
||||
mode = "400";
|
||||
owner = "matrix-synapse";
|
||||
};
|
||||
|
||||
age.secrets."matrix-synapse-sliding-sync-secret" = {
|
||||
file = "${flake.self}/secrets/matrix-synapse-sliding-sync-secret.age";
|
||||
mode = "400";
|
||||
owner = "matrix-synapse";
|
||||
};
|
||||
|
||||
age.secrets."matrix-authentication-service-secret-config.yml" = {
|
||||
file = "${flake.self}/secrets/matrix-authentication-service-secret-config.yml.age";
|
||||
mode = "400";
|
||||
owner = "matrix-authentication-service";
|
||||
};
|
||||
|
||||
pub-solar-os.matrix = {
|
||||
enable = true;
|
||||
synapse = {
|
||||
sliding-sync.enable = false;
|
||||
signing_key_path = config.age.secrets."matrix-synapse-signing-key".path;
|
||||
extra-config-files = [
|
||||
config.age.secrets."matrix-synapse-secret-config.yaml".path
|
||||
|
||||
# The registration file is automatically generated after starting the
|
||||
# appservice for the first time.
|
||||
# cp /var/lib/mautrix-telegram/telegram-registration.yaml \
|
||||
# /var/lib/matrix-synapse/
|
||||
# chown matrix-synapse:matrix-synapse \
|
||||
# /var/lib/matrix-synapse/telegram-registration.yaml
|
||||
"/var/lib/matrix-synapse/telegram-registration.yaml"
|
||||
];
|
||||
app-service-config-files = [
|
||||
"/var/lib/matrix-synapse/telegram-registration.yaml"
|
||||
"/var/lib/matrix-appservice-irc/registration.yml"
|
||||
# "/matrix-appservice-slack-registration.yaml"
|
||||
# "/hookshot-registration.yml"
|
||||
# "/matrix-mautrix-signal-registration.yaml"
|
||||
# "/matrix-mautrix-telegram-registration.yaml"
|
||||
];
|
||||
};
|
||||
matrix-authentication-service.extra-config-files = [
|
||||
config.age.secrets."matrix-authentication-service-secret-config.yml".path
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.postgresql = {
|
||||
after = [ "var-lib-postgresql.mount" ];
|
||||
requisite = [ "var-lib-postgresql.mount" ];
|
||||
};
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
# should.
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
}
|
20
hosts/nachtigall/default.nix
Normal file
20
hosts/nachtigall/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ flake, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
|
||||
./networking.nix
|
||||
./wireguard.nix
|
||||
./backups.nix
|
||||
"${flake.inputs.fork}/nixos/modules/services//matrix/matrix-authentication-service.nix"
|
||||
"${flake.inputs.unstable}/nixos/modules/services/web-apps/mastodon.nix"
|
||||
];
|
||||
|
||||
disabledModules = [
|
||||
"services/matrix/matrix-authentication-service.nix "
|
||||
"services/web-apps/mastodon.nix"
|
||||
];
|
||||
}
|
65
hosts/nachtigall/hardware-configuration.nix
Normal file
65
hosts/nachtigall/hardware-configuration.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
# 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 = [
|
||||
"ahci"
|
||||
"nvme"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "root_pool/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib" = {
|
||||
device = "root_pool/data";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/postgresql" = {
|
||||
device = "root_pool/data/postgresql";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/docker" = {
|
||||
device = "root_pool/data/docker";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot1" = {
|
||||
device = "/dev/disk/by-uuid/5493-EFF5";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/boot2" = {
|
||||
device = "/dev/disk/by-uuid/5494-BA1E";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
31
hosts/nachtigall/networking.nix
Normal file
31
hosts/nachtigall/networking.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
networking.hostName = "nachtigall";
|
||||
networking.hostId = "00000001";
|
||||
|
||||
# Network (Hetzner uses static IP assignments, and we don't use DHCP here)
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces."enp35s0".ipv4.addresses = [
|
||||
{
|
||||
address = "138.201.80.102";
|
||||
prefixLength = 26;
|
||||
}
|
||||
];
|
||||
networking.interfaces."enp35s0".ipv6.addresses = [
|
||||
{
|
||||
address = "2a01:4f8:172:1c25::1";
|
||||
prefixLength = 64;
|
||||
}
|
||||
];
|
||||
networking.defaultGateway = "138.201.80.65";
|
||||
networking.defaultGateway6 = {
|
||||
address = "fe80::1";
|
||||
interface = "enp35s0";
|
||||
};
|
||||
}
|
56
hosts/nachtigall/wireguard.nix
Normal file
56
hosts/nachtigall/wireguard.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
age.secrets.wg-private-key.file = "${flake.self}/secrets/nachtigall-wg-private-key.age";
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
wg-ssh = {
|
||||
listenPort = 51820;
|
||||
mtu = 1300;
|
||||
ips = [
|
||||
"10.7.6.1/32"
|
||||
"fd00:fae:fae:fae:fae:1::/96"
|
||||
];
|
||||
privateKeyFile = config.age.secrets.wg-private-key.path;
|
||||
peers = flake.self.logins.wireguardDevices ++ [
|
||||
{
|
||||
# tankstelle.pub.solar
|
||||
endpoint = "80.244.242.5:51820";
|
||||
publicKey = "iRTlY1lB7nPXf2eXzX8ZZDkfMmXyGjff5/joccbP8Cg=";
|
||||
allowedIPs = [
|
||||
"10.7.6.4/32"
|
||||
"fd00:fae:fae:fae:fae:4::/96"
|
||||
];
|
||||
}
|
||||
{
|
||||
# trinkgenossin.pub.solar
|
||||
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";
|
||||
allowedIPs = [
|
||||
"10.7.6.5/32"
|
||||
"fd00:fae:fae:fae:fae:5::/96"
|
||||
];
|
||||
#endpoint = "85.215.152.22:51820";
|
||||
endpoint = "[2a01:239:35d:f500::1]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.listenAddresses = [
|
||||
{
|
||||
addr = "10.7.6.1";
|
||||
port = 22;
|
||||
}
|
||||
{
|
||||
addr = "[fd00:fae:fae:fae:fae:1::]";
|
||||
port = 22;
|
||||
}
|
||||
];
|
||||
}
|
13
hosts/tankstelle/backups.nix
Normal file
13
hosts/tankstelle/backups.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ flake, ... }:
|
||||
{
|
||||
age.secrets."restic-repo-droppie" = {
|
||||
file = "${flake.self}/secrets/restic-repo-droppie.age";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
age.secrets."restic-repo-storagebox-tankstelle" = {
|
||||
file = "${flake.self}/secrets/restic-repo-storagebox-tankstelle.age";
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
};
|
||||
}
|
16
hosts/tankstelle/configuration.nix
Normal file
16
hosts/tankstelle/configuration.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
13
hosts/tankstelle/default.nix
Normal file
13
hosts/tankstelle/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ flake, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
|
||||
./networking.nix
|
||||
./forgejo-actions-runner.nix
|
||||
./wireguard.nix
|
||||
#./backups.nix
|
||||
];
|
||||
}
|
62
hosts/tankstelle/forgejo-actions-runner.nix
Normal file
62
hosts/tankstelle/forgejo-actions-runner.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
age.secrets.tankstelle-forgejo-actions-runner-token = {
|
||||
file = "${flake.self}/secrets/tankstelle-forgejo-actions-runner-token.age";
|
||||
mode = "440";
|
||||
};
|
||||
|
||||
# Trust docker bridge interface traffic
|
||||
# Needed for the docker runner to communicate with the act_runner cache
|
||||
networking.firewall.trustedInterfaces = [ "br-+" ];
|
||||
|
||||
users.users.gitea-runner = {
|
||||
home = "/var/lib/gitea-runner/tankstelle";
|
||||
useDefaultShell = true;
|
||||
group = "gitea-runner";
|
||||
# Required to interact with nix daemon
|
||||
extraGroups = [ "wheel" ];
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
users.groups.gitea-runner = { };
|
||||
|
||||
systemd.tmpfiles.rules = [ "d '/var/lib/gitea-runner' 0750 gitea-runner gitea-runner - -" ];
|
||||
|
||||
systemd.services."gitea-runner-tankstelle" = {
|
||||
serviceConfig.DynamicUser = lib.mkForce false;
|
||||
path = with pkgs; [
|
||||
coreutils
|
||||
bash
|
||||
coreutils
|
||||
curl
|
||||
gawk
|
||||
gitMinimal
|
||||
gnused
|
||||
nodejs
|
||||
wget
|
||||
cachix
|
||||
jq
|
||||
nix
|
||||
];
|
||||
};
|
||||
|
||||
# forgejo actions runner
|
||||
# https://forgejo.org/docs/latest/admin/actions/
|
||||
# https://docs.gitea.com/usage/actions/quickstart
|
||||
services.gitea-actions-runner = {
|
||||
package = pkgs.forgejo-runner;
|
||||
instances."tankstelle" = {
|
||||
enable = true;
|
||||
name = config.networking.hostName;
|
||||
url = "https://git.pub.solar";
|
||||
tokenFile = config.age.secrets.tankstelle-forgejo-actions-runner-token.path;
|
||||
labels = [ "self-hosted:host://-self-hosted" ];
|
||||
};
|
||||
};
|
||||
}
|
41
hosts/tankstelle/hardware-configuration.nix
Normal file
41
hosts/tankstelle/hardware-configuration.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
# 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 + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"virtio_pci"
|
||||
"sr_mod"
|
||||
"virtio_blk"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/17531ffc-46bd-4259-8287-2dea73804b5b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/AF98-AA5C";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ { device = "/dev/disk/by-uuid/7aee04b5-1ef9-43de-acb4-70ac1238b58a"; } ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
38
hosts/tankstelle/networking.nix
Normal file
38
hosts/tankstelle/networking.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
networking = {
|
||||
hostName = "tankstelle";
|
||||
enableIPv6 = true;
|
||||
defaultGateway = {
|
||||
address = "80.244.242.1";
|
||||
interface = "enp1s0";
|
||||
};
|
||||
defaultGateway6 = {
|
||||
address = "2001:4d88:1ffa:26::1";
|
||||
interface = "enp1s0";
|
||||
};
|
||||
nameservers = [
|
||||
"95.129.51.51"
|
||||
"80.244.244.244"
|
||||
];
|
||||
interfaces."enp1s0" = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "80.244.242.5";
|
||||
prefixLength = 29;
|
||||
}
|
||||
];
|
||||
ipv6.addresses = [
|
||||
{
|
||||
address = "2001:4d88:1ffa:26::5";
|
||||
prefixLength = 64;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
56
hosts/tankstelle/wireguard.nix
Normal file
56
hosts/tankstelle/wireguard.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
age.secrets.wg-private-key.file = "${flake.self}/secrets/tankstelle-wg-private-key.age";
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
wg-ssh = {
|
||||
listenPort = 51820;
|
||||
mtu = 1300;
|
||||
ips = [
|
||||
"10.7.6.4/32"
|
||||
"fd00:fae:fae:fae:fae:4::/96"
|
||||
];
|
||||
privateKeyFile = config.age.secrets.wg-private-key.path;
|
||||
peers = flake.self.logins.wireguardDevices ++ [
|
||||
{
|
||||
# nachtigall.pub.solar
|
||||
endpoint = "138.201.80.102:51820";
|
||||
publicKey = "qzNywKY9RvqTnDO8eLik75/SHveaSk9OObilDzv+xkk=";
|
||||
allowedIPs = [
|
||||
"10.7.6.1/32"
|
||||
"fd00:fae:fae:fae:fae:1::/96"
|
||||
];
|
||||
}
|
||||
{
|
||||
# trinkgenossin.pub.solar
|
||||
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";
|
||||
allowedIPs = [
|
||||
"10.7.6.5/32"
|
||||
"fd00:fae:fae:fae:fae:5::/96"
|
||||
];
|
||||
#endpoint = "85.215.152.22:51820";
|
||||
endpoint = "[2a01:239:35d:f500::1]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.listenAddresses = [
|
||||
{
|
||||
addr = "10.7.6.4";
|
||||
port = 22;
|
||||
}
|
||||
{
|
||||
addr = "[fd00:fae:fae:fae:fae:4::]";
|
||||
port = 22;
|
||||
}
|
||||
];
|
||||
}
|
35
hosts/trinkgenossin/configuration.nix
Normal file
35
hosts/trinkgenossin/configuration.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.devices = [ "/dev/vda" ];
|
||||
|
||||
boot.kernelParams = [
|
||||
"boot.shell_on_fail=1"
|
||||
"ip=dhcp"
|
||||
];
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
12
hosts/trinkgenossin/default.nix
Normal file
12
hosts/trinkgenossin/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ flake, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
|
||||
./networking.nix
|
||||
./wireguard.nix
|
||||
#./backups.nix
|
||||
];
|
||||
}
|
54
hosts/trinkgenossin/hardware-configuration.nix
Normal file
54
hosts/trinkgenossin/hardware-configuration.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
# 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 = [ ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"sr_mod"
|
||||
"virtio_blk"
|
||||
"virtio_net"
|
||||
];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.initrd.luks.devices."cryptroot" = {
|
||||
device = "/dev/disk/by-uuid/52a1fd17-63d7-4d0a-b7ff-74aceaf6085a";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/garage/data" = {
|
||||
device = "/dev/disk/by-label/data";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/garage/meta" = {
|
||||
device = "/dev/disk/by-label/metadata";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
15
hosts/trinkgenossin/networking.nix
Normal file
15
hosts/trinkgenossin/networking.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.garage.settings.rpc_public_addr = "[2a01:239:35d:f500::1]:3901";
|
||||
|
||||
networking.hostName = "trinkgenossin";
|
||||
networking.hostId = "00000003";
|
||||
|
||||
networking.enableIPv6 = true;
|
||||
networking.useDHCP = true;
|
||||
}
|
86
hosts/trinkgenossin/wireguard.nix
Normal file
86
hosts/trinkgenossin/wireguard.nix
Normal file
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
wireguardIPv4 = "10.7.6.5";
|
||||
wireguardIPv6 = "fd00:fae:fae:fae:fae:5::";
|
||||
in
|
||||
{
|
||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
age.secrets.wg-private-key.file = "${flake.self}/secrets/trinkgenossin-wg-private-key.age";
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
wg-ssh = {
|
||||
listenPort = 51820;
|
||||
mtu = 1300;
|
||||
ips = [
|
||||
"${wireguardIPv4}/32"
|
||||
"${wireguardIPv6}/96"
|
||||
];
|
||||
privateKeyFile = config.age.secrets.wg-private-key.path;
|
||||
peers = flake.self.logins.wireguardDevices ++ [
|
||||
{
|
||||
# nachtigall.pub.solar
|
||||
endpoint = "138.201.80.102:51820";
|
||||
publicKey = "qzNywKY9RvqTnDO8eLik75/SHveaSk9OObilDzv+xkk=";
|
||||
allowedIPs = [
|
||||
"10.7.6.1/32"
|
||||
"fd00:fae:fae:fae:fae:1::/96"
|
||||
];
|
||||
}
|
||||
{
|
||||
# metronom.pub.solar
|
||||
endpoint = "49.13.236.167:51820";
|
||||
publicKey = "zOSYGO7MfnOOUnzaTcWiKRQM0qqxR3JQrwx/gtEtHmo=";
|
||||
allowedIPs = [
|
||||
"10.7.6.3/32"
|
||||
"fd00:fae:fae:fae:fae:3::/96"
|
||||
];
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
{
|
||||
# tankstelle.pub.solar
|
||||
endpoint = "80.244.242.5:51820";
|
||||
publicKey = "iRTlY1lB7nPXf2eXzX8ZZDkfMmXyGjff5/joccbP8Cg=";
|
||||
allowedIPs = [
|
||||
"10.7.6.4/32"
|
||||
"fd00:fae:fae:fae:fae:4::/96"
|
||||
];
|
||||
}
|
||||
{
|
||||
# delite.pub.solar
|
||||
endpoint = "5.255.119.132:51820";
|
||||
publicKey = "ZT2qGWgMPwHRUOZmTQHWCRX4m14YwOsiszjsA5bpc2k=";
|
||||
allowedIPs = [
|
||||
"10.7.6.6/32"
|
||||
"fd00:fae:fae:fae:fae:6::/96"
|
||||
];
|
||||
}
|
||||
{
|
||||
# blue-shell.pub.solar
|
||||
endpoint = "194.13.83.205:51820";
|
||||
publicKey = "bcrIpWrKc1M+Hq4ds3aN1lTaKE26f2rvXhd+93QrzR8=";
|
||||
allowedIPs = [
|
||||
"10.7.6.7/32"
|
||||
"fd00:fae:fae:fae:fae:7::/96"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.listenAddresses = [
|
||||
{
|
||||
addr = wireguardIPv4;
|
||||
port = 22;
|
||||
}
|
||||
{
|
||||
addr = "[${wireguardIPv6}]";
|
||||
port = 22;
|
||||
}
|
||||
];
|
||||
}
|
72
hosts/underground/configuration.nix
Normal file
72
hosts/underground/configuration.nix
Normal file
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Use GRUB2 as the boot loader.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
devices = [ "/dev/vda" ];
|
||||
};
|
||||
|
||||
pub-solar-os.networking.domain = "test.pub.solar";
|
||||
|
||||
systemd.tmpfiles.rules = [ "f /tmp/dbf 1777 root root 10d password" ];
|
||||
|
||||
# keycloak
|
||||
pub-solar-os.auth = {
|
||||
enable = true;
|
||||
database-password-file = "/tmp/dbf";
|
||||
};
|
||||
services.keycloak.database.createLocally = true;
|
||||
|
||||
# matrix-synapse
|
||||
# test.pub.solar /.well-known is required for federation
|
||||
services.nginx.virtualHosts."${config.pub-solar-os.networking.domain}" = {
|
||||
default = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
|
||||
age.secrets."staging-matrix-synapse-secret-config.yaml" = {
|
||||
file = "${flake.self}/secrets/staging-matrix-synapse-secret-config.yaml.age";
|
||||
mode = "400";
|
||||
owner = "matrix-synapse";
|
||||
};
|
||||
|
||||
age.secrets."staging-matrix-authentication-service-secret-config.yml" = {
|
||||
file = "${flake.self}/secrets/staging-matrix-authentication-service-secret-config.yml.age";
|
||||
mode = "400";
|
||||
owner = "matrix-authentication-service";
|
||||
};
|
||||
|
||||
pub-solar-os.matrix = {
|
||||
enable = true;
|
||||
synapse = {
|
||||
extra-config-files = [
|
||||
config.age.secrets."staging-matrix-synapse-secret-config.yaml".path
|
||||
|
||||
# The registration file is automatically generated after starting the
|
||||
# appservice for the first time.
|
||||
# cp /var/lib/mautrix-telegram/telegram-registration.yaml \
|
||||
# /var/lib/matrix-synapse/
|
||||
# chown matrix-synapse:matrix-synapse \
|
||||
# /var/lib/matrix-synapse/telegram-registration.yaml
|
||||
#"/var/lib/matrix-synapse/telegram-registration.yaml"
|
||||
];
|
||||
app-service-config-files = [
|
||||
"/var/lib/matrix-appservice-irc/registration.yml"
|
||||
#"/var/lib/matrix-synapse/telegram-registration.yaml"
|
||||
];
|
||||
};
|
||||
matrix-authentication-service.extra-config-files = [
|
||||
config.age.secrets."staging-matrix-authentication-service-secret-config.yml".path
|
||||
];
|
||||
};
|
||||
|
||||
services.openssh.openFirewall = true;
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
16
hosts/underground/default.nix
Normal file
16
hosts/underground/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ flake, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
|
||||
./networking.nix
|
||||
"${flake.inputs.fork}/nixos/modules/services//matrix/matrix-authentication-service.nix"
|
||||
];
|
||||
|
||||
disabledModules = [
|
||||
"services/matrix/matrix-authentication-service.nix "
|
||||
];
|
||||
}
|
47
hosts/underground/hardware-configuration.nix
Normal file
47
hosts/underground/hardware-configuration.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
# 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 + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.initrd.luks.devices."cryptroot" = {
|
||||
device = "/dev/disk/by-label/cryptroot";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-label/swap"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
30
hosts/underground/networking.nix
Normal file
30
hosts/underground/networking.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
networking.hostName = "underground";
|
||||
|
||||
networking = {
|
||||
defaultGateway = {
|
||||
address = "80.244.242.1";
|
||||
interface = "enp1s0";
|
||||
};
|
||||
nameservers = [
|
||||
"95.129.51.51"
|
||||
"80.244.244.244"
|
||||
];
|
||||
interfaces.enp1s0 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "80.244.242.3";
|
||||
prefixLength = 29;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
21
lib/compat/default.nix
Normal file
21
lib/compat/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
let
|
||||
lock = builtins.fromJSON (
|
||||
builtins.readFile builtins.path {
|
||||
path = ../../flake.lock;
|
||||
name = "lockPath";
|
||||
}
|
||||
);
|
||||
flake =
|
||||
import
|
||||
(fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
})
|
||||
{
|
||||
src = builtins.path {
|
||||
path = ../../.;
|
||||
name = "projectRoot";
|
||||
};
|
||||
};
|
||||
in
|
||||
flake
|
10
lib/compat/nixos/default.nix
Normal file
10
lib/compat/nixos/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
let
|
||||
inherit (default.inputs.nixos) lib;
|
||||
|
||||
host = configs.${hostname} or configs.PubSolarOS;
|
||||
configs = default.nixosConfigurations;
|
||||
default = (import ../.).defaultNix;
|
||||
hostname = lib.fileContents /etc/hostname;
|
||||
in
|
||||
host
|
24
lib/default.nix
Normal file
24
lib/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
self,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Configuration common to all Linux systems
|
||||
flake = {
|
||||
lib =
|
||||
let
|
||||
callLibs = file: import file { inherit lib; };
|
||||
in
|
||||
rec {
|
||||
## Define your own library functions here!
|
||||
#id = x: x;
|
||||
## Or in files, containing functions that take {lib}
|
||||
#foo = callLibs ./foo.nix;
|
||||
## In configs, they can be used under "lib.our"
|
||||
|
||||
deploy = import ./deploy.nix { inherit inputs lib; };
|
||||
};
|
||||
};
|
||||
}
|
80
lib/deploy.nix
Normal file
80
lib/deploy.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
The contents of this file are adapted from digga
|
||||
https://github.com/divnix/digga
|
||||
|
||||
Licensed under the MIT license
|
||||
*/
|
||||
|
||||
{ lib, inputs }:
|
||||
let
|
||||
getFqdn =
|
||||
c:
|
||||
let
|
||||
net = c.config.networking;
|
||||
fqdn =
|
||||
if (net ? domain) && (net.domain != null) then "${net.hostName}.${net.domain}" else net.hostName;
|
||||
in
|
||||
fqdn;
|
||||
in
|
||||
{
|
||||
mkDeployNodes =
|
||||
systemConfigurations: extraConfig:
|
||||
/*
|
||||
*
|
||||
Synopsis: mkNodes _systemConfigurations_ _extraConfig_
|
||||
|
||||
Generate the `nodes` attribute expected by deploy-rs
|
||||
where _systemConfigurations_ are `nodes`.
|
||||
|
||||
_systemConfigurations_ should take the form of a flake's
|
||||
_nixosConfigurations_. Note that deploy-rs does not currently support
|
||||
deploying to darwin hosts.
|
||||
|
||||
_extraConfig_, if specified, will be merged into each of the
|
||||
nodes' configurations.
|
||||
|
||||
Example _systemConfigurations_ input:
|
||||
|
||||
```
|
||||
{
|
||||
hostname-1 = {
|
||||
fastConnection = true;
|
||||
sshOpts = [ "-p" "25" ];
|
||||
};
|
||||
hostname-2 = {
|
||||
sshOpts = [ "-p" "19999" ];
|
||||
sshUser = "root";
|
||||
};
|
||||
}
|
||||
```
|
||||
*
|
||||
*/
|
||||
lib.recursiveUpdate (lib.mapAttrs (_: c: {
|
||||
hostname = getFqdn c;
|
||||
profiles.system =
|
||||
let
|
||||
system = c.pkgs.system;
|
||||
|
||||
# Unmodified nixpkgs
|
||||
pkgs = import inputs.nixpkgs { inherit system; };
|
||||
|
||||
# nixpkgs with deploy-rs overlay but force the nixpkgs package
|
||||
deployPkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
inputs.deploy-rs.overlay # or deploy-rs.overlays.default
|
||||
(self: super: {
|
||||
deploy-rs = {
|
||||
inherit (pkgs) deploy-rs;
|
||||
lib = super.deploy-rs.lib;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
user = "root";
|
||||
path = deployPkgs.deploy-rs.lib.activate.nixos c;
|
||||
};
|
||||
}) systemConfigurations) extraConfig;
|
||||
}
|
101
logins/admins.nix
Normal file
101
logins/admins.nix
Normal file
|
@ -0,0 +1,101 @@
|
|||
{
|
||||
axeman = rec {
|
||||
sshPubKeys = {
|
||||
axeman-1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMNeQYLFauAbzDyIbKC86NUh9yZfiyBm/BtIdkcpZnSU axeman@tuxnix";
|
||||
};
|
||||
|
||||
secretEncryptionKeys = sshPubKeys;
|
||||
|
||||
wireguardDevices = [
|
||||
{
|
||||
# tuxnix
|
||||
publicKey = "fTvULvdsc92binFaBV+uWwFi33bi8InShcaPnoxUZEA=";
|
||||
allowedIPs = [
|
||||
"10.7.6.203/32"
|
||||
"fd00:fae:fae:fae:fae:203::/96"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
b12f = rec {
|
||||
sshPubKeys = {
|
||||
b12f-gpg = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDVbUEOgciblRPOCaCkkwfYoKLjmJ6JKxnfg6MY7sN3W1/N4AsC27bvYPkYI66d4M3Ygi6nztaUrIIKBOPZrQtS0vx1jqosmcDwBMttNI7u4LdSDjGMEGB4zJdfR60HFuzpSNaBI/nKMWcAxr8v1KODy/mKTQ7fnMDN15OhvE7sAZe26B6IptUbG1DLuouezd4AW0OwQ3c6hVIuv5eF96OKrwFZ9XpNyYAashy8WTYqJWJRb71DV8oiqT9b3sN0Dy+7nUAPcLvJdwUDGjHQvnklgFUupKtrPhpRWqgJ41l4ebb1DCxmoL2zpdVohUK4eVC9ELdplvXtK+EJIJ1lKcDAYduYcxk//3+EdUDH0IkfXvz0Tomryu2BeyxURdMPzQh+ctHUWNI49tByx/mWrEqSu+XdgvtcumVg+jNUZKL9eA++xxuOan7H/OyshptLugZHd2e9JNM34NEOUEptq7LtHD5pEdXRV1ZT1IOsuSoDtdX14GeP2GSl21eKLnvSu9g8nGULIsx9hI3CrrlvvL9JU+Aymb4iEvqLhDeUNE643uYQad6P2SuK0kLQ/9Ny0z3y6bgglGn2uDUiAOPd8c+gFRRkMWvAWjWQi3iIR9TYBS4Z+CeYmUv8X2UCRcQPBn1wt69rvE9RcfHqRLZTUE5SpstQ0rXLinXmRA/WQV5Bdw== yubi-gpg";
|
||||
};
|
||||
|
||||
secretEncryptionKeys = {
|
||||
bbcom = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCmXpOU6vzQiVSSYCoxHYv7wDxC63Qg3dxlAMR6AOzwIABCU5PFFNcO0NWYms/YR7MOViorl+19LCLRABar9JgHU1n+uqxKV6eGph3OPeMp5sN8LAh7C9N+TZj8iJzBxQ3ch+Z/LdmLRwYNJ7KSUI+gwGK6xRS3+z1022Y4P0G0sx7IeCBl4lealQEIIF10ZOfjUdBcLQar7XTc5AxyGKnHCerXHRtccCoadLQujk0AvPXbv3Ma4JwX9X++AnCWRWakqS5UInu2tGuZ/6Hrjd2a9AKWjTaBVDcbYqCvY4XVuMj2/A2bCceFBaoi41apybSk26FSFTU4qiEUNQ6lxeOwG4+1NCXyHe2bGI4VyoxinDYa8vLLzXIRfTRA0qoGfCweXNeWPf0jMqASkUKaSOH5Ot7O5ps34r0j9pWzavDid8QeKJPyhxKuF1a5G4iBEZ0O9vuti60dPSjJPci9oTxbune2/jb7Sa0yO06DtLFJ2ncr5f70s/BDxKk4XIwQLy+KsvzlQEGdY8yA6xv28bOGxL3sQ0HE2pDTsvIbAisVOKzdJeolStL9MM5W8Hg0r/KkGj2bg0TfoRp1xHV9hjKkvJrsQ6okaPvNFeZq0HXzPhWMOVQ+/46z80uaQ1ByRLr3FTwuWJ7F/73ndfxiq6bDE4z2Ji0vOjeWJm6HCxTdGw== hello@benjaminbaedorf.com";
|
||||
yubi485 = "age1yubikey1qgxuu2x3uzw7k5pg5sp2dv43edhwdz3xuhj7kjqrnw0p8t0l67c5yz9nm6q";
|
||||
yubi464 = "age1yubikey1qd7szmr9ux2znl4x4hzykkwaru60nr4ufu6kdd88sm7657gjz4x5w0jy4y7";
|
||||
} // sshPubKeys;
|
||||
|
||||
wireguardDevices = [
|
||||
{
|
||||
# stroopwafel
|
||||
publicKey = "NNb7T8Jmn+V2dTZ8T6Fcq7hGomHGDckKoV3kK2oAhSE=";
|
||||
allowedIPs = [
|
||||
"10.7.6.200/32"
|
||||
"fd00:fae:fae:fae:fae:200::/96"
|
||||
];
|
||||
}
|
||||
{
|
||||
# chocolatebar
|
||||
publicKey = "AS9w0zDUFLcH6IiF6T1vsyZPWPJ3p5fKsjIsM2AoZz8=";
|
||||
allowedIPs = [
|
||||
"10.7.6.205/32"
|
||||
"fd00:fae:fae:fae:fae:205::/96"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
hensoko = rec {
|
||||
sshPubKeys = {
|
||||
hensoko-1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEbaQdxp7Flz6ttELe63rn+Nt9g43qJOLih6VCMP4gPb";
|
||||
hensoko-2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAqkqMYgncrnczcW/0PY+Z+FmNXXpgw6D9JWTTwiainy";
|
||||
};
|
||||
|
||||
secretEncryptionKeys = sshPubKeys;
|
||||
wireguardDevices = [
|
||||
{
|
||||
# judy
|
||||
publicKey = "I+gN7v1VXkAGoSir6L8aebtLbguvy5nAx1QVDTzdckk=";
|
||||
allowedIPs = [
|
||||
"10.7.6.202/32"
|
||||
"fd00:fae:fae:fae:fae:202::/96"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
teutat3s = {
|
||||
sshPubKeys = {
|
||||
teutat3s-1 = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFro/k4Mgqyh8yV/7Zwjc0dv60ZM7bROBU9JNd99P/4co6fxPt1pJiU/pEz2Dax/HODxgcO+jFZfvPEuLMCeAl0= YubiKey #10593996 PIV Slot 9a";
|
||||
teutat3s-2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHcU6KPy4b1MQXd6EJhcYwbJu7E+0IrBZF/IP6T7gbMf teutat3s@dumpyourvms";
|
||||
};
|
||||
|
||||
secretEncryptionKeys = {
|
||||
teutat3s-1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHcU6KPy4b1MQXd6EJhcYwbJu7E+0IrBZF/IP6T7gbMf teutat3s@dumpyourvms";
|
||||
teutat3s-2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPAsRdVYK0077cdtavmrRr6akrI68T1EDY4Hfv4+W86J teutat3s@ryzensun";
|
||||
};
|
||||
|
||||
wireguardDevices = [
|
||||
{
|
||||
# dumpyourvms
|
||||
publicKey = "3UrVLQrwXnPAVXPiTAd7eM3fZYxnFSYgKAGpNMUwnUk=";
|
||||
allowedIPs = [
|
||||
"10.7.6.201/32"
|
||||
"fd00:fae:fae:fae:fae:201::/96"
|
||||
];
|
||||
}
|
||||
{
|
||||
# ryzensun
|
||||
publicKey = "oVF2/s7eIxyVjtG0MhKPx5SZ1JllZg+ZFVF2eVYtPGo=";
|
||||
allowedIPs = [
|
||||
"10.7.6.204/32"
|
||||
"fd00:fae:fae:fae:fae:204::/96"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
22
logins/default.nix
Normal file
22
logins/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
admins = import ./admins.nix;
|
||||
robots = import ./robots.nix;
|
||||
in
|
||||
{
|
||||
flake = {
|
||||
logins = {
|
||||
admins = admins;
|
||||
wireguardDevices = lib.lists.foldl (
|
||||
wireguardDevices: adminConfig:
|
||||
wireguardDevices ++ (if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else [ ])
|
||||
) [ ] (lib.attrsets.attrValues admins);
|
||||
sshPubKeys = lib.lists.foldl (
|
||||
sshPubKeys: adminConfig:
|
||||
sshPubKeys
|
||||
++ (if adminConfig ? "sshPubKeys" then lib.attrsets.attrValues adminConfig.sshPubKeys else [ ])
|
||||
) [ ] (lib.attrsets.attrValues admins);
|
||||
robots.sshPubKeys = lib.attrsets.attrValues robots;
|
||||
};
|
||||
};
|
||||
}
|
9
logins/public-keys/default.nix
Normal file
9
logins/public-keys/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
flake = {
|
||||
publicKeys = {
|
||||
admins = lib.attrsets.attrValues (import ./admins.nix);
|
||||
robots = lib.attrsets.attrValues (import ./robots.nix);
|
||||
};
|
||||
};
|
||||
}
|
8
logins/robots.nix
Normal file
8
logins/robots.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
# Used for restic backups to droppie, a server run by @b12f
|
||||
"root@droppie" =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZQSephFJU0NMbVbhwvVJ2/m6jcPYo1IsWCsoarqKin root@droppie";
|
||||
|
||||
"hakkonaut" =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGP5MvCwNRtCcP1pSDrn0XZTNlpOqYnjHDm9/OI4hECW hakkonaut";
|
||||
}
|
292
modules/backups/default.nix
Normal file
292
modules/backups/default.nix
Normal file
|
@ -0,0 +1,292 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
utils = import "${flake.inputs.nixpkgs}/nixos/lib/utils.nix" {
|
||||
inherit lib;
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
};
|
||||
# Type for a valid systemd unit option. Needed for correctly passing "timerConfig" to "systemd.timers"
|
||||
inherit (utils.systemdUtils.unitOptions) unitOption;
|
||||
inherit (lib)
|
||||
literalExpression
|
||||
mkOption
|
||||
mkPackageOption
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
options.pub-solar-os.backups = {
|
||||
repos = mkOption {
|
||||
description = ''
|
||||
Configuration of Restic repositories.
|
||||
'';
|
||||
type = types.attrsOf (
|
||||
types.submodule (
|
||||
{ name, ... }:
|
||||
{
|
||||
options = {
|
||||
passwordFile = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
Read the repository password from a file.
|
||||
'';
|
||||
example = "/etc/nixos/restic-password";
|
||||
};
|
||||
|
||||
environmentFile = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Read repository secrets as environment variables from a file.
|
||||
'';
|
||||
example = "/etc/nixos/restic-env";
|
||||
};
|
||||
|
||||
repository = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
repository to backup to.
|
||||
'';
|
||||
example = "sftp:backup@192.168.1.100:/backups/${name}";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
default = { };
|
||||
example = {
|
||||
remotebackup = {
|
||||
repository = "sftp:backup@host:/backups/home";
|
||||
passwordFile = "/etc/nixos/secrets/restic-password";
|
||||
environmentFile = "/etc/nixos/secrets/restic-env";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
restic = mkOption {
|
||||
description = ''
|
||||
Periodic backups to create with Restic.
|
||||
'';
|
||||
type = types.attrsOf (
|
||||
types.submodule (
|
||||
{ name, ... }:
|
||||
{
|
||||
options = {
|
||||
paths = mkOption {
|
||||
# This is nullable for legacy reasons only. We should consider making it a pure listOf
|
||||
# after some time has passed since this comment was added.
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = [ ];
|
||||
description = ''
|
||||
Which paths to backup, in addition to ones specified via
|
||||
`dynamicFilesFrom`. If null or an empty array and
|
||||
`dynamicFilesFrom` is also null, no backup command will be run.
|
||||
This can be used to create a prune-only job.
|
||||
'';
|
||||
example = [
|
||||
"/var/lib/postgresql"
|
||||
"/home/user/backup"
|
||||
];
|
||||
};
|
||||
|
||||
exclude = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Patterns to exclude when backing up. See
|
||||
https://restic.readthedocs.io/en/latest/040_backup.html#excluding-files for
|
||||
details on syntax.
|
||||
'';
|
||||
example = [
|
||||
"/var/cache"
|
||||
"/home/*/.cache"
|
||||
".git"
|
||||
];
|
||||
};
|
||||
|
||||
timerConfig = mkOption {
|
||||
type = types.nullOr (types.attrsOf unitOption);
|
||||
default = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
description = ''
|
||||
When to run the backup. See {manpage}`systemd.timer(5)` for
|
||||
details. If null no timer is created and the backup will only
|
||||
run when explicitly started.
|
||||
'';
|
||||
example = {
|
||||
OnCalendar = "00:05";
|
||||
RandomizedDelaySec = "5h";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "root";
|
||||
description = ''
|
||||
As which user the backup should run.
|
||||
'';
|
||||
example = "postgresql";
|
||||
};
|
||||
|
||||
extraBackupArgs = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Extra arguments passed to restic backup.
|
||||
'';
|
||||
example = [ "--exclude-file=/etc/nixos/restic-ignore" ];
|
||||
};
|
||||
|
||||
extraOptions = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Extra extended options to be passed to the restic --option flag.
|
||||
'';
|
||||
example = [ "sftp.command='ssh backup@192.168.1.100 -i /home/user/.ssh/id_rsa -s sftp'" ];
|
||||
};
|
||||
|
||||
initialize = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Create the repository if it doesn't exist.
|
||||
'';
|
||||
};
|
||||
|
||||
pruneOpts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
A list of options (--keep-\* et al.) for 'restic forget
|
||||
--prune', to automatically prune old snapshots. The
|
||||
'forget' command is run *after* the 'backup' command, so
|
||||
keep that in mind when constructing the --keep-\* options.
|
||||
'';
|
||||
example = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 75"
|
||||
];
|
||||
};
|
||||
|
||||
runCheck = mkOption {
|
||||
type = types.bool;
|
||||
default = (builtins.length config.pub-solar-os.backups.restic.${name}.checkOpts > 0);
|
||||
defaultText = literalExpression ''builtins.length config.services.backups.${name}.checkOpts > 0'';
|
||||
description = "Whether to run the `check` command with the provided `checkOpts` options.";
|
||||
example = true;
|
||||
};
|
||||
|
||||
checkOpts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
A list of options for 'restic check'.
|
||||
'';
|
||||
example = [ "--with-cache" ];
|
||||
};
|
||||
|
||||
dynamicFilesFrom = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
A script that produces a list of files to back up. The
|
||||
results of this command are given to the '--files-from'
|
||||
option. The result is merged with paths specified via `paths`.
|
||||
'';
|
||||
example = "find /home/matt/git -type d -name .git";
|
||||
};
|
||||
|
||||
backupPrepareCommand = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
A script that must run before starting the backup process.
|
||||
'';
|
||||
};
|
||||
|
||||
backupCleanupCommand = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
A script that must run after finishing the backup process.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "restic" { };
|
||||
|
||||
createWrapper = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to generate and add a script to the system path, that has the same environment variables set
|
||||
as the systemd service. This can be used to e.g. mount snapshots or perform other opterations, without
|
||||
having to manually specify most options.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
default = { };
|
||||
example = {
|
||||
localbackup = {
|
||||
paths = [ "/home" ];
|
||||
exclude = [ "/home/*/.cache" ];
|
||||
initialize = true;
|
||||
};
|
||||
remotebackup = {
|
||||
paths = [ "/home" ];
|
||||
extraOptions = [
|
||||
"sftp.command='ssh backup@host -i /etc/nixos/secrets/backup-private-key -s sftp'"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "00:05";
|
||||
RandomizedDelaySec = "5h";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
services.restic.backups =
|
||||
let
|
||||
repos = config.pub-solar-os.backups.repos;
|
||||
restic = config.pub-solar-os.backups.restic;
|
||||
|
||||
repoNames = builtins.attrNames repos;
|
||||
backupNames = builtins.attrNames restic;
|
||||
|
||||
createBackups =
|
||||
backupName:
|
||||
map (repoName: {
|
||||
name = "${backupName}-${repoName}";
|
||||
value = repos."${repoName}" // restic."${backupName}";
|
||||
}) repoNames;
|
||||
|
||||
in
|
||||
builtins.listToAttrs (lib.lists.flatten (map createBackups backupNames));
|
||||
|
||||
# Used for pub-solar-os.backups.repos.storagebox
|
||||
programs.ssh.knownHosts = {
|
||||
"u377325.your-storagebox.de".publicKey =
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA5EB5p/5Hp3hGW1oHok+PIOH9Pbn7cnUiGmUEBrCVjnAw+HrKyN8bYVV0dIGllswYXwkG/+bgiBlE6IVIBAq+JwVWu1Sss3KarHY3OvFJUXZoZyRRg/Gc/+LRCE7lyKpwWQ70dbelGRyyJFH36eNv6ySXoUYtGkwlU5IVaHPApOxe4LHPZa/qhSRbPo2hwoh0orCtgejRebNtW5nlx00DNFgsvn8Svz2cIYLxsPVzKgUxs8Zxsxgn+Q/UvR7uq4AbAhyBMLxv7DjJ1pc7PJocuTno2Rw9uMZi1gkjbnmiOh6TTXIEWbnroyIhwc8555uto9melEUmWNQ+C+PwAK+MPw==";
|
||||
"[u377325.your-storagebox.de]:23".publicKey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs";
|
||||
};
|
||||
};
|
||||
}
|
22
modules/caddy/default.nix
Normal file
22
modules/caddy/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.caddy = {
|
||||
enable = lib.mkForce true;
|
||||
group = config.pub-solar-os.authentication.robot.username;
|
||||
email = config.pub-solar-os.adminEmail;
|
||||
enableReload = true;
|
||||
globalConfig = lib.mkForce ''
|
||||
grace_period 60s
|
||||
'';
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
}
|
44
modules/collabora/default.nix
Normal file
44
modules/collabora/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.nginx.virtualHosts."collabora.${config.pub-solar-os.networking.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
proxy_pass http://127.0.0.1:9980;
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
oci-containers = {
|
||||
backend = "docker";
|
||||
|
||||
containers."collabora" = {
|
||||
image = "collabora/code";
|
||||
autoStart = true;
|
||||
ports = [ "127.0.0.1:9980:9980" ];
|
||||
extraOptions = [
|
||||
"--cap-add=MKNOD"
|
||||
"--pull=always"
|
||||
];
|
||||
environment = {
|
||||
server_name = "collabora.${config.pub-solar-os.networking.domain}";
|
||||
aliasgroup1 = "https://cloud.${config.pub-solar-os.networking.domain}:443";
|
||||
DONT_GEN_SSL_CERT = "1";
|
||||
extra_params = "--o:ssl.enable=false --o:ssl.termination=true";
|
||||
SLEEPFORDEBUGGER = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
58
modules/core/default.nix
Normal file
58
modules/core/default.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
flake,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./nix.nix
|
||||
./networking.nix
|
||||
./terminal-tooling.nix
|
||||
./users.nix
|
||||
];
|
||||
|
||||
options.pub-solar-os =
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
adminEmail = mkOption {
|
||||
description = "Email address to use for administrative stuff like ACME";
|
||||
type = types.str;
|
||||
default = "admins@pub.solar";
|
||||
};
|
||||
|
||||
privacyPolicyUrl = mkOption {
|
||||
description = "URL of the privacy policy. Used to link there from applications";
|
||||
type = types.str;
|
||||
default = "https://pub.solar/privacy";
|
||||
};
|
||||
|
||||
imprintUrl = mkOption {
|
||||
description = "URL of the imprint. Used to link there from applications";
|
||||
type = types.str;
|
||||
default = "https://pub.solar/about";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment = {
|
||||
# Just a couple of global packages to make our lives easier
|
||||
systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
wget
|
||||
];
|
||||
};
|
||||
|
||||
# Select internationalization properties
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "us";
|
||||
};
|
||||
|
||||
time.timeZone = "Etc/UTC";
|
||||
};
|
||||
}
|
84
modules/core/networking.nix
Normal file
84
modules/core/networking.nix
Normal file
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.pub-solar-os.networking =
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
domain = mkOption {
|
||||
description = "domain on which all services should run. This defaults to pub.solar";
|
||||
type = types.str;
|
||||
default = "pub.solar";
|
||||
};
|
||||
|
||||
defaultInterface = mkOption {
|
||||
description = "Network interface which should be used as the default internet-connected one";
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
# Don't expose SSH via public interfaces
|
||||
networking.firewall.interfaces.wg-ssh.allowedTCPPorts = [ 22 ];
|
||||
|
||||
networking.domain = config.pub-solar-os.networking.domain;
|
||||
|
||||
networking.hosts = {
|
||||
"10.7.6.1" = [ "nachtigall.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"10.7.6.3" = [ "metronom.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"10.7.6.4" = [ "tankstelle.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"10.7.6.5" = [ "trinkgenossin.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"10.7.6.6" = [ "delite.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"10.7.6.7" = [ "blue-shell.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"fd00:fae:fae:fae:fae:1::" = [ "nachtigall.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"fd00:fae:fae:fae:fae:3::" = [ "metronom.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"fd00:fae:fae:fae:fae:4::" = [ "tankstelle.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"fd00:fae:fae:fae:fae:5::" = [ "trinkgenossin.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"fd00:fae:fae:fae:fae:6::" = [ "delite.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
"fd00:fae:fae:fae:fae:7::" = [ "blue-shell.wg.${config.pub-solar-os.networking.domain}" ];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = lib.mkDefault false;
|
||||
settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
PasswordAuthentication = false;
|
||||
# Add back openssh MACs that got removed from defaults
|
||||
# for backwards compatibility
|
||||
#
|
||||
# NixOS default openssh MACs have changed to use "encrypt-then-mac" only.
|
||||
# This breaks compatibilty with clients that do not offer these MACs. For
|
||||
# compatibility reasons, we add back the old defaults.
|
||||
# See: https://github.com/NixOS/nixpkgs/pull/231165
|
||||
#
|
||||
# https://blog.stribik.technology/2015/01/04/secure-secure-shell.html
|
||||
# https://infosec.mozilla.org/guidelines/openssh#modern-openssh-67
|
||||
Macs = [
|
||||
"hmac-sha2-512-etm@openssh.com"
|
||||
"hmac-sha2-256-etm@openssh.com"
|
||||
"umac-128-etm@openssh.com"
|
||||
"hmac-sha2-512"
|
||||
"hmac-sha2-256"
|
||||
"umac-128@openssh.com"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
DNS=193.110.81.0#dns0.eu 185.253.5.0#dns0.eu 2a0f:fc80::#dns0.eu 2a0f:fc81::#dns0.eu 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
|
||||
FallbackDNS=5.1.66.255#dot.ffmuc.net 185.150.99.255#dot.ffmuc.net 2001:678:e68:f000::#dot.ffmuc.net 2001:678:ed0:f000::#dot.ffmuc.net
|
||||
Domains=~.
|
||||
DNSOverTLS=yes
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
66
modules/core/nix.nix
Normal file
66
modules/core/nix.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixpkgs.config = lib.mkDefault {
|
||||
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ ];
|
||||
permittedInsecurePackages = [ "olm-3.2.16" ];
|
||||
};
|
||||
|
||||
system.activationScripts.diff-closures = {
|
||||
text = ''
|
||||
if [[ -e /run/current-system ]]; then
|
||||
${config.nix.package}/bin/nix store diff-closures \
|
||||
/run/current-system "$systemConfig" \
|
||||
--extra-experimental-features nix-command
|
||||
fi
|
||||
'';
|
||||
supportsDryActivation = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
# Use default version alias for nix package
|
||||
package = pkgs.nix;
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
|
||||
registry = {
|
||||
nixpkgs.flake = flake.inputs.nixpkgs;
|
||||
unstable.flake = flake.inputs.unstable;
|
||||
system.flake = flake.self;
|
||||
};
|
||||
|
||||
settings = {
|
||||
# Improve nix store disk usage
|
||||
auto-optimise-store = true;
|
||||
# Prevents impurities in builds
|
||||
sandbox = true;
|
||||
# Give root and @wheel special privileges with nix
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
# Allow only group wheel to connect to the nix daemon
|
||||
allowed-users = [ "@wheel" ];
|
||||
};
|
||||
|
||||
# Generally useful nix option defaults
|
||||
extraOptions = lib.mkForce ''
|
||||
experimental-features = flakes nix-command
|
||||
min-free = 536870912
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
fallback = true
|
||||
'';
|
||||
|
||||
nixPath = [
|
||||
"nixpkgs=${flake.inputs.nixpkgs}"
|
||||
"nixos-config=${../../lib/compat/nixos}"
|
||||
"home-manager=${flake.inputs.home-manager}"
|
||||
];
|
||||
};
|
||||
}
|
33
modules/core/terminal-tooling.nix
Normal file
33
modules/core/terminal-tooling.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ flake, lib, ... }:
|
||||
{
|
||||
home-manager.users = (
|
||||
lib.attrsets.foldlAttrs (
|
||||
acc: name: value:
|
||||
acc
|
||||
// {
|
||||
${name} = {
|
||||
programs.git.enable = true;
|
||||
programs.starship.enable = true;
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
historyControl = [
|
||||
"ignoredups"
|
||||
"ignorespace"
|
||||
];
|
||||
};
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
viAlias = true;
|
||||
defaultEditor = true;
|
||||
# configure = {
|
||||
# packages.myVimPackages = with pkgs.vimPlugins; {
|
||||
# start = [vim-nix vim-surrund rainbow];
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
) { } flake.self.logins.admins
|
||||
);
|
||||
}
|
91
modules/core/users.nix
Normal file
91
modules/core/users.nix
Normal file
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
flake,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.pub-solar-os.authentication =
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
root.initialHashedPassword = mkOption {
|
||||
description = "Hashed password of the root account";
|
||||
type = types.str;
|
||||
default = "$y$j9T$bIN6GjQkmPMllOcQsq52K0$q0Z5B5.KW/uxXK9fItB8H6HO79RYAcI/ZZdB0Djke32";
|
||||
};
|
||||
|
||||
robot.username = mkOption {
|
||||
description = "username for the robot user";
|
||||
type = types.str;
|
||||
default = "hakkonaut";
|
||||
};
|
||||
|
||||
robot.sshPubKeys = mkOption {
|
||||
description = "SSH Keys to use for the robot user";
|
||||
type = types.listOf types.str;
|
||||
default = flake.self.logins.robots.sshPubKeys;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
users.users =
|
||||
(lib.attrsets.foldlAttrs (
|
||||
acc: name: value:
|
||||
acc
|
||||
// {
|
||||
${name} = {
|
||||
name = name;
|
||||
group = name;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"docker"
|
||||
];
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = lib.attrsets.attrValues value.sshPubKeys;
|
||||
};
|
||||
}
|
||||
) { } flake.self.logins.admins)
|
||||
// {
|
||||
# TODO: Remove when we stop locking ourselves out.
|
||||
root.openssh.authorizedKeys.keys = flake.self.logins.sshPubKeys;
|
||||
root.initialHashedPassword = config.pub-solar-os.authentication.root.initialHashedPassword;
|
||||
|
||||
${config.pub-solar-os.authentication.robot.username} = {
|
||||
description = "CI and automation user";
|
||||
home = "/home/${config.pub-solar-os.authentication.robot.username}";
|
||||
createHome = true;
|
||||
useDefaultShell = true;
|
||||
uid = 998;
|
||||
group = "${config.pub-solar-os.authentication.robot.username}";
|
||||
isSystemUser = true;
|
||||
openssh.authorizedKeys.keys = config.pub-solar-os.authentication.robot.sshPubKeys;
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users = (
|
||||
lib.attrsets.foldlAttrs (
|
||||
acc: name: value:
|
||||
acc
|
||||
// {
|
||||
${name} = {
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
}
|
||||
) { } flake.self.logins.admins
|
||||
);
|
||||
|
||||
users.groups =
|
||||
(lib.attrsets.foldlAttrs (
|
||||
acc: name: value:
|
||||
acc // { "${name}" = { }; }
|
||||
) { } flake.self.logins.admins)
|
||||
// {
|
||||
${config.pub-solar-os.authentication.robot.username} = { };
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
};
|
||||
}
|
112
modules/coturn/default.nix
Normal file
112
modules/coturn/default.nix
Normal file
|
@ -0,0 +1,112 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
age.secrets."coturn-static-auth-secret" = {
|
||||
file = "${flake.self}/secrets/coturn-static-auth-secret.age";
|
||||
mode = "400";
|
||||
owner = "turnserver";
|
||||
};
|
||||
|
||||
services.coturn = rec {
|
||||
enable = true;
|
||||
no-cli = true;
|
||||
no-tcp-relay = true;
|
||||
min-port = 49000;
|
||||
max-port = 50000;
|
||||
use-auth-secret = true;
|
||||
static-auth-secret-file = config.age.secrets."coturn-static-auth-secret".path;
|
||||
realm = "turn.${config.pub-solar-os.networking.domain}";
|
||||
cert = "${config.security.acme.certs.${realm}.directory}/full.pem";
|
||||
pkey = "${config.security.acme.certs.${realm}.directory}/key.pem";
|
||||
extraConfig =
|
||||
let
|
||||
externalIPv4s = lib.strings.concatMapStringsSep "\n" (
|
||||
{ address, ... }: "external-ip=${address}"
|
||||
) config.networking.interfaces.enp35s0.ipv4.addresses;
|
||||
externalIPv6s = lib.strings.concatMapStringsSep "\n" (
|
||||
{ address, ... }: "external-ip=${address}"
|
||||
) config.networking.interfaces.enp35s0.ipv6.addresses;
|
||||
in
|
||||
''
|
||||
${externalIPv4s}
|
||||
${externalIPv6s}
|
||||
|
||||
no-tlsv1
|
||||
no-tlsv1_1
|
||||
|
||||
no-rfc5780
|
||||
response-origin-only-with-rfc5780
|
||||
|
||||
prod
|
||||
|
||||
no-stun-backward-compatibility
|
||||
|
||||
# ban private IP ranges
|
||||
no-multicast-peers
|
||||
denied-peer-ip=0.0.0.0-0.255.255.255
|
||||
denied-peer-ip=10.0.0.0-10.255.255.255
|
||||
denied-peer-ip=100.64.0.0-100.127.255.255
|
||||
denied-peer-ip=127.0.0.0-127.255.255.255
|
||||
denied-peer-ip=169.254.0.0-169.254.255.255
|
||||
denied-peer-ip=172.16.0.0-172.31.255.255
|
||||
denied-peer-ip=192.0.0.0-192.0.0.255
|
||||
denied-peer-ip=192.0.2.0-192.0.2.255
|
||||
denied-peer-ip=192.88.99.0-192.88.99.255
|
||||
denied-peer-ip=192.168.0.0-192.168.255.255
|
||||
denied-peer-ip=198.18.0.0-198.19.255.255
|
||||
denied-peer-ip=198.51.100.0-198.51.100.255
|
||||
denied-peer-ip=203.0.113.0-203.0.113.255
|
||||
denied-peer-ip=240.0.0.0-255.255.255.255
|
||||
denied-peer-ip=::1
|
||||
denied-peer-ip=64:ff9b::-64:ff9b::ffff:ffff
|
||||
denied-peer-ip=::ffff:0.0.0.0-::ffff:255.255.255.255
|
||||
denied-peer-ip=100::-100::ffff:ffff:ffff:ffff
|
||||
denied-peer-ip=2001::-2001:1ff:ffff:ffff:ffff:ffff:ffff:ffff
|
||||
denied-peer-ip=2002::-2002:ffff:ffff:ffff:ffff:ffff:ffff:ffff
|
||||
denied-peer-ip=fc00::-fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
|
||||
denied-peer-ip=fe80::-febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
interfaces.enp35s0 =
|
||||
let
|
||||
range = with config.services.coturn; [
|
||||
{
|
||||
from = min-port;
|
||||
to = max-port;
|
||||
}
|
||||
];
|
||||
in
|
||||
{
|
||||
allowedUDPPortRanges = range;
|
||||
allowedUDPPorts = [
|
||||
3478
|
||||
5349
|
||||
];
|
||||
allowedTCPPortRanges = [ ];
|
||||
allowedTCPPorts = [
|
||||
3478
|
||||
5349
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# get a certificate
|
||||
security.acme.certs.${config.services.coturn.realm} = {
|
||||
# insert here the right configuration to obtain a certificate
|
||||
postRun = "systemctl restart coturn.service";
|
||||
group = "turnserver";
|
||||
};
|
||||
services.nginx.virtualHosts.${config.services.coturn.realm} = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
globalRedirect = "${config.pub-solar-os.networking.domain}";
|
||||
};
|
||||
|
||||
users.users.nginx.extraGroups = [ "turnserver" ];
|
||||
}
|
12
modules/docker/default.nix
Normal file
12
modules/docker/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
extraOptions = ''
|
||||
--data-root /var/lib/docker
|
||||
'';
|
||||
storageDriver = "zfs";
|
||||
};
|
||||
|
||||
networking.firewall.trustedInterfaces = [ "docker0" ];
|
||||
}
|
205
modules/forgejo/default.nix
Normal file
205
modules/forgejo/default.nix
Normal file
|
@ -0,0 +1,205 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
age.secrets.forgejo-database-password = {
|
||||
file = "${flake.self}/secrets/forgejo-database-password.age";
|
||||
mode = "600";
|
||||
owner = "gitea";
|
||||
};
|
||||
|
||||
age.secrets.forgejo-mailer-password = {
|
||||
file = "${flake.self}/secrets/forgejo-mailer-password.age";
|
||||
mode = "600";
|
||||
owner = "gitea";
|
||||
};
|
||||
|
||||
age.secrets.forgejo-ssh-private-key = {
|
||||
file = "${flake.self}/secrets/forgejo-ssh-private-key.age";
|
||||
mode = "600";
|
||||
owner = "gitea";
|
||||
path = "/etc/forgejo/ssh/id_forgejo";
|
||||
};
|
||||
|
||||
environment.etc."forgejo/ssh/id_forgejo.pub" = {
|
||||
text = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCkPjvF2tZ2lZtkXed6lBvaPUpsNrI5kHlCNEf4LyFtgFXHoUL8UD3Bz9Fn1S+SDkdBMw/SumjvUf7TEGqQqzmFbG7+nWdWg2L00VdN8Kp8W+kKPBByJrzjDUIGhIMt7obaZnlSAVO5Cdqc1Q6bA9POLjSHIBxSD3QUs2pjUCkciNcEtL93easuXnlMwoYa217n5sA8n+BZmOJAcmA/UxYvKsqYlpJxa44m8JgMTy+5L08i/zkx9/FwniOcKcLedxmjZfV8raitDy34LslT2nBNG4I+em7qhKhSScn/cfyPvARiK71pk/rTx9mxBEjcGAkp3+hiA3Nyms0h/qTUh8yGyhbOn8hiro34HEKswXDN1HRfseyyZ4TqOoIC07F53x4OliYA0B+QbvwOemTX2XAWHfU4xEYrIhR46o3Eu5ooOM9HZLLYzIzKjsj/rpuKalFZ+9IeT/PJ/DrbgOEBlJGTu4XucEYXSiIvWB7G9WXij7TXKYbsRAFho9jw+9UZWklFAh9dcUKlX9YxafxOrw9DhJK620hblHLY9wPPFCbZVXDGfqdtn+ncRReMAw6N3VYqxMgnxd+OC52SMsSUi9VaL26i2UvEBwNYuim8GDnVabu/ciQLHMgifBONuF9sKD58ee5nnKgtYLDy9zU86aHBU78Ijew+WhYitO7qejMHMQ==";
|
||||
mode = "600";
|
||||
user = "gitea";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."git.${config.pub-solar-os.networking.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
locations."/user/login".extraConfig = ''
|
||||
return 302 /user/oauth2/keycloak;
|
||||
'';
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3000";
|
||||
extraConfig = ''
|
||||
client_max_body_size 1G;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
users.users.gitea = {
|
||||
home = "/var/lib/forgejo";
|
||||
useDefaultShell = true;
|
||||
group = "gitea";
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
users.groups.gitea = { };
|
||||
|
||||
# Expose SSH port only for forgejo SSH
|
||||
networking.firewall.interfaces.enp35s0.allowedTCPPorts = [ 2223 ];
|
||||
networking.firewall.extraCommands = ''
|
||||
iptables -t nat -i enp35s0 -I PREROUTING -p tcp --dport 22 -j REDIRECT --to-ports 2223
|
||||
ip6tables -t nat -i enp35s0 -I PREROUTING -p tcp --dport 22 -j REDIRECT --to-ports 2223
|
||||
'';
|
||||
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
user = "gitea";
|
||||
group = "gitea";
|
||||
database = {
|
||||
type = "postgres";
|
||||
passwordFile = config.age.secrets.forgejo-database-password.path;
|
||||
name = "gitea";
|
||||
user = "gitea";
|
||||
};
|
||||
stateDir = "/var/lib/forgejo";
|
||||
lfs.enable = true;
|
||||
mailerPasswordFile = config.age.secrets.forgejo-mailer-password.path;
|
||||
settings = {
|
||||
DEFAULT.APP_NAME = "pub.solar git server";
|
||||
|
||||
server = {
|
||||
ROOT_URL = "https://git.${config.pub-solar-os.networking.domain}";
|
||||
DOMAIN = "git.${config.pub-solar-os.networking.domain}";
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
HTTP_PORT = 3000;
|
||||
START_SSH_SERVER = true;
|
||||
SSH_LISTEN_PORT = 2223;
|
||||
SSH_SERVER_HOST_KEYS = "${config.age.secrets."forgejo-ssh-private-key".path}";
|
||||
};
|
||||
|
||||
log.LEVEL = "Warn";
|
||||
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
PROTOCOL = "smtps";
|
||||
SMTP_ADDR = "mail.pub.solar";
|
||||
SMTP_PORT = 465;
|
||||
FROM = ''"pub.solar git server" <forgejo@pub.solar>'';
|
||||
USER = "admins@pub.solar";
|
||||
};
|
||||
|
||||
"repository.signing" = {
|
||||
SIGNING_KEY = "default";
|
||||
MERGES = "always";
|
||||
};
|
||||
|
||||
openid = {
|
||||
ENABLE_OPENID_SIGNIN = true;
|
||||
ENABLE_OPENID_SIGNUP = true;
|
||||
};
|
||||
|
||||
service = {
|
||||
# uncomment after initial deployment, first user is admin user
|
||||
# required to setup SSO (oauth openid-connect, keycloak auth provider)
|
||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
||||
ENABLE_NOTIFY_MAIL = true;
|
||||
DEFAULT_KEEP_EMAIL_PRIVATE = true;
|
||||
};
|
||||
|
||||
session = {
|
||||
PROVIDER = "db";
|
||||
COOKIE_SECURE = lib.mkForce true;
|
||||
};
|
||||
|
||||
# https://forgejo.org/docs/latest/admin/config-cheat-sheet/#webhook-webhook
|
||||
webhook = {
|
||||
ALLOWED_HOST_LIST = "loopback,external,*.${config.pub-solar-os.networking.domain}";
|
||||
};
|
||||
|
||||
# See https://forgejo.org/docs/latest/admin/actions/
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
# In an actions workflow, when uses: does not specify an absolute URL,
|
||||
# the value of DEFAULT_ACTIONS_URL is prepended to it.
|
||||
DEFAULT_ACTIONS_URL = "https://code.forgejo.org";
|
||||
};
|
||||
|
||||
# https://forgejo.org/docs/next/admin/recommendations/#securitylogin_remember_days
|
||||
security = {
|
||||
LOGIN_REMEMBER_DAYS = 365;
|
||||
};
|
||||
|
||||
# See https://docs.gitea.com/administration/config-cheat-sheet#migrations-migrations
|
||||
migrations = {
|
||||
# This allows migrations from the same forgejo instance
|
||||
ALLOW_LOCALNETWORKS = true;
|
||||
};
|
||||
|
||||
# https://forgejo.org/docs/next/admin/config-cheat-sheet/#indexer-indexer
|
||||
indexer = {
|
||||
REPO_INDEXER_ENABLED = true;
|
||||
REPO_INDEXER_PATH = "indexers/repos.bleve";
|
||||
MAX_FILE_SIZE = 1048576;
|
||||
REPO_INDEXER_EXCLUDE = "resources/bin/**";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# See: https://docs.gitea.io/en-us/signing/#installing-and-generating-a-gpg-key-for-gitea
|
||||
# Required for gitea server side gpg signatures
|
||||
# configured/setup manually in:
|
||||
# /var/lib/gitea/data/home/.gitconfig
|
||||
# /var/lib/gitea/data/home/.gnupg/
|
||||
# sudo su gitea
|
||||
# export GNUPGHOME=/var/lib/gitea/data/home/.gnupg
|
||||
# gpg --quick-gen-key 'pub.solar gitea <gitea@pub.solar>' ed25519
|
||||
# TODO: implement declarative GPG key generation and
|
||||
# gitea gitconfig
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
};
|
||||
# Required to make gpg work without a graphical environment?
|
||||
# otherwise generating a new gpg key fails with this error:
|
||||
# gpg: agent_genkey failed: No pinentry
|
||||
# see: https://github.com/NixOS/nixpkgs/issues/97861#issuecomment-827951675
|
||||
environment.variables = {
|
||||
GPG_TTY = "$(tty)";
|
||||
};
|
||||
|
||||
services.restic.backups.forgejo-storagebox = {
|
||||
paths = [
|
||||
"/var/lib/forgejo"
|
||||
"/tmp/forgejo-backup.sql"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-* 00:00:00 Etc/UTC";
|
||||
};
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets."restic-repo-storagebox-nachtigall".path;
|
||||
repository = "sftp:u377325@u377325.your-storagebox.de:/backups";
|
||||
backupPrepareCommand = ''
|
||||
${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d gitea > /tmp/forgejo-backup.sql
|
||||
'';
|
||||
backupCleanupCommand = ''
|
||||
rm /tmp/forgejo-backup.sql
|
||||
'';
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 3"
|
||||
];
|
||||
};
|
||||
}
|
142
modules/garage/default.nix
Normal file
142
modules/garage/default.nix
Normal file
|
@ -0,0 +1,142 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
age.secrets."garage-rpc-secret" = {
|
||||
file = "${flake.self}/secrets/garage-rpc-secret.age";
|
||||
mode = "400";
|
||||
};
|
||||
|
||||
age.secrets."garage-admin-token" = {
|
||||
file = "${flake.self}/secrets/garage-admin-token.age";
|
||||
mode = "400";
|
||||
};
|
||||
|
||||
age.secrets."acme-namecheap-env" = {
|
||||
file = "${flake.self}/secrets/acme-namecheap-env.age";
|
||||
mode = "400";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
3900
|
||||
3901
|
||||
3902
|
||||
];
|
||||
|
||||
networking.firewall.interfaces.wg-ssh.allowedTCPPorts = [ 3903 ];
|
||||
|
||||
security.acme = {
|
||||
defaults = {
|
||||
# LEGO_DISABLE_CNAME_SUPPORT=true set here to fix issues with CNAME
|
||||
# detection, as we use wildcard DNS for garage
|
||||
environmentFile = config.age.secrets.acme-namecheap-env.path;
|
||||
};
|
||||
certs = {
|
||||
# Wildcard certificate gets created automatically
|
||||
"buckets.${config.pub-solar-os.networking.domain}" = {
|
||||
# disable http challenge
|
||||
webroot = null;
|
||||
# enable dns challenge
|
||||
dnsProvider = "namecheap";
|
||||
};
|
||||
# Wildcard certificate gets created automatically
|
||||
"web.${config.pub-solar-os.networking.domain}" = {
|
||||
# disable http challenge
|
||||
webroot = null;
|
||||
# enable dns challenge
|
||||
dnsProvider = "namecheap";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
upstreams.s3_backend.servers = {
|
||||
"[::1]:3900" = { };
|
||||
};
|
||||
upstreams.web_backend.servers = {
|
||||
"[::1]:3902" = { };
|
||||
};
|
||||
virtualHosts."buckets.${config.pub-solar-os.networking.domain}" = {
|
||||
serverAliases = [ "*.buckets.${config.pub-solar-os.networking.domain}" ];
|
||||
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://s3_backend";
|
||||
extraConfig = ''
|
||||
client_max_body_size 64m;
|
||||
proxy_max_temp_file_size 0;
|
||||
'';
|
||||
};
|
||||
};
|
||||
virtualHosts."web.${config.pub-solar-os.networking.domain}" = {
|
||||
serverAliases = [ "*.web.${config.pub-solar-os.networking.domain}" ];
|
||||
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://web_backend";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.garage = {
|
||||
enable = true;
|
||||
package = pkgs.garage_1_0_1;
|
||||
settings = {
|
||||
data_dir = "/var/lib/garage/data";
|
||||
metadata_dir = "/var/lib/garage/meta";
|
||||
db_engine = "lmdb";
|
||||
replication_factor = 3;
|
||||
compression_level = 2;
|
||||
rpc_bind_addr = "[::]:3901";
|
||||
s3_api = {
|
||||
s3_region = "eu-central";
|
||||
api_bind_addr = "[::]:3900";
|
||||
root_domain = ".buckets.${config.pub-solar-os.networking.domain}";
|
||||
};
|
||||
s3_web = {
|
||||
bind_addr = "[::]:3902";
|
||||
root_domain = ".web.${config.pub-solar-os.networking.domain}";
|
||||
index = "index.html";
|
||||
};
|
||||
admin = {
|
||||
api_bind_addr = "[::]:3903";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.users.garage = {
|
||||
isSystemUser = true;
|
||||
home = "/var/lib/garage";
|
||||
group = "garage";
|
||||
};
|
||||
|
||||
users.groups.garage = { };
|
||||
|
||||
# Adapted from https://git.clan.lol/clan/clan-core/src/commit/23a9e35c665ff531fe1193dcc47056432fbbeacf/clanModules/garage/default.nix
|
||||
# Disabled DynamicUser https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/services/web-servers/garage.nix
|
||||
# for mounts + permissions to work
|
||||
systemd.services.garage = {
|
||||
serviceConfig = {
|
||||
user = "garage";
|
||||
group = "garage";
|
||||
DynamicUser = false;
|
||||
LoadCredential = [
|
||||
"rpc_secret_path:${config.age.secrets.garage-rpc-secret.path}"
|
||||
"admin_token_path:${config.age.secrets.garage-admin-token.path}"
|
||||
];
|
||||
Environment = [
|
||||
"GARAGE_ALLOW_WORLD_READABLE_SECRETS=true"
|
||||
"GARAGE_RPC_SECRET_FILE=%d/rpc_secret_path"
|
||||
"GARAGE_ADMIN_TOKEN_FILE=%d/admin_token_path"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
126
modules/grafana/default.nix
Normal file
126
modules/grafana/default.nix
Normal file
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
age.secrets.grafana-admin-password = {
|
||||
file = "${flake.self}/secrets/grafana-admin-password.age";
|
||||
mode = "440";
|
||||
owner = "grafana";
|
||||
};
|
||||
age.secrets.grafana-smtp-password = {
|
||||
file = "${flake.self}/secrets/grafana-smtp-password.age";
|
||||
mode = "440";
|
||||
owner = "grafana";
|
||||
};
|
||||
age.secrets.grafana-keycloak-client-secret = {
|
||||
file = "${flake.self}/secrets/grafana-keycloak-client-secret.age";
|
||||
mode = "440";
|
||||
owner = "grafana";
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"grafana-dashboards/node-exporter-full_rev33.json" = {
|
||||
source = ./grafana-dashboards/node-exporter-full_rev33.json;
|
||||
group = "grafana";
|
||||
user = "grafana";
|
||||
};
|
||||
"grafana-dashboards/synapse.json" = {
|
||||
source = ./grafana-dashboards/synapse.json;
|
||||
group = "grafana";
|
||||
user = "grafana";
|
||||
};
|
||||
"grafana-dashboards/grafana-garage-dashboard-prometheus.json" = {
|
||||
source = ./grafana-dashboards/grafana-garage-dashboard-prometheus.json;
|
||||
group = "grafana";
|
||||
user = "grafana";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."grafana.${config.pub-solar-os.networking.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass =
|
||||
"http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}";
|
||||
};
|
||||
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
# Listening Address
|
||||
http_addr = "127.0.0.1";
|
||||
# and Port
|
||||
http_port = 3000;
|
||||
# Grafana needs to know on which domain and URL it's running
|
||||
domain = "grafana.${config.pub-solar-os.networking.domain}";
|
||||
root_url = "https://grafana.${config.pub-solar-os.networking.domain}";
|
||||
enable_gzip = true;
|
||||
};
|
||||
smtp = {
|
||||
enabled = true;
|
||||
host = "mail.pub.solar:465";
|
||||
user = "admins@pub.solar";
|
||||
password = "\$__file{${config.age.secrets.grafana-smtp-password.path}}";
|
||||
from_address = "no-reply@pub.solar";
|
||||
from_name = "grafana.pub.solar";
|
||||
ehlo_identity = "grafana.pub.solar";
|
||||
};
|
||||
security = {
|
||||
admin_email = "crew@pub.solar";
|
||||
admin_password = "\$__file{${config.age.secrets.grafana-admin-password.path}}";
|
||||
};
|
||||
"auth.generic_oauth" = {
|
||||
enabled = true;
|
||||
name = "pub.solar ID";
|
||||
allow_sign_up = true;
|
||||
client_id = "grafana";
|
||||
client_secret = "\$__file{${config.age.secrets.grafana-keycloak-client-secret.path}}";
|
||||
scopes = "openid email profile offline_access roles";
|
||||
email_attribute_path = "email";
|
||||
login_attribute_path = "preferred_username";
|
||||
name_attribute_path = "full_name";
|
||||
auth_url = "https://auth.${config.pub-solar-os.networking.domain}/realms/${config.pub-solar-os.auth.realm}/protocol/openid-connect/auth";
|
||||
token_url = "https://auth.${config.pub-solar-os.networking.domain}/realms/${config.pub-solar-os.auth.realm}/protocol/openid-connect/token";
|
||||
api_url = "https://auth.${config.pub-solar-os.networking.domain}/realms/${config.pub-solar-os.auth.realm}/protocol/openid-connect/userinfo";
|
||||
role_attribute_path = "contains(roles[*], 'admin') && 'GrafanaAdmin' || 'Viewer'";
|
||||
allow_assign_grafana_admin = true;
|
||||
};
|
||||
};
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources = {
|
||||
settings = {
|
||||
datasources = [
|
||||
{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
access = "proxy";
|
||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||
isDefault = true;
|
||||
}
|
||||
{
|
||||
name = "Loki";
|
||||
type = "loki";
|
||||
access = "proxy";
|
||||
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
dashboards = {
|
||||
settings = {
|
||||
providers = [
|
||||
{
|
||||
name = "pub.solar Dashboards";
|
||||
options.path = "/etc/grafana-dashboards";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
File diff suppressed because it is too large
Load diff
23271
modules/grafana/grafana-dashboards/node-exporter-full_rev33.json
Normal file
23271
modules/grafana/grafana-dashboards/node-exporter-full_rev33.json
Normal file
File diff suppressed because it is too large
Load diff
13455
modules/grafana/grafana-dashboards/synapse.json
Normal file
13455
modules/grafana/grafana-dashboards/synapse.json
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue