Compare commits
561 commits
bootstrap/
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c0004409d7 | |||
| 004832fc06 | |||
| 83371117d4 | |||
| e1c02d7a91 | |||
| 4dfc898140 | |||
| 21dc584199 | |||
| 6c80606b7e | |||
| 907f2cabca | |||
| 5c13051b4b | |||
| bc3269a814 | |||
| 63d9d6b004 | |||
| 9a821fda94 | |||
| 8157d0d561 | |||
| 024a6bdbe2 | |||
| 4bb20124a7 | |||
| 509684d0bd | |||
| c782bd5e53 | |||
| 4f8249b780 | |||
| d1a8e7222f | |||
| 402c847f3c | |||
| 2a9e8e6c03 | |||
| e98a71cd1e | |||
| 6fc74bd778 | |||
| 37f271bed8 | |||
| 2990972989 | |||
| b705a21478 | |||
| 75f9cc9d2b | |||
| ea17ef30c6 | |||
| 8a85e25d72 | |||
| 9a6a29831b | |||
| 8ca9e393ea | |||
| 9a87dc63c3 | |||
| 1ad05857b7 | |||
| 72078aad6c | |||
| abe0027e5d | |||
| ee3e0868a8 | |||
| 91abcbed19 | |||
| 93354e6419 | |||
| cc2e9d1a90 | |||
| e7588e0be0 | |||
| 4851369098 | |||
| 34e649e621 | |||
| f622d5f577 | |||
| c4bedfd86e | |||
| 011ceee498 | |||
| 0735ffdb69 | |||
| a25d214b82 | |||
| 27e9546327 | |||
| 140b12fa5d | |||
| babc27c8be | |||
| 939d0cc861 | |||
| 0edeac9f4c | |||
| 10fbeac140 | |||
|
|
1d9f9f4927 | ||
|
|
1941deb004 | ||
| 4a82035d82 | |||
| 604983800f | |||
| 81c17720eb | |||
| b8a7dfa8a8 | |||
| d0e090bb68 | |||
| e5e608c580 | |||
| 69717ef92b | |||
| d13f18a189 | |||
| de857dcfbf | |||
| 5680e29cd2 | |||
| 4a91f8a165 | |||
| 52e53ba5b3 | |||
| 218da08936 | |||
| 724d30a092 | |||
| c8c6fb1b5e | |||
| 59f5913b68 | |||
| 0d99bd6015 | |||
| 865b473df7 | |||
| c323f004f1 | |||
| 220af6cf15 | |||
| ae707d33ea | |||
| 880316173f | |||
| 0638cf6f5f | |||
| 0f7393714f | |||
| cc43450dd1 | |||
| 4c28a3eecb | |||
| 575a0e9610 | |||
|
|
58d4b60f5b | ||
|
|
75e0c8f6ac | ||
| 27ba1aaede | |||
| 087ed1c323 | |||
| e303fee58d | |||
| d11d080c94 | |||
|
|
2239c1cc64 | ||
|
|
576fd7604f | ||
| 9fd117c50c | |||
| d8c016e933 | |||
| f8312bc6f2 | |||
| 2d15fb3a5e | |||
| b06c782850 | |||
| 6c7393228e | |||
| 36a161d1df | |||
| 3e56c780dd | |||
| c9c6ef4a16 | |||
| 3a612d3e90 | |||
| 3381630a7a | |||
| 5eef477e0b | |||
| de7402576d | |||
| ecdd594a1b | |||
| 465ec6f2fc | |||
| 7d479007d9 | |||
| 48db46051d | |||
| b3ffc41b76 | |||
| 215e017cd3 | |||
| 4932dad23f | |||
| dd076fab3c | |||
| 3419ab4b77 | |||
| d3ab001222 | |||
| 68ae736c2c | |||
| 52fbdfe8cf | |||
| ccafbd8ae0 | |||
| 4aaeefa97a | |||
| 75c7e7b193 | |||
| 8cf7c1815e | |||
| 0567313fa2 | |||
| b7665d9bd5 | |||
| 55e0d25251 | |||
| 518c718a5d | |||
| 66332a980a | |||
| 3a45f85c37 | |||
| c4bd8d3fa1 | |||
| 7226266c30 | |||
| 1936294ea4 | |||
| a7afbda109 | |||
| ffcd5c93d2 | |||
| 27cf526c47 | |||
| 49c161e8ab | |||
| fa3872647d | |||
| 15c4e4fc51 | |||
| d577030892 | |||
| 2a27838974 | |||
| fd3e877d3d | |||
| 18c6cb6773 | |||
| 36f214f2a4 | |||
| 249942280d | |||
| 5722249dd2 | |||
| a2f82bc7d5 | |||
| a06d0d86fc | |||
| 3bbaf8785c | |||
| a2337566da | |||
| d02d1dbb33 | |||
| 1486058b90 | |||
| 16703bade1 | |||
| c42fdb7940 | |||
| 52a3e8557e | |||
| 2a4a4c5d47 | |||
| d4768ea7bf | |||
| f8d4e05080 | |||
| 42eeba3a9f | |||
| e0f1482511 | |||
| 2f4cbd382c | |||
| 54fd3373d0 | |||
| a9e9ae41ac | |||
| dfd00aad38 | |||
| c0679f7e79 | |||
| e78c666635 | |||
| 1a8e042be5 | |||
| f84e8c1013 | |||
| 5c55793134 | |||
| 6bea391858 | |||
| 5a24bf690f | |||
| acc4d31f46 | |||
| e2832de968 | |||
| 12681f2087 | |||
| 2baffcb7a5 | |||
| 2f1ca64025 | |||
| 12a1843587 | |||
| 09aceb18f4 | |||
| e73f9d612c | |||
| 1fd2ebedb0 | |||
| cf47ffc526 | |||
| 3b73bd8f14 | |||
| 4e49291a40 | |||
|
|
4c933a598c | ||
|
|
83b68d3034 | ||
| bada516463 | |||
| 85f53fbc85 | |||
| 0772dca431 | |||
| adea95e039 | |||
| 2b9a772959 | |||
| c76de11041 | |||
| 0245b680ef | |||
|
|
0c882eb783 | ||
|
|
bcbebb0d46 | ||
| 3af1ad12fd | |||
| 58efa5527c | |||
| 57afed24ed | |||
| 4bd188cc64 | |||
| c5dd3e4f5e | |||
| 8ae384686c | |||
| b4e6a9bc04 | |||
| 45a8eadeda | |||
| 892f9bfe73 | |||
| 6d356be1f0 | |||
| 03bfa7da93 | |||
| 84ddc3b6ec | |||
|
|
a9f5d4da4d | ||
|
|
c85d5d2150 | ||
| 480208b718 | |||
| 870fc4e2d7 | |||
| c17c9873b9 | |||
| 6a3e5c147b | |||
| c4bf653e14 | |||
| 2d85d6635b | |||
| e7d5efd169 | |||
| c9520a5bc8 | |||
| d0fdbe8822 | |||
| f8dc09565f | |||
| 6fabeecd1d | |||
| 5989fc4e70 | |||
| 240ff86538 | |||
| b06bb7009c | |||
| d9df212560 | |||
| 633d781a25 | |||
| 1cfcd112e8 | |||
| 1c2f3eb1c6 | |||
| f140929d9c | |||
| e94d04ab1f | |||
| c0b9ed6b00 | |||
| 3ef987f8d9 | |||
| fdf6a3ce62 | |||
| cc066cd0f0 | |||
| ed43feb5b6 | |||
| 92a7023ba0 | |||
| 843aacb6d3 | |||
| 09830a0aa8 | |||
| c556f63ebe | |||
|
|
b05012d8c9 | ||
|
|
0b138f3148 | ||
| ea07a839ae | |||
| 718de94655 | |||
| 72eca4fb05 | |||
|
|
38e624851b | ||
|
|
b04c649e53 | ||
| e801f91435 | |||
| 83ac77b864 | |||
| 3ead5d12c5 | |||
| 071fad3bcb | |||
| c66e8d7307 | |||
| a0053fe9ee | |||
| 0f1271badb | |||
| 18b66630d0 | |||
| efb2a24118 | |||
| c2cf093a72 | |||
| fe8d26a860 | |||
| 3f52fc1e81 | |||
| 8cb9905098 | |||
| 74e7f5435f | |||
| adf5409e32 | |||
| 1fadd257f3 | |||
| 0253d64b96 | |||
| 3061733e46 | |||
| 9512dd2e41 | |||
| 5ef6a68587 | |||
| 93c91d5a6b | |||
| 817371bf01 | |||
| b8ad7638ef | |||
| bd4affdea0 | |||
| 616db33773 | |||
| 7aa3a988fe | |||
| 718437153f | |||
| 93279eb6e6 | |||
| f35d104f84 | |||
| a6348c833e | |||
| 945eb34e60 | |||
| 19ed50cc9d | |||
| 69c13bc50e | |||
| 5f5aa86ce2 | |||
| e7a7b39d41 | |||
| e90ebf6220 | |||
| cc76cdf00d | |||
| 5f5412f433 | |||
| 1db10b5b9d | |||
| 44a3d4473f | |||
| f87dfa314e | |||
| 17164b05b9 | |||
| 1ecec11727 | |||
| bdbb5fe0de | |||
| 203bc2ab53 | |||
| 3ebd082be2 | |||
| 0fe62078fa | |||
| eb91ab1540 | |||
| d86285cdf9 | |||
| ffa71a694a | |||
| 9217ce6e91 | |||
| 8b0dfd5661 | |||
| a915e57d34 | |||
| 315d480601 | |||
| b1f4fcc223 | |||
| 9787ed2636 | |||
| 37f2453f17 | |||
| 4bc19ed87e | |||
| b2ae6493d9 | |||
| a3bb553f14 | |||
| 7f4d9a5e69 | |||
| ccf3fa2f4a | |||
| d0895da153 | |||
| 3bacc817a2 | |||
| ee0a768c03 | |||
| 5ea27ceb6b | |||
| 03859cf8c7 | |||
| ba2c4f9f33 | |||
| 23693d7268 | |||
| 2b6b616dbf | |||
|
|
88b4fca28a | ||
|
|
e82fcc0c4c | ||
| 631d340887 | |||
| f85f39f7fa | |||
| cc2adb3aa8 | |||
| f957be17d0 | |||
| dfdb1afe39 | |||
|
|
cc57b59ff2 | ||
|
|
ed5e0e405d | ||
| 16a8c3e186 | |||
| 95b3116fa8 | |||
| 5a834de1dd | |||
| a224191007 | |||
| 27edd08727 | |||
| 28cca81e69 | |||
| 7a6aa37647 | |||
| dbbd96c274 | |||
| a411469b2b | |||
| 7f3df40afe | |||
| 7d50fa4b75 | |||
| 9212de3ab2 | |||
| e6f0a356af | |||
| f535775b77 | |||
| 548c2f868f | |||
| 5be539a686 | |||
| 4d751d72b3 | |||
| 3502a31065 | |||
| a4a38b4a8b | |||
|
|
1e2850dd38 | ||
| 21b7184b65 | |||
| cffbc858f7 | |||
|
|
74501e3c39 | ||
|
|
ba15ebcf4c | ||
| fd14625074 | |||
| 04d695c77a | |||
| b9681ed925 | |||
| c8f4410d94 | |||
| cdae556af4 | |||
| 78c578b7ca | |||
| c3368f7ec5 | |||
| a6b826f089 | |||
| b310b4e691 | |||
| c54fa3c517 | |||
| 9f525a8756 | |||
| ffb3659357 | |||
| e7724c0212 | |||
| 90febfba6e | |||
| c0a054c937 | |||
| f724467c76 | |||
|
|
fd45845bdf | ||
|
|
2421602b88 | ||
| 7284f81fd4 | |||
| ae26fd9a09 | |||
| 0ae63f2c72 | |||
| 7c36f87860 | |||
| a5538535c2 | |||
| 29a5866f90 | |||
| f1e9e140d6 | |||
| 571f0f6f3e | |||
| 3ccf85aa9e | |||
| 095d24b797 | |||
| d92455cebf | |||
| d9269fbb93 | |||
| cca1730f3f | |||
| 1a62545c3c | |||
| f33525f565 | |||
| e1e94504e4 | |||
| 6c2790cb05 | |||
| da47e42111 | |||
| 438eb54cea | |||
| 2e74aa5f00 | |||
| 46c30b9d5d | |||
| b89253931d | |||
| 94d72b25f0 | |||
| 30a59b4be0 | |||
| 5f1b9b17ec | |||
| 54e8025488 | |||
| 8cd8e9e3dd | |||
| f6cc66d75c | |||
| f9de112a18 | |||
| 3c5d4ba108 | |||
| bc793316b9 | |||
|
|
c826c7f381 | ||
|
|
cd1b1da2fc | ||
| 9ef4231da0 | |||
| e447adb0ce | |||
| a9e3d8421e | |||
| 8818d8a1aa | |||
| 7d8dbaef0d | |||
| c0b65cd53b | |||
| 4ce28a177c | |||
| 6eda948d6e | |||
| b6c10e7325 | |||
| faad8ea374 | |||
| 21f6b46021 | |||
| 09041e2ec8 | |||
| cc835da43c | |||
| d99a56cd95 | |||
| 79a6b783bc | |||
| ef22d9e96c | |||
| 23fc6fe637 | |||
| 5e5720a3f7 | |||
| 5b98df2cee | |||
| 9efcffd0f6 | |||
| 024a93baf8 | |||
| e02d908d58 | |||
| ffc5a80849 | |||
| cde9d8faec | |||
| 77bfc31355 | |||
| 9d6693a0ae | |||
| b288e1c78c | |||
| 282a0ae22d | |||
| 38bcba4756 | |||
| 0fed2f3599 | |||
| 210addb2a7 | |||
| aa339560b3 | |||
| 8dc54c3565 | |||
| fa2e2c3ce6 | |||
| 4b45190901 | |||
| 7f300748af | |||
| 0a6ee4cd3d | |||
| ae7ead0309 | |||
| eadc1959d0 | |||
| de92335ae5 | |||
| ae557b287e | |||
| 716c28a303 | |||
| b9df2f3a0c | |||
| 017e2bc812 | |||
| db469ad58f | |||
| 06c3f076a4 | |||
| 606dba7e08 | |||
| 27f73340de | |||
| 2f37471697 | |||
| 76197628bc | |||
| 94a89fca4b | |||
| 4326568b66 | |||
| 43573ebf99 | |||
| 70caf4cd4b | |||
| 91a993a8f7 | |||
| 88196824f6 | |||
| 6d49e2b75d | |||
| 9eb196ea3a | |||
| b0d7064ca3 | |||
| a66544d92f | |||
| 27d1c31e35 | |||
| bebaa0c14f | |||
| 4a71a4cb79 | |||
| 4b1ea1f571 | |||
| 920fb1971a | |||
| c1c6c0102f | |||
| b362462905 | |||
| c5079d7909 | |||
| f071579f58 | |||
| 82839373bf | |||
| 24aa8d0174 | |||
| 80be3da7fc | |||
| 228123e2c7 | |||
| c464b40e6a | |||
| 4423adbd61 | |||
| 4c08dd9171 | |||
| 496274c0a5 | |||
| 2631a1fadc | |||
| c3e83989a7 | |||
| 9a85f90699 | |||
| ee430bd7d0 | |||
| a4e71dcbd3 | |||
| bedb4544cc | |||
| 1e6f7a3676 | |||
| aeb5b7e9a0 | |||
| 7d79d605d3 | |||
| ec14782c77 | |||
| 2e21312570 | |||
| df3866ba66 | |||
| 367901821a | |||
| 53541504ec | |||
| 87b1632ae2 | |||
| 0785ab9bcd | |||
| cb168182b3 | |||
| 484ed2e926 | |||
| 7cebea5535 | |||
| 882e1455cd | |||
| 7e8d0a59ee | |||
| b2b9c08d73 | |||
| b72afdf856 | |||
| a669c4519b | |||
| 7b3b9354de | |||
| c57a76dd03 | |||
| b4f8e18398 | |||
| d14c02bb83 | |||
| 2b3d6fb3d7 | |||
| ef15c4ca20 | |||
| ac2b215ad6 | |||
| d4b9c485b6 | |||
| ef9c4f3a08 | |||
| 1d051e34ed | |||
| ed4062b85b | |||
| f191d4bb1e | |||
| 0df212398f | |||
| 11847ae180 | |||
| 8c54c332c3 | |||
| 1cf9f6e564 | |||
| 361aa3cddd | |||
| 217ef21de8 | |||
| 2da3206a93 | |||
| b3a285c3d5 | |||
| da89b77f68 | |||
| 602a475e7d | |||
| 1c6ac8c834 | |||
| 49acaadbf7 | |||
| 7445e14865 | |||
| 1015dbdb31 | |||
| 2c6a7690a4 | |||
| 9637bd72f6 | |||
| 9bd61c9b6a | |||
| d9e8c2bd34 | |||
| 4765663295 | |||
| 54f0700ef7 | |||
| 8a598f86f5 | |||
| b6f4f1942d | |||
| 32a7b148a5 | |||
| 909ea3e2c4 | |||
| c04568cc85 | |||
| ab18a8d0a2 | |||
| 19e9865e8a | |||
| fb9bedc940 | |||
| a45a0bbcb5 | |||
| 81f935d842 | |||
| d13a8e5cd4 | |||
| a1510113a5 | |||
| b5e2d10d8e | |||
| 56d541cfa5 | |||
| 78f45a4fe8 | |||
| 3b41385a96 | |||
| 2aad80ddb0 | |||
| 1c4fe00272 | |||
| 07eae0a0eb | |||
| 2801e946d2 | |||
| 5c343c2e0c | |||
| 5e5fc24e59 | |||
| f1b6d5c0e7 | |||
| 06251d8da5 | |||
| 1700e735f6 | |||
| 1ba66868be | |||
| 2602b8bc1c | |||
| 67798937bb | |||
| 7d9a857f77 | |||
| aaa036f0c8 | |||
| 24fe2a0b99 | |||
| 7697d85a77 | |||
| 364ecd0516 | |||
| 3a73b323b2 | |||
| 06d3121009 |
197 changed files with 3945 additions and 2639 deletions
4
.git-crypt/.gitattributes
vendored
Normal file
4
.git-crypt/.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Do not edit this file. To specify the files to encrypt, create your own
|
||||||
|
# .gitattributes file in the directory where your files are.
|
||||||
|
* !filter !diff
|
||||||
|
*.gpg binary
|
||||||
Binary file not shown.
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
secrets.gcrypt/** filter=git-crypt diff=git-crypt
|
||||||
50
.github/workflows/autoupdate.yml
vendored
Normal file
50
.github/workflows/autoupdate.yml
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
name: Auto update
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.PAT_TOKEN }}
|
||||||
|
|
||||||
|
- name: Check for updates
|
||||||
|
id: check
|
||||||
|
run: |
|
||||||
|
local=$(cat flake.lock | jq ".nodes.nixpkgs.locked.rev")
|
||||||
|
remote=$(curl "https://api.github.com/repos/NixOS/nixpkgs/branches/nixos-unstable/commits?per_page=1" | jq ".commit.sha")
|
||||||
|
if [[ $local == $remote ]]; then
|
||||||
|
echo "skip=1" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "skip=0" >> "$GITHUB_OUTPUT"
|
||||||
|
branch=$(TZ='Australia/Melbourne' date '+staging_auto/%Y%m%d')
|
||||||
|
echo "branch_name=${branch}" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Install nix
|
||||||
|
if: steps.check.outputs.skip == 0
|
||||||
|
uses: cachix/install-nix-action@v31
|
||||||
|
|
||||||
|
- name: Configure git
|
||||||
|
if: steps.check.outputs.skip == 0
|
||||||
|
run: |
|
||||||
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
|
||||||
|
- name: Update
|
||||||
|
if: steps.check.outputs.skip == 0
|
||||||
|
run: ./update.sh
|
||||||
|
|
||||||
|
- name: Push
|
||||||
|
if: steps.check.outputs.skip == 0
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.PAT_TOKEN }}
|
||||||
|
branch: ${{ steps.check.outputs.branch_name }}
|
||||||
35
.github/workflows/cachix.yml
vendored
35
.github/workflows/cachix.yml
vendored
|
|
@ -1,38 +1,27 @@
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
|
||||||
name: Check flake
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: cachix/install-nix-action@v17
|
|
||||||
with:
|
|
||||||
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.12.0pre20220930_89ca75c/install
|
|
||||||
extra_nix_config: experimental-features = nix-command flakes
|
|
||||||
- uses: cachix/cachix-action@v10
|
|
||||||
with:
|
|
||||||
name: lava
|
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
||||||
- run: nix flake check --keep-going --verbose
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build linux-lava for x86_64-linux
|
name: Build linux-lava for x86_64-linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
# credits to https://github.com/easimon/maximize-build-space/issues/45
|
||||||
|
- name: Remove unneeded packages to maximise build space
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
df -h
|
||||||
|
sudo rm -rf /usr/share/dotnet
|
||||||
|
sudo rm -rf /usr/local/lib/android
|
||||||
|
df -h
|
||||||
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: cachix/install-nix-action@v17
|
- uses: cachix/install-nix-action@v31
|
||||||
with:
|
- uses: cachix/cachix-action@v16
|
||||||
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.12.0pre20220930_89ca75c/install
|
|
||||||
extra_nix_config: experimental-features = nix-command flakes
|
|
||||||
- uses: cachix/cachix-action@v10
|
|
||||||
with:
|
with:
|
||||||
name: lava
|
name: lava
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
|
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
result
|
||||||
|
|
@ -14,17 +14,18 @@ to your liking. Open up `flake.nix`, add your new host config at the bottom, and
|
||||||
## Hosts
|
## Hosts
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
| ------- | ----------- |
|
| ------- | ----------- |
|
||||||
| blossom | Laptop and main PC |
|
| hyacinth | Main Desktop PC |
|
||||||
|
| anemone | Main Laptop |
|
||||||
| caramel | Raspberry Pi 400, stateless |
|
| caramel | Raspberry Pi 400, stateless |
|
||||||
| sugarcane | OVHCloud VPS, stateless |
|
| dandelion | ARM OCI VPS, stateless |
|
||||||
|
|
||||||
## Users
|
## Users
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
| ---- | ----------- |
|
| ---- | ----------- |
|
||||||
| rin | Main user for usage |
|
| rin | Main user for general usage |
|
||||||
| hana | Lightweight user intended for inspecting stateless hosts |
|
| hana | Lightweight user intended for inspecting stateless hosts |
|
||||||
|
|
||||||
## License
|
## License
|
||||||
Licensed under CC0; basically you can fork, modify, redistribute, or do whatever you want I don't really care.
|
Licensed under CC0
|
||||||
|
|
||||||
Credit is appreciated but not necessary
|
Credit is appreciated but not necessary
|
||||||
|
|
|
||||||
47
containers/amethyst/configuration.nix
Normal file
47
containers/amethyst/configuration.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
{ lib, pkgs, ... }: {
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/transmission 755 transmission transmission"
|
||||||
|
"d /persist/transmission/.config/transmission-daemon 750 transmission transmission"
|
||||||
|
"d /persist/transmission/.incomplete 750 transmission transmission"
|
||||||
|
"d /persist/transmission/Downloads 755 transmission transmission"
|
||||||
|
"d /persist/transmission/watchdir 755 transmission transmission"
|
||||||
|
];
|
||||||
|
networking.wg-quick.interfaces.wg0 = {
|
||||||
|
configFile = "/persist/vpn.conf";
|
||||||
|
preUp = ''
|
||||||
|
# Try to access the DNS for up to 300s
|
||||||
|
for i in {1..60}; do
|
||||||
|
${pkgs.iputils}/bin/ping -c1 'google.com' && break
|
||||||
|
echo "Attempt $i: DNS still not available"
|
||||||
|
sleep 5s
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/258793
|
||||||
|
systemd.services.transmission.serviceConfig = {
|
||||||
|
BindReadOnlyPaths = lib.mkForce [ builtins.storeDir "/etc" ];
|
||||||
|
RootDirectoryStartOnly = lib.mkForce false;
|
||||||
|
RootDirectory = lib.mkForce "";
|
||||||
|
PrivateMounts = lib.mkForce false;
|
||||||
|
PrivateUsers = lib.mkForce false;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 9091 ];
|
||||||
|
services.transmission = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.transmission_4;
|
||||||
|
downloadDirPermissions = "775";
|
||||||
|
openFirewall = true;
|
||||||
|
home = "/persist/transmission";
|
||||||
|
settings = {
|
||||||
|
ratio-limit-enabled = true;
|
||||||
|
rpc-bind-address = "0.0.0.0";
|
||||||
|
rpc-enabled = true;
|
||||||
|
rpc-port = 9091;
|
||||||
|
rpc-host-whitelist-enabled = false;
|
||||||
|
rpc-whitelist-enabled = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/amethyst/flake.lock
generated
Normal file
27
containers/amethyst/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
51
containers/amethyst/flake.nix
Normal file
51
containers/amethyst/flake.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }: {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [ ./configuration.nix ];
|
||||||
|
};
|
||||||
|
nixosModule = { ... }:
|
||||||
|
let
|
||||||
|
name = "amethyst";
|
||||||
|
fqdn = "amethyst.lava.moe";
|
||||||
|
subnet = "1";
|
||||||
|
in {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
#locations."/".proxyPass = "http://[fd0d:1::${subnet}:2]:9091";
|
||||||
|
locations."/".proxyPass = "http://10.30.${subnet}.2:9091";
|
||||||
|
listenAddresses = [ "10.0.0.1" "[fd0d::1]" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "10.30.${subnet}.1";
|
||||||
|
localAddress = "10.30.${subnet}.2";
|
||||||
|
hostAddress6 = "fd0d:1::${subnet}:1";
|
||||||
|
localAddress6 = "fd0d:1::${subnet}:2";
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = [ ./configuration.nix ]; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
23
containers/beryllium/configuration.nix
Normal file
23
containers/beryllium/configuration.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
fileSystems."/var/lib/private" = {
|
||||||
|
device = "/persist";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 6167 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 6167 ];
|
||||||
|
# TODO: this should be generically set
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ "8.8.8.8" ];
|
||||||
|
|
||||||
|
services.matrix-continuwuity = {
|
||||||
|
enable = true;
|
||||||
|
settings.global = {
|
||||||
|
# TODO: link this with outer container's address
|
||||||
|
address = [ "10.30.2.2" ];
|
||||||
|
server_name = "lava.moe";
|
||||||
|
rocksdb_recovery_mode = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/beryllium/flake.lock
generated
Normal file
27
containers/beryllium/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
69
containers/beryllium/flake.nix
Normal file
69
containers/beryllium/flake.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }: {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [ ./configuration.nix ];
|
||||||
|
};
|
||||||
|
nixosModule = { ... }:
|
||||||
|
let
|
||||||
|
name = "beryllium";
|
||||||
|
fqdn = "beryllium.lava.moe";
|
||||||
|
subnet = "2";
|
||||||
|
in {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".extraConfig = "return 302 'https://lava.moe';";
|
||||||
|
locations."/_matrix".proxyPass = "http://10.30.${subnet}.2:6167";
|
||||||
|
locations."/_conduwuit".proxyPass = "http://10.30.${subnet}.2:6167";
|
||||||
|
locations."/_continuwuity".proxyPass = "http://10.30.${subnet}.2:6167";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."lava.moe" = {
|
||||||
|
locations."= /.well-known/matrix/server".extraConfig =
|
||||||
|
let
|
||||||
|
server = { "m.server" = "${fqdn}:443"; };
|
||||||
|
in ''
|
||||||
|
add_header Content-Type application/json;
|
||||||
|
return 200 '${builtins.toJSON server}';
|
||||||
|
'';
|
||||||
|
locations."= /.well-known/matrix/client".extraConfig =
|
||||||
|
let
|
||||||
|
client = {
|
||||||
|
"m.homeserver" = { "base_url" = "https://${fqdn}"; };
|
||||||
|
# "m.identity_server" = { "base_url" = "https://vector.im"; };
|
||||||
|
};
|
||||||
|
in ''
|
||||||
|
add_header Content-Type application/json;
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
return 200 '${builtins.toJSON client}';
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "10.30.${subnet}.1";
|
||||||
|
localAddress = "10.30.${subnet}.2";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = [ ./configuration.nix ]; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
53
containers/citrine/configuration.nix
Normal file
53
containers/citrine/configuration.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{ config, fqdn, lib, ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
networking.firewall.allowedTCPPorts = [ 22 3000 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 22 3000 ];
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"L+ /persist/forgejo/custom/templates - - - - ${./templates}"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
settings = {
|
||||||
|
DEFAULT.APP_NAME = "cilly's botanical laboratory";
|
||||||
|
server = {
|
||||||
|
DOMAIN = fqdn;
|
||||||
|
ROOT_URL = "https://${fqdn}/";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
START_SSH_SERVER = true;
|
||||||
|
BUILTIN_SSH_SERVER_USER = "git";
|
||||||
|
SSH_DOMAIN = "git.lava.moe";
|
||||||
|
SSH_SERVER_KEY_EXCHANGES = "mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256";
|
||||||
|
};
|
||||||
|
ui = lib.mkForce {
|
||||||
|
DEFAULT_THEME = "catppuccin-maroon-auto";
|
||||||
|
THEMES = lib.strings.concatMapStringsSep "," (x: "${x}-auto") [
|
||||||
|
"catppuccin-pink"
|
||||||
|
"catppuccin-maroon"
|
||||||
|
"catppuccin-flamingo"
|
||||||
|
"catppuccin-rosewater"
|
||||||
|
"forgejo"
|
||||||
|
"gitea"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
api.ENABLE_SWAGGER = false;
|
||||||
|
other.SHOW_FOOTER_TEMPLATE_LOAD_TIME = false;
|
||||||
|
repository.ENABLE_PUSH_CREATE_USER = true;
|
||||||
|
repository.ENABLE_PUSH_CREATE_ORG = true;
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
stateDir = "/persist/forgejo";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.forgejo.serviceConfig = {
|
||||||
|
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
|
||||||
|
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
|
||||||
|
PrivateUsers = lib.mkForce false;
|
||||||
|
};
|
||||||
|
|
||||||
|
catppuccin.forgejo.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [ config.services.forgejo.package ];
|
||||||
|
}
|
||||||
62
containers/citrine/flake.lock
generated
Normal file
62
containers/citrine/flake.lock
generated
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"catppuccin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773403535,
|
||||||
|
"narHash": "sha256-47MZaFrHxNO8tVUAmtVnerXUw2WWVluBOiU9MulN/yM=",
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "nix",
|
||||||
|
"rev": "d45b5665cc638bad1b794350de02f4dd41b0bb47",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "catppuccin",
|
||||||
|
"repo": "nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773122722,
|
||||||
|
"narHash": "sha256-FIqHByVqxCprNjor1NqF80F2QQoiiyqanNNefdlvOg4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "62dc67aa6a52b4364dd75994ec00b51fbf474e50",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"catppuccin": "catppuccin",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
68
containers/citrine/flake.nix
Normal file
68
containers/citrine/flake.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
catppuccin.url = "github:catppuccin/nix";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, catppuccin, ... }:
|
||||||
|
let
|
||||||
|
name = "citrine";
|
||||||
|
fqdn = "lab.lava.moe";
|
||||||
|
subnetId = "3";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:1::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
subnet4 = x: "10.30.${subnetId}.${toString x}";
|
||||||
|
host4 = subnet4 1;
|
||||||
|
client4 = subnet4 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
catppuccin.nixosModules.catppuccin
|
||||||
|
{
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ host ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { ... }: {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".proxyPass = "http://[${client}]:3000";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = host4;
|
||||||
|
localAddress = client4;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
containers/citrine/templates/base/footer_content.tmpl
Normal file
31
containers/citrine/templates/base/footer_content.tmpl
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
<footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}">
|
||||||
|
<div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}">
|
||||||
|
{{if ShowFooterPoweredBy}}
|
||||||
|
<a target="_blank" rel="noopener noreferrer" href="https://forgejo.org">Forgejo</a>
|
||||||
|
{{end}}
|
||||||
|
{{if (or .ShowFooterVersion .PageIsAdmin)}}
|
||||||
|
{{if .IsAdmin}}
|
||||||
|
<a href="{{AppSubUrl}}/admin/config">{{AppVerNoMetadata}}</a>
|
||||||
|
{{else}}
|
||||||
|
{{AppVerNoMetadata}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
|
||||||
|
{{ctx.Locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
|
||||||
|
{{ctx.Locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="right-links" role="group" aria-label="{{ctx.Locale.Tr "aria.footer.links"}}">
|
||||||
|
<div class="ui dropdown upward language">
|
||||||
|
<span class="flex-text-inline">{{svg "octicon-globe" 14}} {{ctx.Locale.LangName}}</span>
|
||||||
|
<div class="menu language-menu">
|
||||||
|
{{range .AllLangs}}
|
||||||
|
<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq ctx.Locale.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a href="{{AssetUrlPrefix}}/licenses.txt">{{ctx.Locale.Tr "licenses"}}</a>
|
||||||
|
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
|
||||||
|
{{template "custom/extra_links_footer" .}}
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
19
containers/citrine/templates/home.tmpl
Normal file
19
containers/citrine/templates/home.tmpl
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{{template "base/head" .}}
|
||||||
|
{{if not .IsSigned}}
|
||||||
|
<script>window.location.href = "/explore/repos";</script>
|
||||||
|
{{end}}
|
||||||
|
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}" class="page-content home">
|
||||||
|
<div class="tw-mb-8 tw-px-8">
|
||||||
|
<div class="center">
|
||||||
|
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
|
||||||
|
<div class="hero">
|
||||||
|
<h1 class="ui icon header title">
|
||||||
|
{{AppDisplayName}}
|
||||||
|
</h1>
|
||||||
|
<h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "home_forgejo" .}}
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
||||||
22
containers/diamond/configuration.nix
Normal file
22
containers/diamond/configuration.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ fqdn, ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/vaultwarden 755 vaultwarden vaultwarden"
|
||||||
|
];
|
||||||
|
fileSystems."/var/lib/vaultwarden" = {
|
||||||
|
device = "/persist/vaultwarden";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8000 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 8000 ];
|
||||||
|
|
||||||
|
services.vaultwarden = {
|
||||||
|
enable = true;
|
||||||
|
domain = fqdn;
|
||||||
|
config = {
|
||||||
|
DOMAIN = "https://${fqdn}";
|
||||||
|
ROCKET_ADDRESS = "::";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/diamond/flake.lock
generated
Normal file
27
containers/diamond/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
51
containers/diamond/flake.nix
Normal file
51
containers/diamond/flake.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
name = "diamond";
|
||||||
|
fqdn = "astransia.lava.moe";
|
||||||
|
subnetId = "4";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:1::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { ... }: {
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".proxyPass = "http://[${client}]:8000";
|
||||||
|
listenAddresses = [ "10.0.0.1" "[fd0d::1]" "100.67.1.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
23
containers/emerald/configuration.nix
Normal file
23
containers/emerald/configuration.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ fqdn, shareFqdn, ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/navidrome 755 navidrome navidrome"
|
||||||
|
];
|
||||||
|
networking.firewall.allowedTCPPorts = [ 4533 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 4533 ];
|
||||||
|
|
||||||
|
services.navidrome = {
|
||||||
|
enable = true;
|
||||||
|
environmentFile = "/binds/navidrome_env";
|
||||||
|
settings = {
|
||||||
|
Port = 4533;
|
||||||
|
Address = "[::]";
|
||||||
|
BaseUrl = "https://${fqdn}/";
|
||||||
|
ShareURL = "https://${shareFqdn}";
|
||||||
|
EnableSharing = true;
|
||||||
|
DataFolder = "/persist/navidrome";
|
||||||
|
MusicFolder = "/binds/music/main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.services.navidrome.serviceConfig.BindReadOnlyPaths = ["/binds/music"];
|
||||||
|
}
|
||||||
27
containers/emerald/flake.lock
generated
Normal file
27
containers/emerald/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
78
containers/emerald/flake.nix
Normal file
78
containers/emerald/flake.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
name = "emerald";
|
||||||
|
fqdn = "navia.lava.moe";
|
||||||
|
shareFqdn = "muse.lava.moe";
|
||||||
|
subnetId = "5";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:2::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
subnet4 = x: "10.32.${subnetId}.${toString x}";
|
||||||
|
host4 = subnet4 1;
|
||||||
|
client4 = subnet4 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
{
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ host ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { config, ... }: {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".proxyPass = "http://[${client}]:4533";
|
||||||
|
listenAddresses = [ "100.67.2.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = host4;
|
||||||
|
localAddress = client4;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn shareFqdn; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
bindMounts."music" = {
|
||||||
|
hostPath = "/flower/media/music";
|
||||||
|
mountPoint = "/binds/music";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
bindMounts."navidrome_env" = {
|
||||||
|
hostPath = config.age.secrets.navidrome_env.path;
|
||||||
|
mountPoint = "/binds/navidrome_env";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
22
containers/fluorite/configuration.nix
Normal file
22
containers/fluorite/configuration.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/slskd/Downloads 755 slskd slskd"
|
||||||
|
];
|
||||||
|
fileSystems."/var/lib/slskd" = {
|
||||||
|
device = "/persist/slskd";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 5030 50300 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 5030 50300 ];
|
||||||
|
|
||||||
|
services.slskd = {
|
||||||
|
enable = true;
|
||||||
|
domain = null;
|
||||||
|
environmentFile = "/binds/slskd_env";
|
||||||
|
settings = {
|
||||||
|
shares.directories = [ "/binds/music/" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/fluorite/flake.lock
generated
Normal file
27
containers/fluorite/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773282481,
|
||||||
|
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
89
containers/fluorite/flake.nix
Normal file
89
containers/fluorite/flake.nix
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
name = "fluorite";
|
||||||
|
fqdn = "fluorite.lava.moe";
|
||||||
|
subnetId = "6";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:1::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
subnet4 = x: "10.30.${subnetId}.${toString x}";
|
||||||
|
host4 = subnet4 1;
|
||||||
|
client4 = subnet4 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
{
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ host ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { config, ... }: {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 50300 ];
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".proxyPass = "http://[${client}]:5030";
|
||||||
|
listenAddresses = [ "10.0.0.1" "[fd0d::1]" "100.67.1.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/containers/${name} 755 root users"
|
||||||
|
"d /persist/media/music 075 nobody users"
|
||||||
|
];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = host4;
|
||||||
|
localAddress = client4;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn; };
|
||||||
|
|
||||||
|
forwardPorts = [
|
||||||
|
{
|
||||||
|
containerPort = 50300;
|
||||||
|
hostPort = 50300;
|
||||||
|
protocol = "tcp";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
bindMounts."music" = {
|
||||||
|
hostPath = "/persist/media/music";
|
||||||
|
mountPoint = "/binds/music";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
bindMounts."slskd_env" = {
|
||||||
|
hostPath = config.age.secrets.slskd_env.path;
|
||||||
|
mountPoint = "/binds/slskd_env";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
# flake = "path:" + ./.;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
36
containers/garnet/configuration.nix
Normal file
36
containers/garnet/configuration.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ ... }: {
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
fileSystems."/var/lib/opencloud" = {
|
||||||
|
device = "/flower/data";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
fileSystems."/etc/opencloud" = {
|
||||||
|
device = "/persist/cfg";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
# TODO: hardcoded address
|
||||||
|
networking.extraHosts = ''
|
||||||
|
100.67.2.1 cloud.lava.moe
|
||||||
|
'';
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 9200 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 9200 ];
|
||||||
|
|
||||||
|
environment.etc."opencloud-admin-pass".text = ''
|
||||||
|
IDM_ADMIN_PASSWORD=supersillysecure
|
||||||
|
'';
|
||||||
|
services.opencloud = {
|
||||||
|
enable = true;
|
||||||
|
url = "https://cloud.lava.moe";
|
||||||
|
address = "10.30.7.2";
|
||||||
|
port = 9200;
|
||||||
|
environment = {
|
||||||
|
PROXY_TLS = "false";
|
||||||
|
IDP_ACCESS_TOKEN_EXPIRATION = "2592000";
|
||||||
|
IDP_ID_TOKEN_EXPIRATION = "2592000";
|
||||||
|
};
|
||||||
|
environmentFile = "/etc/opencloud-admin-pass";
|
||||||
|
};
|
||||||
|
}
|
||||||
27
containers/garnet/flake.lock
generated
Normal file
27
containers/garnet/flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1779560665,
|
||||||
|
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
84
containers/garnet/flake.nix
Normal file
84
containers/garnet/flake.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
name = "garnet";
|
||||||
|
fqdn = "cloud.lava.moe";
|
||||||
|
subnetId = "7";
|
||||||
|
|
||||||
|
subnet = x: "fd0d:1::${subnetId}:${toString x}";
|
||||||
|
host = subnet 1;
|
||||||
|
client = subnet 2;
|
||||||
|
|
||||||
|
subnet4 = x: "10.30.${subnetId}.${toString x}";
|
||||||
|
host4 = subnet4 1;
|
||||||
|
client4 = subnet4 2;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
{
|
||||||
|
networking.useHostResolvConf = false;
|
||||||
|
networking.nameservers = [ host ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
};
|
||||||
|
nixosModule = { config, ... }: {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${client4}:9200";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_read_timeout 3600s;
|
||||||
|
proxy_send_timeout 3600s;
|
||||||
|
keepalive_requests 100000;
|
||||||
|
keepalive_timeout 5m;
|
||||||
|
http2_max_concurrent_streams 512;
|
||||||
|
'';
|
||||||
|
# TODO: hardcoded address
|
||||||
|
listenAddresses = [ "100.67.2.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /persist/containers/${name} 755 root users"
|
||||||
|
];
|
||||||
|
containers.${name} = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = host4;
|
||||||
|
localAddress = client4;
|
||||||
|
hostAddress6 = host;
|
||||||
|
localAddress6 = client;
|
||||||
|
# privateUsers = "pick";
|
||||||
|
nixpkgs = nixpkgs;
|
||||||
|
ephemeral = true;
|
||||||
|
config = { imports = modules; };
|
||||||
|
specialArgs = { inherit fqdn; };
|
||||||
|
|
||||||
|
bindMounts."persist" = {
|
||||||
|
hostPath = "/persist/containers/${name}";
|
||||||
|
mountPoint = "/persist";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
bindMounts."content" = {
|
||||||
|
hostPath = "/flower/opencloud";
|
||||||
|
mountPoint = "/flower";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
1017
flake.lock
generated
1017
flake.lock
generated
File diff suppressed because it is too large
Load diff
104
flake.nix
104
flake.nix
|
|
@ -1,109 +1,101 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-raccoon.url = "github:NixOS/nixpkgs/nixos-22.11";
|
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager-raccoon.url = "github:nix-community/home-manager/release-22.11";
|
|
||||||
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
||||||
agenix.url = "github:ryantm/agenix";
|
|
||||||
nixos-generators.url = "github:nix-community/nixos-generators";
|
|
||||||
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
|
||||||
|
|
||||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
home-manager-raccoon.inputs.nixpkgs.follows = "nixpkgs-raccoon";
|
|
||||||
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||||
|
catppuccin.url = "github:catppuccin/nix/8eada392fd6571a747e1c5fc358dd61c14c8704e";
|
||||||
|
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
catppuccin-palette = { url = "github:catppuccin/palette"; flake = false; };
|
||||||
|
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
|
||||||
neovim-nightly.inputs.nixpkgs.follows = "nixpkgs";
|
neovim-nightly.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||||
|
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||||
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
||||||
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
|
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
nix-gaming.url = "github:fufexan/nix-gaming/81af8b6232ed99c46413ca6d43aeb185c53f65b8";
|
|
||||||
|
|
||||||
# services
|
# services
|
||||||
hosts-blocklists = { url = "github:notracking/hosts-blocklists"; flake = false; };
|
pastel.url = "github:cillynder/pastel";
|
||||||
website = { url = "github:LavaDesu/lavadesu.github.io/master"; flake = false; };
|
stevenblack-hosts = { url = "github:StevenBlack/hosts"; flake = false; };
|
||||||
spicetify-themes = { url = "github:spicetify/spicetify-themes"; flake = false; };
|
website = { url = "github:cillynder/lavadesu.github.io/master"; flake = false; };
|
||||||
|
|
||||||
# zsh plugins
|
# zsh plugins
|
||||||
zsh-abbr = { url = "github:olets/zsh-abbr"; flake = false; };
|
zsh-abbr = { url = "git+https://github.com/olets/zsh-abbr?submodules=1"; flake = false; };
|
||||||
zsh-history-substring-search = { url = "github:zsh-users/zsh-history-substring-search"; flake = false; };
|
zsh-history-substring-search = { url = "github:zsh-users/zsh-history-substring-search"; flake = false; };
|
||||||
fast-syntax-highlighting = { url = "github:zdharma-continuum/fast-syntax-highlighting"; flake = false; };
|
fast-syntax-highlighting = { url = "github:zdharma-continuum/fast-syntax-highlighting"; flake = false; };
|
||||||
pure = { url = "github:sindresorhus/pure"; flake = false; };
|
pure = { url = "github:sindresorhus/pure"; flake = false; };
|
||||||
|
|
||||||
# overlays
|
# overlays
|
||||||
discord-tokyonight = { url = "github:DanisDGK/zelk-customizations"; flake = false; };
|
|
||||||
discover = { url = "github:trigg/Discover"; flake = false; };
|
|
||||||
linux-tkg = { url = "github:Frogging-Family/linux-tkg"; flake = false; };
|
linux-tkg = { url = "github:Frogging-Family/linux-tkg"; flake = false; };
|
||||||
nvim-treesitter = { url = "github:nvim-treesitter/nvim-treesitter"; flake = false; };
|
nvim-treesitter = { url = "github:nvim-treesitter/nvim-treesitter"; flake = false; };
|
||||||
packwiz = { url = "github:comp500/packwiz"; flake = false; };
|
|
||||||
spotify-adblock = { url = "github:abba23/spotify-adblock"; flake = false; };
|
spotify-adblock = { url = "github:abba23/spotify-adblock"; flake = false; };
|
||||||
tree-sitter-glimmer = { url = "github:alexlafroscia/tree-sitter-glimmer"; flake = false; };
|
|
||||||
tree-sitter-jsonc = { url = "gitlab:WhyNotHugo/tree-sitter-jsonc"; flake = false; };
|
tree-sitter-jsonc = { url = "gitlab:WhyNotHugo/tree-sitter-jsonc"; flake = false; };
|
||||||
wine-discord-ipc-bridge = { url = "github:0e4ef622/wine-discord-ipc-bridge"; flake = false; };
|
wine-discord-ipc-bridge = { url = "github:0e4ef622/wine-discord-ipc-bridge"; flake = false; };
|
||||||
|
|
||||||
# shells
|
# containers
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
c-amethyst.url = "path:./containers/amethyst";
|
||||||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
c-beryllium.url = "path:./containers/beryllium";
|
||||||
|
c-citrine.url = "path:./containers/citrine";
|
||||||
|
c-diamond.url = "path:./containers/diamond";
|
||||||
|
c-emerald.url = "path:./containers/emerald";
|
||||||
|
c-fluorite.url = "path:./containers/fluorite";
|
||||||
|
c-garnet.url = "path:./containers/garnet";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, agenix, nixos-generators, nixpkgs, nixpkgs-raccoon, ... } @ inputs:
|
outputs = { self, agenix, catppuccin, nixpkgs, ... } @ inputs:
|
||||||
let
|
let
|
||||||
overlays = (import ./overlays)
|
overlays = (import ./overlays)
|
||||||
++ [(final: prev: {
|
++ [(final: prev: {
|
||||||
me = prev.callPackage ./packages { inherit inputs; } // { inherit inputs; };
|
me = prev.callPackage ./packages { inherit inputs; } // { inherit inputs; };
|
||||||
})];
|
})];
|
||||||
|
|
||||||
|
patchOverlaysWithLinuxLava = nixpkgs: arch: ([(self: super: {
|
||||||
|
linuxLavaNixpkgs = import nixpkgs {
|
||||||
|
overlays = [ (import ./overlays/linux-lava.nix) ] ++ overlays;
|
||||||
|
system = arch;
|
||||||
|
};
|
||||||
|
})] ++ overlays);
|
||||||
|
|
||||||
mkSystem =
|
mkSystem =
|
||||||
if !(self ? rev) then throw "Dirty git tree detected." else
|
if !(self ? rev) then throw "Dirty git tree detected." else
|
||||||
nixpkgs: name: arch: enableGUI: extraModules: nixpkgs.lib.nixosSystem {
|
nixpkgs: name: arch: extraModules: nixpkgs.lib.nixosSystem {
|
||||||
system = arch;
|
system = arch;
|
||||||
modules = [
|
modules = [
|
||||||
{ nixpkgs.overlays = overlays; }
|
({
|
||||||
|
nixpkgs.overlays = patchOverlaysWithLinuxLava nixpkgs arch;
|
||||||
|
})
|
||||||
agenix.nixosModules.age
|
agenix.nixosModules.age
|
||||||
|
catppuccin.nixosModules.catppuccin
|
||||||
(./hosts + "/${name}")
|
(./hosts + "/${name}")
|
||||||
] ++ extraModules;
|
] ++ extraModules;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs enableGUI;
|
inherit inputs;
|
||||||
modules = import ./modules { lib = nixpkgs.lib; };
|
modules = import ./modules { lib = nixpkgs.lib; };
|
||||||
|
gcSecrets = builtins.fromJSON (builtins.readFile "${self}/secrets.gcrypt/shared.json");
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations."blossom" = mkSystem nixpkgs "blossom" "x86_64-linux" true [];
|
nixosConfigurations."alyssum" = mkSystem nixpkgs "alyssum" "x86_64-linux" [];
|
||||||
nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" true [];
|
nixosConfigurations."anemone" = mkSystem nixpkgs "anemone" "x86_64-linux" [];
|
||||||
|
nixosConfigurations."dandelion" = mkSystem nixpkgs "dandelion" "aarch64-linux" [];
|
||||||
nixosConfigurations."caramel" = mkSystem nixpkgs-raccoon "caramel" "aarch64-linux" false [{
|
nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" [];
|
||||||
nixpkgs.overlays = [
|
|
||||||
(self: super: {
|
|
||||||
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}];
|
|
||||||
nixosConfigurations."sugarcane" = mkSystem nixpkgs-raccoon "sugarcane" "x86_64-linux" false [];
|
|
||||||
|
|
||||||
packages."x86_64-linux" =
|
packages."x86_64-linux" =
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs rec {
|
||||||
inherit overlays;
|
overlays = patchOverlaysWithLinuxLava nixpkgs system;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit (pkgs.me) linux-lava;
|
inherit (pkgs.me) linux-lava spotify-adblock;
|
||||||
|
linux-lava-ccache = pkgs.me.linux-lava.override { useCcache = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
packages."aarch64-linux" =
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs-raccoon {
|
|
||||||
inherit overlays;
|
|
||||||
system = "aarch64-linux";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
caramel-img = self.nixosConfigurations."caramel".config.system.build.sdImage;
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO: currently broken
|
|
||||||
# devShells.x86_64-linux = pkgs.callPackage ./shells { inherit inputs; };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
hosts/alyssum/default.nix
Normal file
45
hosts/alyssum/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{ inputs, lib, modules, modulesPath, ... }: {
|
||||||
|
networking.hostName = "alyssum";
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
|
age.secrets = {
|
||||||
|
acme_dns.file = ../../secrets/acme_dns.age;
|
||||||
|
passwd.file = ../../secrets/passwd.age;
|
||||||
|
navidrome_env.file = ../../secrets/navidrome_env.age;
|
||||||
|
wpa_conf = {
|
||||||
|
file = ../../secrets/wpa_conf.age;
|
||||||
|
path = "/etc/wpa_supplicant/imperative.conf";
|
||||||
|
symlink = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = with modules.system; [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
base
|
||||||
|
kernel
|
||||||
|
nix-stable
|
||||||
|
packages
|
||||||
|
security
|
||||||
|
tailscale
|
||||||
|
|
||||||
|
modules.services.nginx
|
||||||
|
modules.services.syncthing
|
||||||
|
|
||||||
|
inputs.c-emerald.nixosModule
|
||||||
|
inputs.c-garnet.nixosModule
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
./home.syncthing.nix
|
||||||
|
./samba.nix
|
||||||
|
|
||||||
|
../../users/hana
|
||||||
|
];
|
||||||
|
|
||||||
|
me.environment = "headless";
|
||||||
|
services.syncthing.user = lib.mkForce "hana";
|
||||||
|
}
|
||||||
35
hosts/alyssum/filesystem.nix
Normal file
35
hosts/alyssum/filesystem.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
bind = src: {
|
||||||
|
depends = [ "/nix" ];
|
||||||
|
device = src;
|
||||||
|
fsType = "none";
|
||||||
|
neededForBoot = true;
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
mkLabelMount = label: type: {
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
fsType = type;
|
||||||
|
options = [ "defaults" "relatime" ];
|
||||||
|
};
|
||||||
|
mkBtrfsMount = name: subvol: atime: mkLabelMount name "btrfs" // {
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
|
||||||
|
};
|
||||||
|
submount = mkBtrfsMount "alyssum";
|
||||||
|
in {
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "rootfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=8G" "mode=755" ];
|
||||||
|
};
|
||||||
|
"/boot" = mkLabelMount "stem" "vfat";
|
||||||
|
|
||||||
|
"/flower" = mkBtrfsMount "myosotis" "/@" true;
|
||||||
|
"/nix" = submount "/@/nix" false;
|
||||||
|
"/persist" = (submount "/@/persist" true) // { neededForBoot = true; };
|
||||||
|
"/persist/.snapshots" = submount "/snap/persist" false;
|
||||||
|
"/var/log/journal" = bind "/persist/journal";
|
||||||
|
};
|
||||||
|
}
|
||||||
39
hosts/alyssum/home.syncthing.nix
Normal file
39
hosts/alyssum/home.syncthing.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
configOn = user: port: {
|
||||||
|
me.binds."/home/${user}/.config/syncthing" = "${user}/syncthing/config";
|
||||||
|
me.binds."/home/${user}/.local/state/syncthing" = "${user}/syncthing/state";
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /flower/syncthing/${user} 700 ${user} users" ];
|
||||||
|
|
||||||
|
users.users.${user} = {
|
||||||
|
hashedPasswordFile = config.age.secrets.passwd.path;
|
||||||
|
isNormalUser = true;
|
||||||
|
linger = true;
|
||||||
|
};
|
||||||
|
home-manager.users.${user} = { ... }: {
|
||||||
|
home = {
|
||||||
|
username = "${user}";
|
||||||
|
homeDirectory = "/home/${user}";
|
||||||
|
stateVersion = "26.05";
|
||||||
|
};
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
guiAddress = "[::]:${toString port}";
|
||||||
|
overrideDevices = false;
|
||||||
|
overrideFolders = false;
|
||||||
|
settings = {
|
||||||
|
options.listenAddresses = [
|
||||||
|
"tcp://0.0.0.0:2${toString port}"
|
||||||
|
"quic://0.0.0.0:2${toString port}"
|
||||||
|
"dynamic+https://relays.syncthing.net/endpoint"
|
||||||
|
];
|
||||||
|
defaults.folder.path = "/flower/syncthing/${user}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in lib.mkMerge [
|
||||||
|
(configOn "kujira" 8385)
|
||||||
|
(configOn "cilly" 8386)
|
||||||
|
]
|
||||||
12
hosts/alyssum/kernel.nix
Normal file
12
hosts/alyssum/kernel.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
|
||||||
|
initrd.kernelModules = [ ];
|
||||||
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
};
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
}
|
||||||
15
hosts/alyssum/networking.nix
Normal file
15
hosts/alyssum/networking.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
networking = {
|
||||||
|
useDHCP = true;
|
||||||
|
wireless.enable = true;
|
||||||
|
|
||||||
|
interfaces.wlp1s0.useDHCP = false;
|
||||||
|
interfaces.wlp1s0.ipv4.addresses = [{
|
||||||
|
address = "192.168.1.167";
|
||||||
|
prefixLength = 24;
|
||||||
|
}];
|
||||||
|
|
||||||
|
defaultGateway = "192.168.1.1";
|
||||||
|
nameservers = [ "8.8.8.8" "8.8.4.4" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
htop
|
htop
|
||||||
84
hosts/alyssum/samba.nix
Normal file
84
hosts/alyssum/samba.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
configOn = user: let
|
||||||
|
passwd_fname = "passwd_smb${user}";
|
||||||
|
in {
|
||||||
|
age.secrets.${passwd_fname}.file = ../../secrets/${passwd_fname}.age;
|
||||||
|
me.binds."/flower/smb/${user}/music" = "/flower/media/music/${user}";
|
||||||
|
me.binds."/flower/smb/${user}/syncthing" = "/flower/syncthing/${user}";
|
||||||
|
|
||||||
|
users.users.${user} = {
|
||||||
|
hashedPasswordFile = config.age.secrets.passwd.path;
|
||||||
|
isNormalUser = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.activationScripts = {
|
||||||
|
init_smbpasswd.text = let
|
||||||
|
smbpasswd = "${config.services.samba.package}/bin/smbpasswd";
|
||||||
|
in ''
|
||||||
|
printf "$(cat ${config.age.secrets.${passwd_fname}.path})\n$(cat ${config.age.secrets.${passwd_fname}.path})\n" | ${smbpasswd} -sa ${user}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
services.samba.settings."${user}" = {
|
||||||
|
"path" = "/flower/smb/${user}";
|
||||||
|
"browseable" = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "no";
|
||||||
|
"create mask" = "0644";
|
||||||
|
"directory mask" = "0755";
|
||||||
|
"force user" = user;
|
||||||
|
"force group" = "users";
|
||||||
|
"valid users" = user;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in lib.mkMerge [
|
||||||
|
(configOn "cilly")
|
||||||
|
(configOn "kujira")
|
||||||
|
{
|
||||||
|
me.binds."/flower/smb/kujira/opencloud" = "/flower/opencloud/data/storage/users/users/a8e29fc0-673c-4c67-be00-2442904acb43";
|
||||||
|
|
||||||
|
networking.firewall.allowPing = true;
|
||||||
|
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.samba4Full;
|
||||||
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
"server smb encrypt" = "required";
|
||||||
|
"workgroup" = "WORKGROUP";
|
||||||
|
"server string" = "smbnix";
|
||||||
|
"netbios name" = "smbnix";
|
||||||
|
"security" = "user";
|
||||||
|
"hosts allow" = "100.64.0.0/10 127.0.0.1 alyssum localhost";
|
||||||
|
"hosts deny" = "0.0.0.0/0";
|
||||||
|
"guest account" = "nobody";
|
||||||
|
"map to guest" = "bad user";
|
||||||
|
};
|
||||||
|
"public" = {
|
||||||
|
"path" = "/flower/smb/public";
|
||||||
|
"browseable" = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "yes";
|
||||||
|
"create mask" = "0644";
|
||||||
|
"directory mask" = "0755";
|
||||||
|
"force user" = "hana";
|
||||||
|
"force group" = "users";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.samba-wsdd = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
publish.enable = true;
|
||||||
|
publish.userServices = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
60
hosts/anemone/default.nix
Normal file
60
hosts/anemone/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
{ config, inputs, modules, overlays, pkgs, ... }: {
|
||||||
|
networking.hostName = "anemone";
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
|
nixpkgs.overlays = [ inputs.neovim-nightly.overlays.default ];
|
||||||
|
age.secrets = {
|
||||||
|
wg_anemone.file = ../../secrets/wg_anemone.age;
|
||||||
|
passwd.file = ../../secrets/passwd.age;
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = with modules.system; [
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
audio
|
||||||
|
base
|
||||||
|
bluetooth
|
||||||
|
ccache
|
||||||
|
corectrl
|
||||||
|
docker
|
||||||
|
flatpak
|
||||||
|
greetd
|
||||||
|
gui
|
||||||
|
input
|
||||||
|
kernel
|
||||||
|
nix
|
||||||
|
packages
|
||||||
|
printing
|
||||||
|
security
|
||||||
|
snapper
|
||||||
|
tailscale
|
||||||
|
wireguard
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
|
||||||
|
../../users/rin
|
||||||
|
|
||||||
|
modules.services.syncthing
|
||||||
|
];
|
||||||
|
|
||||||
|
me = {
|
||||||
|
environment = "laptop";
|
||||||
|
batteryDevice = "BATT";
|
||||||
|
kbBacklightDevice = "asus::kbd_backlight";
|
||||||
|
hasFingerprint = true;
|
||||||
|
hidpi = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.wireshark = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.wireshark;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.fprintd.enable = true;
|
||||||
|
services.tlp.enable = true;
|
||||||
|
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
}
|
||||||
36
hosts/anemone/filesystem.nix
Normal file
36
hosts/anemone/filesystem.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
mkLabelMount = label: type: lazy: {
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
fsType = type;
|
||||||
|
options = [ "defaults" "relatime" ] ++ lib.optionals lazy [ "nofail" ];
|
||||||
|
};
|
||||||
|
mkBtrfsMount = name: subvol: atime: mkLabelMount name "btrfs" false // {
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
|
||||||
|
};
|
||||||
|
submount = mkBtrfsMount "Anemone";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "rootfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=8G" "mode=755" ];
|
||||||
|
};
|
||||||
|
"/boot" = mkLabelMount "SYSTEM" "vfat" true;
|
||||||
|
|
||||||
|
"/mnt/butter" = submount "/" true;
|
||||||
|
"/nix" = submount "/current/snow" false;
|
||||||
|
"/home" = submount "/current/home" true;
|
||||||
|
"/home/.snapshots" = submount "/snapshot/home" false;
|
||||||
|
"/root" = submount "/current/root" false;
|
||||||
|
"/var" = submount "/current/var" false;
|
||||||
|
"/persist" = {
|
||||||
|
depends = [ "/var" ];
|
||||||
|
device = "/var/persist";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
62
hosts/anemone/kernel.nix
Normal file
62
hosts/anemone/kernel.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
boot = {
|
||||||
|
consoleLogLevel = 0;
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
systemd.enable = true;
|
||||||
|
verbose = false;
|
||||||
|
};
|
||||||
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
kernelPackages = lib.mkForce (pkgs.linuxPackagesFor pkgs.me.linux-lava);
|
||||||
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"console=tty2"
|
||||||
|
"systemd.show_status=0"
|
||||||
|
"rd.systemd.show_status=0"
|
||||||
|
"rd.udev.log_level=3"
|
||||||
|
"udev.log_level=3"
|
||||||
|
"udev.log_priority=3"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# swapDevices = [{
|
||||||
|
# device = "/persist/swapfile";
|
||||||
|
# size = 16 * 1024;
|
||||||
|
# }];
|
||||||
|
#
|
||||||
|
# systemd.sleep.extraConfig = ''
|
||||||
|
# HibernateMode=shutdown
|
||||||
|
# '';
|
||||||
|
/*
|
||||||
|
services.logind.lidSwitch = "suspend-then-hibernate";
|
||||||
|
systemd.sleep.extraConfig = ''
|
||||||
|
HibernateDelaySec=14400
|
||||||
|
SuspendEstimationSec=3600
|
||||||
|
HibernateOnACPower=true
|
||||||
|
'';
|
||||||
|
*/
|
||||||
|
|
||||||
|
powerManagement.cpufreq.min = 400000;
|
||||||
|
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
|
hardware.firmware = let
|
||||||
|
fw = "${pkgs.linux-firmware}/lib/firmware/cirrus/";
|
||||||
|
in [(
|
||||||
|
pkgs.runCommandNoCC "cs35l41-10431683" { } ''
|
||||||
|
mkdir -p $out/lib/firmware/cirrus
|
||||||
|
cd $out/lib/firmware/cirrus
|
||||||
|
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12-spkid0-l0.bin cs35l41-dsp1-spk-prot-10431683-spkid0-l0.bin
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12-spkid0-l0.bin cs35l41-dsp1-spk-prot-10431683-spkid0-r0.bin
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12-spkid0-l0.bin cs35l41-dsp1-spk-prot-10431683-spkid1-l0.bin
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12-spkid0-l0.bin cs35l41-dsp1-spk-prot-10431683-spkid1-r0.bin
|
||||||
|
|
||||||
|
cp ${fw}/cs35l41-dsp1-spk-prot-10431e12.wmfw cs35l41-dsp1-spk-prot-10431683.wmfw
|
||||||
|
''
|
||||||
|
)];
|
||||||
|
}
|
||||||
4
hosts/anemone/networking.nix
Normal file
4
hosts/anemone/networking.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
networking.wireless.iwd.enable = true;
|
||||||
|
environment.etc."NetworkManager/system-connections".source = "/persist/nm_system-connections";
|
||||||
|
}
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{ config, inputs, modules, overlays, pkgs, ... }: {
|
|
||||||
networking.hostName = "blossom";
|
|
||||||
system.stateVersion = "21.11";
|
|
||||||
time.timeZone = "Asia/Phnom_Penh";
|
|
||||||
|
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
||||||
nixpkgs.overlays = [ inputs.neovim-nightly.overlay ];
|
|
||||||
age.secrets = {
|
|
||||||
passwd.file = ../../secrets/passwd.age;
|
|
||||||
wg_blossom.file = ../../secrets/wg_blossom.age;
|
|
||||||
wpa_conf.file = ../../secrets/wpa_conf.age;
|
|
||||||
};
|
|
||||||
imports = with modules.system; [
|
|
||||||
inputs.home-manager.nixosModule
|
|
||||||
home-manager
|
|
||||||
|
|
||||||
audio
|
|
||||||
base
|
|
||||||
greetd
|
|
||||||
gui
|
|
||||||
input
|
|
||||||
kernel
|
|
||||||
nix
|
|
||||||
packages
|
|
||||||
security
|
|
||||||
snapper
|
|
||||||
wireguard
|
|
||||||
|
|
||||||
./filesystem.nix
|
|
||||||
./kernel.nix
|
|
||||||
./networking.nix
|
|
||||||
|
|
||||||
../../users/rin
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
mkMount = uuid: type: {
|
|
||||||
device = "/dev/disk/by-uuid/${uuid}";
|
|
||||||
fsType = type;
|
|
||||||
options = [ "defaults" "relatime" ];
|
|
||||||
};
|
|
||||||
mkBtrfsMount = subvolid: atime: mkMount "cf0f4302-f006-46a5-afc7-ada04d17f6f2" "btrfs" // {
|
|
||||||
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvolid=${builtins.toString subvolid}" (if atime then "relatime" else "noatime") ];
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
fileSystems = {
|
|
||||||
"/" = {
|
|
||||||
device = "rootfs";
|
|
||||||
fsType = "tmpfs";
|
|
||||||
options = [ "defaults" "size=4G" "mode=755" ];
|
|
||||||
};
|
|
||||||
"/boot" = mkMount "186A-A42E" "vfat";
|
|
||||||
|
|
||||||
"/mnt/butter" = mkBtrfsMount 5 true;
|
|
||||||
"/nix" = mkBtrfsMount 257 false;
|
|
||||||
"/home" = mkBtrfsMount 259 true;
|
|
||||||
"/home/.snapshots" = mkBtrfsMount 262 false;
|
|
||||||
"/root" = mkBtrfsMount 260 false;
|
|
||||||
"/var" = mkBtrfsMount 258 false;
|
|
||||||
"/persist" = {
|
|
||||||
depends = [ "/var" ];
|
|
||||||
device = "/var/persist";
|
|
||||||
fsType = "none";
|
|
||||||
options = [ "bind" ];
|
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# "/mnt/nfs" = {
|
|
||||||
# device = "192.168.100.11:/srv/nfs";
|
|
||||||
# fsType = "nfs";
|
|
||||||
# options = [ "defaults" ];
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
useOSProber = lib.mkForce false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
initrd.kernelModules = [ "i915" ];
|
|
||||||
kernelParams = [
|
|
||||||
"amdgpu.gpu_recovery=1"
|
|
||||||
"amdgpu.si_support=1"
|
|
||||||
"radeon.si_support=0"
|
|
||||||
"intel_pstate=passive"
|
|
||||||
"msr.allow_writes=on"
|
|
||||||
];
|
|
||||||
kernelPackages = lib.mkForce (pkgs.linuxPackagesFor pkgs.me.linux-lava);
|
|
||||||
|
|
||||||
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback.out ];
|
|
||||||
kernelModules = [ "v4l2loopback" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
{ config, ... }: {
|
|
||||||
environment.etc."wpa_supplicant.conf".source = config.age.secrets.wpa_conf.path;
|
|
||||||
networking = {
|
|
||||||
wireless = {
|
|
||||||
enable = true;
|
|
||||||
interfaces = [ "wlp3s0" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
useDHCP = false;
|
|
||||||
interfaces.eno1.useDHCP = false;
|
|
||||||
interfaces.wlp3s0.useDHCP = false;
|
|
||||||
|
|
||||||
interfaces.eno1.ipv4.addresses = [{
|
|
||||||
address = "10.0.0.2";
|
|
||||||
prefixLength = 24;
|
|
||||||
}];
|
|
||||||
interfaces.wlp3s0.ipv4.addresses = [{
|
|
||||||
address = "192.168.100.13";
|
|
||||||
prefixLength = 24;
|
|
||||||
}];
|
|
||||||
defaultGateway = "192.168.100.1";
|
|
||||||
nameservers = [ "192.168.100.15" ];
|
|
||||||
|
|
||||||
extraHosts = ''
|
|
||||||
192.168.100.12 strawberry
|
|
||||||
192.168.100.15 caramel
|
|
||||||
|
|
||||||
10.100.0.1 sugarcane
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
{ config, inputs, modules, modulesPath, overlays, pkgs, ... }: {
|
|
||||||
networking.hostName = "caramel";
|
|
||||||
system.stateVersion = "22.11";
|
|
||||||
time.timeZone = "Asia/Phnom_Penh";
|
|
||||||
|
|
||||||
age.secrets = {
|
|
||||||
acme_dns.file = ../../secrets/acme_dns.age;
|
|
||||||
passwd.file = ../../secrets/passwd.age;
|
|
||||||
warden_admin.file = ../../secrets/warden_admin.age;
|
|
||||||
wpa_conf.file = ../../secrets/wpa_conf.age;
|
|
||||||
wg_caramel.file = ../../secrets/wg_caramel.age;
|
|
||||||
};
|
|
||||||
imports =
|
|
||||||
(with modules.system; [
|
|
||||||
"${builtins.toString modulesPath}/installer/sd-card/sd-image-aarch64.nix"
|
|
||||||
inputs.home-manager-raccoon.nixosModule
|
|
||||||
|
|
||||||
base
|
|
||||||
home-manager
|
|
||||||
input
|
|
||||||
nix-stable
|
|
||||||
security
|
|
||||||
transmission
|
|
||||||
wireguard
|
|
||||||
|
|
||||||
./filesystem.nix
|
|
||||||
./kernel.nix
|
|
||||||
./image.nix
|
|
||||||
./networking.nix
|
|
||||||
./packages.nix
|
|
||||||
|
|
||||||
../../users/hana
|
|
||||||
]) ++
|
|
||||||
(with modules.services; [
|
|
||||||
# nginx
|
|
||||||
# postgres
|
|
||||||
# synapse
|
|
||||||
jellyfin
|
|
||||||
sonarr
|
|
||||||
tmptsync
|
|
||||||
unbound
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
bind = src: {
|
|
||||||
depends = [ "/persist" ];
|
|
||||||
device = src;
|
|
||||||
fsType = "none";
|
|
||||||
neededForBoot = true;
|
|
||||||
options = [ "bind" ];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
fileSystems = {
|
|
||||||
"/" = lib.mkForce {
|
|
||||||
device = "rootfs";
|
|
||||||
fsType = "tmpfs";
|
|
||||||
options = [ "defaults" "size=1G" "mode=755" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# "/nix" = {
|
|
||||||
# device = "overlayfs";
|
|
||||||
# fsType = "overlay";
|
|
||||||
# options = [
|
|
||||||
# "lowerdir=/mnt/image/nix"
|
|
||||||
# "upperdir=/persist/nix-overlay"
|
|
||||||
# "workdir=/persist/.overlaytmp"
|
|
||||||
# ];
|
|
||||||
# noCheck = true;
|
|
||||||
# depends = [ "/mnt/image" "/persist" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
"/nix" = (bind "/mnt/image/nix") // { depends = [ "/mnt/image" ]; };
|
|
||||||
|
|
||||||
"/mnt/image" = {
|
|
||||||
device = "/dev/disk/by-label/NIXOS_SD";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [ "defaults" "noatime" ];
|
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"/persist" = {
|
|
||||||
device = "/dev/disk/by-label/PI_HDD";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [ "defaults" "relatime" ];
|
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"/var/lib/acme" = bind "/persist/acme";
|
|
||||||
"/var/log/journal" = bind "/persist/journal";
|
|
||||||
"/boot" = (bind "/mnt/image/boot") // { depends = [ "/mnt/image" ]; };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
|
||||||
sdImage.expandOnBoot = false;
|
|
||||||
boot.postBootCommands = ''
|
|
||||||
# On the first boot do some maintenance tasks
|
|
||||||
if [ -f /mnt/image/nix-path-registration ]; then
|
|
||||||
set -euo pipefail
|
|
||||||
set -x
|
|
||||||
# Figure out device names for the boot device and root filesystem.
|
|
||||||
rootPart=$(${pkgs.util-linux}/bin/findmnt -n -o SOURCE /mnt/image)
|
|
||||||
bootDevice=$(lsblk -npo PKNAME $rootPart)
|
|
||||||
partNum=$(lsblk -npo MAJ:MIN $rootPart | ${pkgs.gawk}/bin/awk -F: '{print $2}')
|
|
||||||
|
|
||||||
# Resize the root partition and the filesystem to fit the disk
|
|
||||||
echo ",+," | sfdisk -N$partNum --no-reread $bootDevice
|
|
||||||
${pkgs.parted}/bin/partprobe
|
|
||||||
${pkgs.e2fsprogs}/bin/resize2fs $rootPart
|
|
||||||
|
|
||||||
# Register the contents of the initial Nix store
|
|
||||||
${config.nix.package.out}/bin/nix-store --load-db < /mnt/image/nix-path-registration
|
|
||||||
|
|
||||||
# nixos-rebuild also requires a "system" profile and an /etc/NIXOS tag.
|
|
||||||
touch /etc/NIXOS
|
|
||||||
${config.nix.package.out}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
|
|
||||||
|
|
||||||
# Prevents this from running on later boots.
|
|
||||||
rm -f /mnt/image/nix-path-registration
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{ config, inputs, lib, pkgs, ... }: {
|
|
||||||
imports = [
|
|
||||||
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
|
||||||
];
|
|
||||||
hardware.raspberry-pi."4".fkms-3d.enable = true;
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
initrd.kernelModules = [ "overlay" ];
|
|
||||||
supportedFilesystems = lib.mkForce [ "btrfs" "vfat" ];
|
|
||||||
kernel.sysctl = {
|
|
||||||
"kernel.core_pattern" = "|/bin/false";
|
|
||||||
"kernel.sysrq" = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{ config, ... }: {
|
|
||||||
environment.etc."wpa_supplicant.conf".source = config.age.secrets.wpa_conf.path;
|
|
||||||
networking = {
|
|
||||||
firewall.allowedTCPPorts = [ 80 443 ];
|
|
||||||
|
|
||||||
wireless = {
|
|
||||||
enable = true;
|
|
||||||
interfaces = [ "wlan0" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
useDHCP = false;
|
|
||||||
interfaces.wlan0.useDHCP = false;
|
|
||||||
|
|
||||||
interfaces.wlan0.ipv4.addresses = [{
|
|
||||||
address = "192.168.100.15";
|
|
||||||
prefixLength = 24;
|
|
||||||
}];
|
|
||||||
defaultGateway = "192.168.100.1";
|
|
||||||
nameservers = [ "8.8.8.8" ];
|
|
||||||
|
|
||||||
extraHosts = ''
|
|
||||||
192.168.100.12 strawberry
|
|
||||||
192.168.100.13 blossom
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# wait for ntp before connecting to wireguard
|
|
||||||
systemd = {
|
|
||||||
additionalUpstreamSystemUnits = [ "systemd-time-wait-sync.service" ];
|
|
||||||
services = {
|
|
||||||
"systemd-time-wait-sync".wantedBy = [ "multi-user.target" ];
|
|
||||||
"wireguard-wg0".after = [ "time-sync.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
44
hosts/dandelion/default.nix
Normal file
44
hosts/dandelion/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
{ inputs, modules, modulesPath, ... }: {
|
||||||
|
networking.hostName = "dandelion";
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
|
age.secrets = {
|
||||||
|
acme_dns.file = ../../secrets/acme_dns.age;
|
||||||
|
slskd_env.file = ../../secrets/slskd_env.age;
|
||||||
|
wg_dandelion.file = ../../secrets/wg_dandelion.age;
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = with modules.system; [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
base
|
||||||
|
kernel
|
||||||
|
nix-stable
|
||||||
|
packages
|
||||||
|
security
|
||||||
|
tailscale
|
||||||
|
wireguard
|
||||||
|
|
||||||
|
modules.services.banksia
|
||||||
|
modules.services.nginx
|
||||||
|
modules.services.unbound
|
||||||
|
modules.services.website
|
||||||
|
|
||||||
|
inputs.c-amethyst.nixosModule
|
||||||
|
inputs.c-beryllium.nixosModule
|
||||||
|
inputs.c-citrine.nixosModule
|
||||||
|
inputs.c-diamond.nixosModule
|
||||||
|
inputs.c-fluorite.nixosModule
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
./nginx.nix
|
||||||
|
|
||||||
|
../../users/hana
|
||||||
|
];
|
||||||
|
|
||||||
|
me.environment = "headless";
|
||||||
|
}
|
||||||
34
hosts/dandelion/filesystem.nix
Normal file
34
hosts/dandelion/filesystem.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
bind = src: {
|
||||||
|
depends = [ "/nix" ];
|
||||||
|
device = src;
|
||||||
|
fsType = "none";
|
||||||
|
neededForBoot = true;
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
mkLabelMount = label: type: {
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
fsType = type;
|
||||||
|
options = [ "defaults" "relatime" ];
|
||||||
|
};
|
||||||
|
mkBtrfsMount = name: subvol: atime: mkLabelMount name "btrfs" // {
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
|
||||||
|
};
|
||||||
|
submount = mkBtrfsMount "DANDELION";
|
||||||
|
in {
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "rootfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=6G" "mode=755" ];
|
||||||
|
};
|
||||||
|
"/boot" = mkLabelMount "UEFI" "vfat";
|
||||||
|
|
||||||
|
"/nix" = submount "/@/nix" false;
|
||||||
|
"/persist" = (submount "/@/persist" true) // { neededForBoot = true; };
|
||||||
|
"/persist/.snapshots" = submount "/snap/persist" false;
|
||||||
|
"/var/log/journal" = bind "/persist/journal";
|
||||||
|
};
|
||||||
|
}
|
||||||
10
hosts/dandelion/kernel.nix
Normal file
10
hosts/dandelion/kernel.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ];
|
||||||
|
initrd.kernelModules = [ "nvme" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
4
hosts/dandelion/networking.nix
Normal file
4
hosts/dandelion/networking.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }: {
|
||||||
|
networking.useDHCP = true;
|
||||||
|
networking.interfaces.enp2s0.useDHCP = false;
|
||||||
|
}
|
||||||
8
hosts/dandelion/nginx.nix
Normal file
8
hosts/dandelion/nginx.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }: {
|
||||||
|
services.nginx.virtualHosts."muse.lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".return = "404";
|
||||||
|
locations."/share/".proxyPass = "http://[fd0d:2::5:2]:4533";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
htop
|
htop
|
||||||
|
|
@ -1,23 +1,24 @@
|
||||||
{ config, inputs, modules, overlays, pkgs, ... }: {
|
{ config, inputs, modules, overlays, pkgs, ... }: {
|
||||||
networking.hostName = "hyacinth";
|
networking.hostName = "hyacinth";
|
||||||
system.stateVersion = "21.11";
|
system.stateVersion = "21.11";
|
||||||
time.timeZone = "Asia/Phnom_Penh";
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
nixpkgs.overlays = [ inputs.neovim-nightly.overlays.default ];
|
||||||
nixpkgs.overlays = [ inputs.neovim-nightly.overlay ];
|
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
passwd.file = ../../secrets/passwd.age;
|
passwd.file = ../../secrets/passwd.age;
|
||||||
wg_hyacinth.file = ../../secrets/wg_blossom.age;
|
wg_hyacinth.file = ../../secrets/wg_hyacinth.age;
|
||||||
wpa_conf.file = ../../secrets/wpa_conf.age;
|
wpa_conf.file = ../../secrets/wpa_conf.age;
|
||||||
};
|
};
|
||||||
imports = with modules.system; [
|
imports = with modules.system; [
|
||||||
inputs.home-manager.nixosModule
|
|
||||||
home-manager
|
home-manager
|
||||||
|
|
||||||
|
aagl
|
||||||
audio
|
audio
|
||||||
base
|
base
|
||||||
|
bluetooth
|
||||||
ccache
|
ccache
|
||||||
corectrl
|
corectrl
|
||||||
|
docker
|
||||||
flatpak
|
flatpak
|
||||||
greetd
|
greetd
|
||||||
gui
|
gui
|
||||||
|
|
@ -28,21 +29,19 @@
|
||||||
printing
|
printing
|
||||||
security
|
security
|
||||||
snapper
|
snapper
|
||||||
virtualisation
|
tailscale
|
||||||
wireguard
|
wireguard
|
||||||
|
|
||||||
modules.services.postgres
|
modules.services.syncthing
|
||||||
|
|
||||||
./filesystem.nix
|
./filesystem.nix
|
||||||
./kernel.nix
|
./kernel.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./packages.nix
|
||||||
|
|
||||||
../../users/rin
|
../../users/rin
|
||||||
];
|
];
|
||||||
services.postgresql.ensureDatabases = [ "barista" "barista-dev" ];
|
systemd.services.nix-daemon.environment.TMPDIR = "/nix/tmp";
|
||||||
|
|
||||||
# For steam fhs-env
|
me.hasBluetooth = true;
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
|
||||||
"openssl-1.1.1w"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ in
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "rootfs";
|
device = "rootfs";
|
||||||
fsType = "tmpfs";
|
fsType = "tmpfs";
|
||||||
options = [ "defaults" "size=8G" "mode=755" ];
|
options = [ "defaults" "size=24G" "mode=755" ];
|
||||||
};
|
};
|
||||||
"/boot" = mkLabelMount "CUP" "vfat";
|
"/boot" = mkLabelMount "CUP" "vfat";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,8 @@
|
||||||
];
|
];
|
||||||
kernelPackages = lib.mkForce (pkgs.linuxPackagesFor pkgs.me.linux-lava);
|
kernelPackages = lib.mkForce (pkgs.linuxPackagesFor pkgs.me.linux-lava);
|
||||||
};
|
};
|
||||||
services.xserver.xrandrHeads = [{
|
hardware.amdgpu.overdrive = {
|
||||||
output = "DP-1";
|
enable = true;
|
||||||
primary = true;
|
ppfeaturemask = "0xffffffff";
|
||||||
monitorConfig = ''
|
};
|
||||||
Modeline "1920x1080_165.00" 525.00 1920 2088 2296 2672 1080 1083 1088 1192 -hsync +vsync
|
|
||||||
Option "PreferredMode" "1920x1080_165.00"
|
|
||||||
'';
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,18 @@
|
||||||
{ config, ... }: {
|
{ config, ... }: {
|
||||||
environment.etc."wpa_supplicant.conf".source = config.age.secrets.wpa_conf.path;
|
environment.etc."wpa_supplicant.conf".source = config.age.secrets.wpa_conf.path;
|
||||||
networking = {
|
networking = {
|
||||||
useDHCP = false;
|
useDHCP = true;
|
||||||
interfaces.enp5s0.useDHCP = false;
|
interfaces.enp5s0.useDHCP = false;
|
||||||
|
interfaces.enp5s0.wakeOnLan.enable = true;
|
||||||
|
|
||||||
interfaces.enp5s0.ipv4.addresses = [{
|
interfaces.enp5s0.ipv4.addresses = [{
|
||||||
address = "192.168.100.16";
|
address = "192.168.1.201";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
}];
|
}];
|
||||||
defaultGateway = "192.168.100.1";
|
defaultGateway = "192.168.1.1";
|
||||||
nameservers = [ "1.1.1.1" ];
|
nameservers = [ "8.8.8.8" "8.8.4.4" ];
|
||||||
|
|
||||||
extraHosts = ''
|
extraHosts = ''
|
||||||
192.168.100.12 strawberry
|
|
||||||
192.168.100.15 caramel
|
|
||||||
|
|
||||||
10.100.0.1 sugarcane
|
10.100.0.1 sugarcane
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
7
hosts/hyacinth/packages.nix
Normal file
7
hosts/hyacinth/packages.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
discord
|
||||||
|
jetbrains.idea
|
||||||
|
texliveFull
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
{ config, inputs, modules, modulesPath, overlays, pkgs, ... }: {
|
|
||||||
networking.hostName = "sugarcane";
|
|
||||||
system.stateVersion = "21.11";
|
|
||||||
time.timeZone = "Asia/Singapore";
|
|
||||||
|
|
||||||
age.secrets = {
|
|
||||||
passwd.file = ../../secrets/passwd.age;
|
|
||||||
wg_sugarcane.file = ../../secrets/wg_sugarcane.age;
|
|
||||||
};
|
|
||||||
imports = with modules.system; [
|
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
inputs.home-manager-raccoon.nixosModule
|
|
||||||
|
|
||||||
base
|
|
||||||
home-manager
|
|
||||||
input
|
|
||||||
nix-stable
|
|
||||||
security
|
|
||||||
wireguard
|
|
||||||
|
|
||||||
./filesystem.nix
|
|
||||||
./kernel.nix
|
|
||||||
./networking.nix
|
|
||||||
./packages.nix
|
|
||||||
|
|
||||||
../../users/hana
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
bind = src: {
|
|
||||||
depends = [ "/nix" ];
|
|
||||||
device = src;
|
|
||||||
fsType = "none";
|
|
||||||
neededForBoot = true;
|
|
||||||
options = [ "bind" ];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
fileSystems = {
|
|
||||||
"/" = {
|
|
||||||
device = "rootfs";
|
|
||||||
fsType = "tmpfs";
|
|
||||||
options = [ "defaults" "size=1G" "mode=755" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"/nix" = {
|
|
||||||
device = "/dev/disk/by-uuid/19d572a8-1cf6-4b9c-94c6-3ce6be54f719";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [ "defaults" "noatime" ];
|
|
||||||
neededForBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"/persist" = bind "/nix/persist";
|
|
||||||
"/var/log/journal" = bind "/nix/persist/journal";
|
|
||||||
"/boot" = bind "/nix/persist/boot";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{ config, inputs, pkgs, ... }: {
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
systemd-boot.enable = false;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
|
||||||
device = "/dev/sda";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
initrd.kernelModules = [ "nvme" ];
|
|
||||||
kernel.sysctl = {
|
|
||||||
"kernel.core_pattern" = "|/bin/false";
|
|
||||||
"kernel.sysrq" = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{ config, ... }: {
|
|
||||||
networking = {
|
|
||||||
useDHCP = false;
|
|
||||||
interfaces.ens3.useDHCP = true;
|
|
||||||
|
|
||||||
extraHosts = ''
|
|
||||||
10.100.0.3 blossom
|
|
||||||
10.100.0.4 strawberry
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
13
modules/binds.nix
Normal file
13
modules/binds.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, ...}: {
|
||||||
|
imports = [ ./options.nix ];
|
||||||
|
fileSystems = lib.mapAttrs (dest: key: let
|
||||||
|
target = if (lib.strings.hasPrefix "/" key)
|
||||||
|
then key
|
||||||
|
else "/persist/binds/${key}";
|
||||||
|
in {
|
||||||
|
depends = [ "/persist" ];
|
||||||
|
device = target;
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
}) config.me.binds;
|
||||||
|
}
|
||||||
|
|
@ -14,21 +14,30 @@ let
|
||||||
}) paths
|
}) paths
|
||||||
);
|
);
|
||||||
in {
|
in {
|
||||||
|
binds = ./binds.nix;
|
||||||
|
options = ./options.nix;
|
||||||
services = mkAttrsFromPaths [
|
services = mkAttrsFromPaths [
|
||||||
|
./services/banksia.nix
|
||||||
./services/jellyfin.nix
|
./services/jellyfin.nix
|
||||||
./services/nginx.nix
|
./services/nginx.nix
|
||||||
./services/postgres.nix
|
./services/postgres.nix
|
||||||
./services/sonarr.nix
|
./services/sonarr.nix
|
||||||
./services/synapse.nix
|
./services/synapse.nix
|
||||||
|
./services/syncthing.nix
|
||||||
./services/tmptsync.nix
|
./services/tmptsync.nix
|
||||||
|
./services/transmission.nix
|
||||||
./services/unbound.nix
|
./services/unbound.nix
|
||||||
./services/vaultwarden.nix
|
./services/vaultwarden.nix
|
||||||
|
./services/website.nix
|
||||||
];
|
];
|
||||||
system = mkAttrsFromPaths [
|
system = mkAttrsFromPaths [
|
||||||
|
./system/aagl.nix
|
||||||
./system/audio.nix
|
./system/audio.nix
|
||||||
./system/base.nix
|
./system/base.nix
|
||||||
|
./system/bluetooth.nix
|
||||||
./system/ccache.nix
|
./system/ccache.nix
|
||||||
./system/corectrl.nix
|
./system/corectrl.nix
|
||||||
|
./system/docker.nix
|
||||||
./system/flatpak.nix
|
./system/flatpak.nix
|
||||||
./system/greetd.nix
|
./system/greetd.nix
|
||||||
./system/gui.nix
|
./system/gui.nix
|
||||||
|
|
@ -41,34 +50,31 @@ in {
|
||||||
./system/printing.nix
|
./system/printing.nix
|
||||||
./system/security.nix
|
./system/security.nix
|
||||||
./system/snapper.nix
|
./system/snapper.nix
|
||||||
./system/transmission.nix
|
./system/tailscale.nix
|
||||||
./system/virtualisation.nix
|
./system/virtualisation.nix
|
||||||
./system/wireguard.nix
|
./system/wireguard.nix
|
||||||
];
|
];
|
||||||
user = mkAttrsFromPaths [
|
user = mkAttrsFromPaths [
|
||||||
./user/bspwm.nix
|
./user/catppuccin.nix
|
||||||
|
./user/comma.nix
|
||||||
./user/direnv.nix
|
./user/direnv.nix
|
||||||
./user/dunst.nix
|
./user/dunst.nix
|
||||||
./user/eww.nix
|
./user/eww.nix
|
||||||
./user/git.nix
|
./user/git.nix
|
||||||
./user/gpg.nix
|
./user/gpg.nix
|
||||||
|
./user/hypridle.nix
|
||||||
|
./user/hyprlock.nix
|
||||||
./user/kitty.nix
|
./user/kitty.nix
|
||||||
./user/mpv.nix
|
./user/mpv.nix
|
||||||
./user/neovim.nix
|
./user/neovim.nix
|
||||||
./user/neovim-minimal.nix
|
./user/neovim-minimal.nix
|
||||||
./user/npm.nix
|
./user/npm.nix
|
||||||
./user/obs.nix
|
./user/obs.nix
|
||||||
./user/packages-rin.nix
|
|
||||||
./user/pass.nix
|
|
||||||
./user/picom.nix
|
|
||||||
./user/polybar.nix
|
|
||||||
./user/rofi.nix
|
./user/rofi.nix
|
||||||
./user/sessionVariables.nix
|
./user/sessionVariables.nix
|
||||||
./user/spicetify.nix
|
./user/spicetify.nix
|
||||||
./user/sxhkd.nix
|
|
||||||
./user/theming.nix
|
./user/theming.nix
|
||||||
./user/xdg.nix
|
./user/xdg.nix
|
||||||
./user/xorg.nix
|
|
||||||
./user/zsh.nix
|
./user/zsh.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
53
modules/options.nix
Normal file
53
modules/options.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
mkOption
|
||||||
|
types;
|
||||||
|
in {
|
||||||
|
options.me = {
|
||||||
|
environment = mkOption {
|
||||||
|
type = types.enum [ "desktop" "laptop" "headless" ];
|
||||||
|
default = "desktop";
|
||||||
|
};
|
||||||
|
|
||||||
|
hasFingerprint = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
gui = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = config.me.environment != "headless";
|
||||||
|
};
|
||||||
|
|
||||||
|
batteryDevice = mkOption {
|
||||||
|
type = with types; nullOr (uniq str);
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
kbBacklightDevice = mkOption {
|
||||||
|
type = with types; nullOr (uniq str);
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
hasBluetooth = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = config.me.environment == "laptop";
|
||||||
|
};
|
||||||
|
|
||||||
|
hasWifi = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = config.me.environment == "laptop";
|
||||||
|
};
|
||||||
|
|
||||||
|
hidpi = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
binds = lib.mkOption {
|
||||||
|
type = with lib.types; attrsOf str;
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/services/banksia.nix
Normal file
11
modules/services/banksia.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# TODO ^^
|
||||||
|
{ ... }: {
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
"banksia.lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".return = "302 https://lab.lava.moe/cilly/Banksia";
|
||||||
|
locations."/api".proxyPass = "http://localhost:8080/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,17 +1,21 @@
|
||||||
{ config, inputs, ... }: {
|
{ config, ... }: {
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
|
defaults = {
|
||||||
email = "me@lava.moe";
|
email = "me@lava.moe";
|
||||||
certs."lava.moe" = {
|
|
||||||
group = "nginx";
|
group = "nginx";
|
||||||
domain = "lava.moe";
|
dnsProvider = "cloudflare";
|
||||||
|
environmentFile = config.age.secrets."acme_dns".path;
|
||||||
|
};
|
||||||
|
certs."lava.moe" = {
|
||||||
extraDomainNames = [
|
extraDomainNames = [
|
||||||
"*.lava.moe"
|
"*.lava.moe"
|
||||||
"*.local.lava.moe"
|
"*.local.lava.moe"
|
||||||
];
|
];
|
||||||
dnsProvider = "cloudflare";
|
|
||||||
credentialsFile = config.age.secrets."acme_dns".path;
|
|
||||||
};
|
};
|
||||||
|
certs."cilly.moe" = {};
|
||||||
|
certs."cilly.dev" = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
|
|
@ -20,23 +24,5 @@
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
|
|
||||||
virtualHosts = {
|
|
||||||
"lava.moe" = {
|
|
||||||
useACMEHost = "lava.moe";
|
|
||||||
forceSSL = true;
|
|
||||||
root = inputs.website.outPath;
|
|
||||||
};
|
|
||||||
"_" = {
|
|
||||||
default = true;
|
|
||||||
addSSL = true;
|
|
||||||
# TODO generate this somewhere
|
|
||||||
sslCertificate = "/persist/fakeCerts/fake.crt";
|
|
||||||
sslCertificateKey = "/persist/fakeCerts/fake.key";
|
|
||||||
extraConfig = ''
|
|
||||||
return 444;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
dir = "/persist/postgresql/${config.services.postgresql.package.psqlSchema}";
|
dir = "/persist/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||||
uid = toString config.ids.uids.postgres;
|
uid = toString config.ids.uids.postgres;
|
||||||
|
|
@ -8,6 +8,8 @@ in {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = dir;
|
dataDir = dir;
|
||||||
|
# TODO: broken :3
|
||||||
|
package = pkgs.postgresql_13;
|
||||||
authentication = lib.mkOverride 10 ''
|
authentication = lib.mkOverride 10 ''
|
||||||
#type database DBuser origin-address auth-method
|
#type database DBuser origin-address auth-method
|
||||||
local all all trust
|
local all all trust
|
||||||
|
|
|
||||||
23
modules/services/syncthing.nix
Normal file
23
modules/services/syncthing.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
dir = "/persist/shared/.syncthing";
|
||||||
|
user = if config.me.gui then "rin" else "hana";
|
||||||
|
uid = toString config.users.users."${user}".uid;
|
||||||
|
gid = toString config.users.groups.users.gid;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${dir}/config 700 ${uid} ${gid}"
|
||||||
|
"d ${dir}/data 700 ${uid} ${gid}"
|
||||||
|
];
|
||||||
|
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
openDefaultPorts = true;
|
||||||
|
user = user;
|
||||||
|
group = "users";
|
||||||
|
dataDir = "/persist/shared/.syncthing/data";
|
||||||
|
configDir = "/persist/shared/.syncthing/config";
|
||||||
|
guiAddress = if config.me.gui then "127.0.0.1:8384" else ":8384";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -5,13 +5,6 @@
|
||||||
downloadDirPermissions = "775";
|
downloadDirPermissions = "775";
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
settings = {
|
settings = {
|
||||||
alt-speed-down = 512;
|
|
||||||
alt-speed-enabled = true;
|
|
||||||
alt-speed-time-begin = 360;
|
|
||||||
alt-speed-time-day = 127;
|
|
||||||
alt-speed-time-enabled = true;
|
|
||||||
alt-speed-time-end = 1380;
|
|
||||||
alt-speed-up = 256;
|
|
||||||
download-dir = "/persist/transmission/Downloads";
|
download-dir = "/persist/transmission/Downloads";
|
||||||
incomplete-dir = "/persist/transmission/.incomplete";
|
incomplete-dir = "/persist/transmission/.incomplete";
|
||||||
ratio-limit-enabled = true;
|
ratio-limit-enabled = true;
|
||||||
|
|
@ -1,8 +1,17 @@
|
||||||
{ inputs, ... }:
|
{ inputs, pkgs, gcSecrets, ... }:
|
||||||
let
|
let
|
||||||
dir = "/persist/unbound";
|
dir = "/persist/unbound";
|
||||||
|
|
||||||
|
converted = pkgs.runCommand "stevenblack-hosts-unbound" {} ''
|
||||||
|
echo "server:" > "$out"
|
||||||
|
grep '^0\.0\.0\.0' "${inputs.stevenblack-hosts}/hosts" | awk '{print "local-zone: \""$2"\" always_refuse"}' | tail -n +2 >> "$out"
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
networking.firewall.interfaces.wlan0 = {
|
networking.firewall.interfaces."ve-+" = {
|
||||||
|
allowedUDPPorts = [ 53 853 ];
|
||||||
|
allowedTCPPorts = [ 53 853 ];
|
||||||
|
};
|
||||||
|
networking.firewall.interfaces.wg0 = {
|
||||||
allowedUDPPorts = [ 53 853 ];
|
allowedUDPPorts = [ 53 853 ];
|
||||||
allowedTCPPorts = [ 53 853 ];
|
allowedTCPPorts = [ 53 853 ];
|
||||||
};
|
};
|
||||||
|
|
@ -16,17 +25,27 @@ in {
|
||||||
name = ".";
|
name = ".";
|
||||||
forward-tls-upstream = true;
|
forward-tls-upstream = true;
|
||||||
forward-addr = [
|
forward-addr = [
|
||||||
|
"2606:4700:4700::1111@853#cloudflare-dns.com"
|
||||||
|
"2606:4700:4700::1001@853#cloudflare-dns.com"
|
||||||
|
"2001:4860:4860::8888@853#dns.google"
|
||||||
|
"2001:4860:4860::8844@853#dns.google"
|
||||||
"1.1.1.1@853#cloudflare-dns.com"
|
"1.1.1.1@853#cloudflare-dns.com"
|
||||||
"1.0.0.1@853#cloudflare-dns.com"
|
"1.0.0.1@853#cloudflare-dns.com"
|
||||||
|
"8.8.8.8@853#dns.google"
|
||||||
|
"8.8.4.4@853#dns.google"
|
||||||
];
|
];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
server = {
|
server = {
|
||||||
interface = [ "0.0.0.0" ];
|
interface = [ "0.0.0.0" "::0" ];
|
||||||
access-control = [
|
access-control = [
|
||||||
"127.0.0.1/8 allow"
|
"127.0.0.1/8 allow"
|
||||||
"10.0.0.0/8 allow"
|
"10.0.0.0/8 allow"
|
||||||
|
"100.64.0.0/10 allow"
|
||||||
"192.168.100.0/24 allow"
|
"192.168.100.0/24 allow"
|
||||||
|
"fd0d::/16 allow"
|
||||||
|
"fd7a:115c:a1e0::/48 allow"
|
||||||
|
"${gcSecrets.wireguard.ipv6Subnet}:/80 allow"
|
||||||
];
|
];
|
||||||
domain-insecure = [ "\"local.lava.moe\"" ];
|
domain-insecure = [ "\"local.lava.moe\"" ];
|
||||||
local-zone = [ "\"warden.local.lava.moe.\" redirect" ];
|
local-zone = [ "\"warden.local.lava.moe.\" redirect" ];
|
||||||
|
|
@ -35,7 +54,7 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
include = "${inputs.hosts-blocklists}/unbound/unbound.blacklist.conf";
|
include = "${converted}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
43
modules/services/website.nix
Normal file
43
modules/services/website.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
{ inputs, pkgs, ... }: let
|
||||||
|
pastel = inputs.pastel.packages.${pkgs.system}.default;
|
||||||
|
in {
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
"cilly.moe" = {
|
||||||
|
useACMEHost = "cilly.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
root = pastel.outPath;
|
||||||
|
};
|
||||||
|
"cilly.dev" = {
|
||||||
|
useACMEHost = "cilly.dev";
|
||||||
|
forceSSL = true;
|
||||||
|
root = pastel.outPath;
|
||||||
|
};
|
||||||
|
"lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
root = inputs.website.outPath;
|
||||||
|
};
|
||||||
|
"cdn.lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://sh.lava.moe$request_uri;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
"sh.lava.moe" = {
|
||||||
|
useACMEHost = "lava.moe";
|
||||||
|
forceSSL = true;
|
||||||
|
root = "/persist/cdn";
|
||||||
|
};
|
||||||
|
"_" = {
|
||||||
|
default = true;
|
||||||
|
addSSL = true;
|
||||||
|
# TODO generate this somewhere
|
||||||
|
sslCertificate = "/persist/fakeCerts/fake.crt";
|
||||||
|
sslCertificateKey = "/persist/fakeCerts/fake.key";
|
||||||
|
extraConfig = ''
|
||||||
|
return 444;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
modules/system/aagl.nix
Normal file
6
modules/system/aagl.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ inputs, ... }: {
|
||||||
|
imports = [ inputs.aagl.nixosModules.default ];
|
||||||
|
nix.settings = inputs.aagl.nixConfig;
|
||||||
|
programs.anime-game-launcher.enable = true;
|
||||||
|
programs.sleepy-launcher.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -17,7 +17,6 @@ let
|
||||||
rate = toString int.rate;
|
rate = toString int.rate;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
sound.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -26,7 +25,7 @@ in {
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
environment.etc."pipewire/pipewire.conf.d/99-config.conf".text = builtins.toJSON {
|
services.pipewire.extraConfig.pipewire = {
|
||||||
"context.properties" = {
|
"context.properties" = {
|
||||||
"default.clock.rate" = int.rate;
|
"default.clock.rate" = int.rate;
|
||||||
"default.clock.quantum" = int.quantum.def;
|
"default.clock.quantum" = int.quantum.def;
|
||||||
|
|
@ -50,7 +49,7 @@ in {
|
||||||
"resample.quality" = 1;
|
"resample.quality" = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
environment.etc."pipewire/pipewire-pulse.conf.d/99-config.conf".text = builtins.toJSON {
|
services.pipewire.extraConfig.pipewire-pulse = {
|
||||||
"context.modules" = [
|
"context.modules" = [
|
||||||
{
|
{
|
||||||
name = "libpipewire-module-rtkit";
|
name = "libpipewire-module-rtkit";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{ config, enableGUI, inputs, modules, overlays, ... }: {
|
{ config, inputs, modules, ... }: {
|
||||||
|
imports = [ modules.binds modules.options ];
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"machine-id".source = "/persist/machine-id";
|
"machine-id".source = "/persist/machine-id";
|
||||||
"ssh/ssh_host_rsa_key".source = "/persist/ssh_host_rsa_key";
|
"ssh/ssh_host_rsa_key".source = "/persist/ssh_host_rsa_key";
|
||||||
|
|
@ -8,7 +10,9 @@
|
||||||
};
|
};
|
||||||
environment.pathsToLink = [ "/share/zsh" ];
|
environment.pathsToLink = [ "/share/zsh" ];
|
||||||
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_AU.UTF-8";
|
||||||
|
i18n.extraLocales = [ "en_GB.UTF-8/UTF-8" ];
|
||||||
|
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
|
|
@ -19,6 +23,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nix.registry.config.flake = inputs.self;
|
nix.registry.config.flake = inputs.self;
|
||||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
|
||||||
nix.registry.shells.flake = inputs.self;
|
nix.registry.shells.flake = inputs.self;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
6
modules/system/bluetooth.nix
Normal file
6
modules/system/bluetooth.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ ... }: {
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
programs.corectrl = {
|
programs.corectrl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
gpuOverclock = {
|
|
||||||
enable = true;
|
|
||||||
ppfeaturemask = "0xffffffff";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
modules/system/docker.nix
Normal file
13
modules/system/docker.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
storageDriver = "btrfs";
|
||||||
|
# rootless = {
|
||||||
|
# enable = true;
|
||||||
|
# setSocketVariable = true;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.docker-compose
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
{ pkgs, lib, ... }: {
|
{ pkgs, ... }: {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session = {
|
default_session = {
|
||||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --time --cmd 'zsh -c \"source $HOME/.config/zsh/.zshrc && startx\"'";
|
command = "${pkgs.tuigreet}/bin/tuigreet --remember --asterisks --time --cmd 'zsh -c \"source $HOME/.config/zsh/.zshrc && Hyprland > $XDG_RUNTIME_DIR/Hyprland.out\"'";
|
||||||
user = "greeter";
|
user = "greeter";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
initial_session = {
|
||||||
|
command = "${pkgs.writeShellScript "launch.sh" ''
|
||||||
|
zsh -c "source $HOME/.config/zsh/.zshrc && Hyprland > \"$XDG_RUNTIME_DIR/Hyprland.out\""
|
||||||
|
''}";
|
||||||
|
user = "rin";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultFonts = true;
|
enableDefaultPackages = true;
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
serif = [ "NotoSerif" ];
|
serif = [ "NotoSerif" ];
|
||||||
|
|
@ -8,15 +8,13 @@
|
||||||
monospace = [ "CascadiaCode" ];
|
monospace = [ "CascadiaCode" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
fonts = with pkgs; [
|
packages = with pkgs; [
|
||||||
cascadia-code
|
material-symbols
|
||||||
font-awesome
|
|
||||||
font-awesome_4
|
|
||||||
hanazono
|
|
||||||
material-icons
|
material-icons
|
||||||
|
cascadia-code
|
||||||
|
hanazono
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk
|
noto-fonts-cjk-sans
|
||||||
noto-fonts-extra
|
|
||||||
open-sans
|
open-sans
|
||||||
twemoji-color-font
|
twemoji-color-font
|
||||||
unifont
|
unifont
|
||||||
|
|
@ -24,11 +22,10 @@
|
||||||
};
|
};
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autorun = false;
|
displayManager.lightdm.enable = lib.mkForce false;
|
||||||
displayManager = {
|
|
||||||
lightdm.enable = lib.mkForce false;
|
|
||||||
startx.enable = true;
|
|
||||||
};
|
|
||||||
desktopManager.xterm.enable = false;
|
desktopManager.xterm.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
security.pam.services.hyprlock = {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,19 @@
|
||||||
{ config, enableGUI, inputs, modules, ... }: {
|
{ config, inputs, modules, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit enableGUI inputs modules;
|
inherit inputs modules;
|
||||||
sysConfig = config;
|
sysConfig = config;
|
||||||
};
|
};
|
||||||
|
sharedModules = [
|
||||||
|
{
|
||||||
|
imports = [ modules.options ];
|
||||||
|
config.me = config.me;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ ... }: {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
displayManager = {
|
displayManager = {
|
||||||
xserverArgs = [
|
xserverArgs = [
|
||||||
|
|
@ -6,14 +6,19 @@
|
||||||
"-arinterval 15"
|
"-arinterval 15"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
libinput = {
|
};
|
||||||
|
services.keyd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mouse = {
|
keyboards = {
|
||||||
accelSpeed = "0";
|
default = {
|
||||||
accelProfile = "flat";
|
ids = [ "*" ];
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
capslock = "esc";
|
||||||
|
esc = "capslock";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
xkbOptions = "caps:escape";
|
|
||||||
};
|
};
|
||||||
console.useXkbConfig = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,10 @@
|
||||||
"kernel.core_pattern" = "|/bin/false";
|
"kernel.core_pattern" = "|/bin/false";
|
||||||
"kernel.sysrq" = 1;
|
"kernel.sysrq" = 1;
|
||||||
};
|
};
|
||||||
loader.grub.useOSProber = true;
|
|
||||||
};
|
};
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
zramSwap.enable = true;
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
priority = 100;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
nix = {
|
nix = {
|
||||||
|
package = pkgs.nixVersions.latest;
|
||||||
|
|
||||||
settings = rec {
|
settings = rec {
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://cache.nixos.org?priority=10"
|
"https://cache.nixos.org?priority=10"
|
||||||
|
|
@ -17,4 +19,5 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
programs.nh.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ config, inputs, pkgs, ... }: {
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixUnstable;
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
|
package = pkgs.nixVersions.latest;
|
||||||
|
|
||||||
settings = rec {
|
settings = rec {
|
||||||
extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
||||||
|
|
@ -15,6 +16,7 @@
|
||||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||||
];
|
];
|
||||||
trusted-substituters = substituters;
|
trusted-substituters = substituters;
|
||||||
|
trusted-users = [ "root" "rin" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
|
|
@ -22,4 +24,5 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
programs.nh.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
26
modules/system/packages-gui.nix
Normal file
26
modules/system/packages-gui.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
config = lib.mkIf config.me.gui {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
android-tools
|
||||||
|
gparted
|
||||||
|
nautilus
|
||||||
|
];
|
||||||
|
hardware.graphics.extraPackages = with pkgs; [
|
||||||
|
intel-vaapi-driver
|
||||||
|
libva-vdpau-driver
|
||||||
|
libvdpau-va-gl
|
||||||
|
];
|
||||||
|
hardware.opentabletdriver.enable = true;
|
||||||
|
hardware.keyboard.qmk.enable = true;
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.steam.override {
|
||||||
|
extraPkgs = pkgs: with pkgs; [
|
||||||
|
gsettings-desktop-schemas
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.dbus.packages = [ pkgs.dconf pkgs.gcr ];
|
||||||
|
services.gnome.sushi.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,14 @@
|
||||||
{ config, enableGUI, lib, pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
|
imports = [ ./packages-gui.nix ];
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
# ecryptfs
|
||||||
efibootmgr
|
efibootmgr
|
||||||
|
fd
|
||||||
git
|
git
|
||||||
|
git-crypt
|
||||||
htop
|
htop
|
||||||
jq
|
jq
|
||||||
|
kitty.terminfo
|
||||||
libarchive
|
libarchive
|
||||||
lf
|
lf
|
||||||
msr-tools
|
msr-tools
|
||||||
|
|
@ -11,35 +16,10 @@
|
||||||
neovim
|
neovim
|
||||||
nfs-utils
|
nfs-utils
|
||||||
ntfs3g
|
ntfs3g
|
||||||
sshfs
|
ripgrep
|
||||||
rsync
|
rsync
|
||||||
|
sshfs
|
||||||
wget
|
wget
|
||||||
] ++ lib.optionals enableGUI [
|
|
||||||
gparted
|
|
||||||
gnome.nautilus
|
|
||||||
];
|
];
|
||||||
environment.variables.EDITOR = "nvim";
|
environment.variables.EDITOR = "nvim";
|
||||||
}
|
}
|
||||||
// (if !enableGUI then {} else {
|
|
||||||
programs.adb.enable = true;
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
|
||||||
vaapiIntel
|
|
||||||
vaapiVdpau
|
|
||||||
libvdpau-va-gl
|
|
||||||
rocm-opencl-icd
|
|
||||||
rocm-opencl-runtime
|
|
||||||
];
|
|
||||||
programs.light.enable = true;
|
|
||||||
hardware.opentabletdriver.enable = true;
|
|
||||||
hardware.keyboard.qmk.enable = true;
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.steam.override {
|
|
||||||
extraPkgs = pkgs: with pkgs; [
|
|
||||||
gsettings-desktop-schemas
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.dbus.packages = [ pkgs.dconf pkgs.gcr ];
|
|
||||||
services.gnome.sushi.enable = true;
|
|
||||||
})
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = with pkgs; [
|
drivers = with pkgs; [
|
||||||
epson-escpr
|
epson-escpr
|
||||||
me.epson-201112j
|
#me.epson-201112j
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
networking.firewall =
|
networking.firewall =
|
||||||
let
|
let
|
||||||
iptables = "${pkgs.iptables}/bin/iptables";
|
iptables = "${pkgs.iptables}/bin/iptables";
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
allowedUDPPortRanges = [ { from = 20000; to = 20100; } ];
|
allowedUDPPortRanges = [ { from = 20000; to = 20100; } ];
|
||||||
allowedTCPPortRanges = [ { from = 20000; to = 20100; } ];
|
allowedTCPPortRanges = [ { from = 20000; to = 20100; } ];
|
||||||
trustedInterfaces = [ "wg0" ];
|
trustedInterfaces = [ "wg0" ];
|
||||||
|
logRefusedConnections = false;
|
||||||
|
|
||||||
extraCommands = genCmds "I";
|
extraCommands = genCmds "I";
|
||||||
extraStopCommands = genCmds "D";
|
extraStopCommands = genCmds "D";
|
||||||
|
|
@ -52,5 +53,33 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
pam = lib.mkIf (config.me.environment != "headless") {
|
||||||
|
u2f = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
cue = true;
|
||||||
|
pinverification = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.doas.rules.auth = {
|
||||||
|
u2f.settings.pinverification = lib.mkForce 0;
|
||||||
|
u2f_int = lib.mkMerge [
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
order = config.security.pam.services.doas.rules.auth.u2f.order + 1;
|
||||||
|
control = "sufficient";
|
||||||
|
modulePath = "${pkgs.pam_u2f}/lib/security/pam_u2f.so";
|
||||||
|
inherit (config.security.pam.u2f) settings;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
settings = lib.mkForce {
|
||||||
|
interactive = true;
|
||||||
|
pinverification = 0;
|
||||||
|
userpresence = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
modules/system/tailscale.nix
Normal file
13
modules/system/tailscale.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
age.secrets.tailscale_auth.file = ../../secrets/tailscale_auth.age;
|
||||||
|
me.binds."/var/lib/tailscale" = "tailscale";
|
||||||
|
networking.firewall.trustedInterfaces = [ "tailscale0" ];
|
||||||
|
networking.firewall.allowedUDPPorts = lib.mkIf (config.me.environment == "headless") [ 123 ];
|
||||||
|
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
authKeyFile = config.age.secrets.tailscale_auth.path;
|
||||||
|
openFirewall = true;
|
||||||
|
useRoutingFeatures = if config.me.environment == "headless" then "both" else "client";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, gcSecrets, ... }:
|
||||||
let
|
let
|
||||||
port = 51820;
|
port = 51801;
|
||||||
serverName = "sugarcane";
|
serverName = "dandelion";
|
||||||
serverInterface = "ens3";
|
serverInterface = "enp0s6";
|
||||||
serverIp = "51.79.240.130";
|
serverIp = gcSecrets.wireguard.gateway;
|
||||||
|
|
||||||
forwarding = {
|
forwarding = {
|
||||||
"80" = [ "10.100.0.2" "80" ];
|
|
||||||
"443" = [ "10.100.0.2" "443" ];
|
|
||||||
"22727" = [ "10.100.0.3" "7777" ];
|
"22727" = [ "10.100.0.3" "7777" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -20,52 +18,61 @@ let
|
||||||
in ''
|
in ''
|
||||||
${pkgs.iptables}/bin/iptables -${type} PREROUTING -t nat -i ${serverInterface} -p tcp --dport ${sport} -j DNAT --to ${dest}:${dport}
|
${pkgs.iptables}/bin/iptables -${type} PREROUTING -t nat -i ${serverInterface} -p tcp --dport ${sport} -j DNAT --to ${dest}:${dport}
|
||||||
${pkgs.iptables}/bin/iptables -${type} FORWARD -p tcp -d ${dest} --dport ${dport} -j ACCEPT
|
${pkgs.iptables}/bin/iptables -${type} FORWARD -p tcp -d ${dest} --dport ${dport} -j ACCEPT
|
||||||
|
${pkgs.iptables}/bin/iptables -${type} PREROUTING -t nat -i ${serverInterface} -p udp --dport ${sport} -j DNAT --to ${dest}:${dport}
|
||||||
|
${pkgs.iptables}/bin/iptables -${type} FORWARD -p udp -d ${dest} --dport ${dport} -j ACCEPT
|
||||||
'') forwarding
|
'') forwarding
|
||||||
);
|
);
|
||||||
|
|
||||||
routeBypass = {
|
|
||||||
caramel = {
|
|
||||||
gateway = "192.168.100.1";
|
|
||||||
interface = "wlan0";
|
|
||||||
routes = [
|
|
||||||
serverIp
|
|
||||||
];
|
|
||||||
};
|
|
||||||
hyacinth = {
|
|
||||||
gateway = "192.168.100.1";
|
|
||||||
interface = "enp5s0";
|
|
||||||
routes = [
|
|
||||||
serverIp
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
clients = {
|
clients = {
|
||||||
caramel = {
|
|
||||||
publicKey = "VDqcpS0lJzFgwikj61MJ1xc9P8Cuq0NXa+Hc+etn2iA=";
|
|
||||||
allowedIPs = [ "10.100.0.2/32" ];
|
|
||||||
};
|
|
||||||
hyacinth = {
|
hyacinth = {
|
||||||
publicKey = "6nVhazYdmC15A/nke9VrqIg3sOBVOmqj4GEsyBq7MVo=";
|
publicKey = "6nVhazYdmC15A/nke9VrqIg3sOBVOmqj4GEsyBq7MVo=";
|
||||||
allowedIPs = [ "10.100.0.3/32" ];
|
allowedIPs = [ "10.100.0.3/32" "${gcSecrets.wireguard.ipv6Subnet}:3" "fd0d::3" ];
|
||||||
|
interfaces = {
|
||||||
|
wg0 = { peers = [ server6OnlyPeer ]; };
|
||||||
|
wg1 = { peers = [ serverPeer ]; autostart = false; };
|
||||||
|
wg2 = { peers = [ serverLocalOnlyPeer ]; autostart = false; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
anemone = {
|
||||||
|
publicKey = "px5+JNdAmqBvUC++DhiJrUBRAr+BYP6iYVt4sbhPTWY=";
|
||||||
|
allowedIPs = [ "10.100.0.4/32" "${gcSecrets.wireguard.ipv6Subnet}:4" "fd0d::4" ];
|
||||||
|
interfaces = {
|
||||||
|
wg0 = { peers = [ server6OnlyPeer ]; };
|
||||||
|
wg1 = { peers = [ serverPeer ]; autostart = false; };
|
||||||
|
wg2 = { peers = [ serverLocalOnlyPeer ]; autostart = false; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hibiscus = {
|
||||||
|
publicKey = "vQ5a2KMrwi7RCRsD0yvog+n35vQYFuvwiPn+W4lbRBw=";
|
||||||
|
allowedIPs = [ "10.100.0.5/32" "${gcSecrets.wireguard.ipv6Subnet}:5" "fd0d::5" ];
|
||||||
|
interfaces = {
|
||||||
|
wg0 = { peers = [ server6OnlyPeer ]; };
|
||||||
|
wg1 = { peers = [ serverPeer ]; autostart = false; };
|
||||||
|
wg2 = { peers = [ serverLocalOnlyPeer ]; autostart = false; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hazel = {
|
||||||
|
publicKey = "0zruTndObzHo+b1rbOuTsxCU97epygZycxXS/lgUHUc=";
|
||||||
|
allowedIPs = [ "10.100.0.21/32" "${gcSecrets.wireguard.ipv6Subnet}:21" "fd0d::21" ];
|
||||||
|
interfaces = {
|
||||||
|
wg0 = {
|
||||||
|
dns = [ "::1" "127.0.0.1" ];
|
||||||
|
peers = [ serverLocalOnlyPeer ];
|
||||||
};
|
};
|
||||||
strawberry = {
|
|
||||||
publicKey = "Fkcp/VSN4Dkhly8V4hskF4lnDviA7VZHCnWf7OliFCg=";
|
|
||||||
allowedIPs = [ "10.100.0.4/32" ];
|
|
||||||
};
|
};
|
||||||
maple = {
|
|
||||||
publicKey = "kPw8hpANygfz83Oi/l+iCVYalV2zfs7fhkccjoGG2Do=";
|
|
||||||
allowedIPs = [ "10.100.0.5/32" ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
clientPeers = builtins.attrValues clients;
|
clientPeers = builtins.map (client: builtins.removeAttrs client [ "interfaces" ]) (builtins.attrValues clients);
|
||||||
serverPeer = {
|
serverPeerWith = ips: {
|
||||||
publicKey = "3ugIk2tQZXjAH9/95s63ld2WNUHQrd4Mz5jzbln6oj0=";
|
publicKey = "3ugIk2tQZXjAH9/95s63ld2WNUHQrd4Mz5jzbln6oj0=";
|
||||||
allowedIPs = [ "0.0.0.0/0" ];
|
allowedIPs = ips;
|
||||||
endpoint = "${serverIp}:${toString port}";
|
endpoint = "${serverIp}:${toString port}";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
};
|
};
|
||||||
|
serverPeer = serverPeerWith [ "0.0.0.0/0" "::/0" ];
|
||||||
|
server6OnlyPeer = serverPeerWith [ "10.100.0.0/24" "::/0" ];
|
||||||
|
serverLocalOnlyPeer = serverPeerWith [ "10.100.0.0/24" "fd0d::/16" ];
|
||||||
|
|
||||||
serverConfig = {
|
serverConfig = {
|
||||||
nat = {
|
nat = {
|
||||||
|
|
@ -79,7 +86,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
wireguard.interfaces.wg0 = {
|
wireguard.interfaces.wg0 = {
|
||||||
ips = [ "10.100.0.1/24" ];
|
ips = [ "10.100.0.1/24" "${gcSecrets.wireguard.ipv6Subnet}:1" "fd0d::1" ];
|
||||||
listenPort = port;
|
listenPort = port;
|
||||||
|
|
||||||
postSetup = ''
|
postSetup = ''
|
||||||
|
|
@ -97,33 +104,24 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
clientConfig = {
|
clientConfig = {
|
||||||
wireguard.interfaces.wg0 =
|
wg-quick.interfaces =
|
||||||
let
|
let
|
||||||
client = clients."${config.networking.hostName}";
|
client = clients."${config.networking.hostName}";
|
||||||
routes = routeBypass."${config.networking.hostName}";
|
in
|
||||||
mapRoutes = type: lib.concatMapStringsSep "\n" (r: "${pkgs.iproute2}/bin/ip route ${type} ${r} via ${routes.gateway} dev ${routes.interface}") routes.routes;
|
builtins.mapAttrs (interface: conf: {
|
||||||
in {
|
address = client.allowedIPs;
|
||||||
ips = client.allowedIPs;
|
dns = [ "fd0d::1" "10.100.0.1" ];
|
||||||
listenPort = port;
|
|
||||||
|
|
||||||
postSetup = ''
|
|
||||||
${mapRoutes "add"}
|
|
||||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${serverInterface} -j MASQUERADE
|
|
||||||
'';
|
|
||||||
|
|
||||||
postShutdown = ''
|
|
||||||
${mapRoutes "del"}
|
|
||||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${serverInterface} -j MASQUERADE
|
|
||||||
'';
|
|
||||||
|
|
||||||
privateKeyFile = config.age.secrets."wg_${config.networking.hostName}".path;
|
privateKeyFile = config.age.secrets."wg_${config.networking.hostName}".path;
|
||||||
peers = [ serverPeer ];
|
} // conf) client.interfaces;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
boot.kernel.sysctl = lib.mkIf (config.networking.hostName == serverName) ({
|
||||||
|
"net.ipv6.conf.all.forwarding" = true;
|
||||||
|
"net.ipv6.conf.default.forwarding" = true;
|
||||||
|
});
|
||||||
networking =
|
networking =
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
(lib.mkIf (config.networking.hostName == serverName) serverConfig)
|
(lib.mkIf (config.networking.hostName == serverName) serverConfig)
|
||||||
(lib.mkIf (builtins.hasAttr config.networking.hostName clients) clientConfig)
|
(lib.mkIf (config.networking.hostName != serverName) clientConfig)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
# Depends on eww
|
|
||||||
{ config, pkgs, ... }: {
|
|
||||||
xsession.windowManager.bspwm = {
|
|
||||||
enable = true;
|
|
||||||
monitors = { "DP-1" = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "0"]; };
|
|
||||||
settings = {
|
|
||||||
window_gap = 10;
|
|
||||||
border_width = 0;
|
|
||||||
split_ratio = 0.5;
|
|
||||||
top_padding = 0;
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
${pkgs.feh}/bin/feh --no-fehbg --bg-fill ~/Pictures/Wallpapers/current
|
|
||||||
|
|
||||||
${pkgs.procps}/bin/pkill -SIGINT eww
|
|
||||||
${pkgs.eww}/bin/eww open linebar
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
75
modules/user/catppuccin.nix
Normal file
75
modules/user/catppuccin.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
{ config, inputs, lib, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.catppuccin.homeManagerModules.catppuccin
|
||||||
|
];
|
||||||
|
|
||||||
|
options.catppuccin.colors = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
default = (builtins.fromJSON (builtins.readFile "${inputs.catppuccin-palette}/palette.json"))."${config.catppuccin.flavor}".colors;
|
||||||
|
};
|
||||||
|
options.catppuccin.hexcolors = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
default = builtins.mapAttrs (name: value: value.hex) config.catppuccin.colors;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
catppuccin = {
|
||||||
|
accent = lib.mkDefault "pink";
|
||||||
|
flavor = lib.mkDefault "mocha";
|
||||||
|
kitty.enable = true;
|
||||||
|
gtk.enable = true;
|
||||||
|
hyprlock.enable = true;
|
||||||
|
nvim.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
specialisation = {
|
||||||
|
light.configuration.catppuccin.flavor = "latte";
|
||||||
|
dark.configuration.catppuccin.flavor = "mocha";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [(pkgs.writeShellScriptBin "theme" ''
|
||||||
|
last_path="$HOME/.local/state/last-theme"
|
||||||
|
target="$1"
|
||||||
|
if [ "$target" == "get_last" ]; then
|
||||||
|
if [ ! -e "$last_path" ]; then
|
||||||
|
echo "no last theme found; assuming dark" >&2
|
||||||
|
target="dark"
|
||||||
|
else
|
||||||
|
target=$(cat "$last_path" | tr -d "\n")
|
||||||
|
fi
|
||||||
|
echo "$target"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if [ "$target" == "restore" ]; then
|
||||||
|
echo "restoring theme"
|
||||||
|
if [ ! -e "$last_path" ]; then
|
||||||
|
echo "no last theme found; assuming dark" >&2
|
||||||
|
target="dark"
|
||||||
|
else
|
||||||
|
target=$(cat "$last_path" | tr -d "\n")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "$target" != "dark" ] && [ "$target" != "light" ]; then
|
||||||
|
echo "invalid theme, valid values: [dark, light, restore]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
current="$HOME/.local/state/home-manager/gcroots/current-home/"
|
||||||
|
cached="$HOME/.local/state/last-parent-specialisation"
|
||||||
|
if [ -d "$current/specialisation" ]; then
|
||||||
|
if [ -d "$cached" ]; then
|
||||||
|
rm -f "$cached"
|
||||||
|
fi
|
||||||
|
ln -sf "$(readlink -f $current)" "$cached"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$cached/specialisation" ]; then
|
||||||
|
echo "no specialisations found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
"$cached/specialisation/$target/activate"
|
||||||
|
|
||||||
|
echo "$target" > "$last_path"
|
||||||
|
'')];
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/user/comma.nix
Normal file
7
modules/user/comma.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ inputs, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.nix-index-database.homeModules.default
|
||||||
|
];
|
||||||
|
programs.nix-index.enable = true;
|
||||||
|
programs.nix-index-database.comma.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.git.extraConfig.core.excludesFile = ".envrc";
|
programs.git.settings.core.excludesFile = ".envrc";
|
||||||
# We can't use .source since hm manages this file too
|
# We can't use .source since hm manages this file too
|
||||||
xdg.configFile."direnv/direnvrc".text = builtins.readFile ../../res/direnvrc;
|
xdg.configFile."direnv/direnvrc".text = builtins.readFile ../../res/direnvrc;
|
||||||
home.activation = {
|
home.activation = {
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue