Compare commits
85 Commits
27862a3be1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| b5aa64e74a | |||
| d7c765b80e | |||
| b3b8ffd90f | |||
| c3614c5397 | |||
|
|
7e3186e632 | ||
| 2db673093e | |||
| f894f65024 | |||
| 7468ccd09f | |||
| c2f8b28b5d | |||
| ff52a9c024 | |||
|
|
2389cfb703 | ||
|
|
ab408f5eed | ||
|
|
37b5d11b75 | ||
| d83ecd19dd | |||
| 92ab3eb6d6 | |||
| 92b6f03db1 | |||
| fa6bd362c8 | |||
| ccf9e6b624 | |||
|
|
eaf515e178 | ||
|
|
2a73531342 | ||
| 637433e101 | |||
| 7173c81006 | |||
| b5c6c781c1 | |||
| fd20c8ff2d | |||
| 5c1dec5c27 | |||
| a194e1fb90 | |||
| 9a20f7846e | |||
| 5affde5fff | |||
| cf7bbca114 | |||
| 85aab484cf | |||
| 07926b877a | |||
| 01be899805 | |||
| 2d2ade7d45 | |||
| ef4344b962 | |||
| 4c1d0b06dc | |||
| daa7881658 | |||
| 5573970ac0 | |||
| 4278477cc9 | |||
| e60f7c9fc4 | |||
| 05d545d7a6 | |||
| 6bbcfe69e1 | |||
| 1158a8b5ef | |||
| 1704340180 | |||
| 8dd68054fa | |||
| 9bb345c061 | |||
| 228ac9214c | |||
| 84a5a8090d | |||
| de7dbd91b4 | |||
| 56ffeaf5a0 | |||
| 13b08066ce | |||
| 681ddb80f7 | |||
| 76b2b92840 | |||
| a6183e7d41 | |||
| 9f14c96f86 | |||
| f787cca05c | |||
| c2e99ff5ae | |||
| 263851f911 | |||
| bcab85f731 | |||
| 29b632a961 | |||
|
|
d068ea8c2d | ||
|
|
54443f177b | ||
|
|
c1470a7312 | ||
|
|
0032d65e18 | ||
|
|
45300e7a21 | ||
|
|
009dc9373f | ||
|
|
273066c74a | ||
|
|
d4b315e90e | ||
|
|
527a17a169 | ||
|
|
77b1bf9249 | ||
|
|
1e58fbe5f4 | ||
|
|
f06e325736 | ||
|
|
8ee5550803 | ||
|
|
db23c300fe | ||
|
|
24954e5367 | ||
|
|
1a80911b3f | ||
|
|
ddf12655bc | ||
|
|
e5207d10ab | ||
|
|
2f4c425c50 | ||
|
|
70d25c574d | ||
|
|
9a9cc67b1c | ||
|
|
0266841088 | ||
| 7bdb31c46c | |||
|
|
1128f9a0dc | ||
|
|
a0eb21abf3 | ||
|
|
65a47967da |
15
.gitea/workflows/analysis.yaml
Normal file
15
.gitea/workflows/analysis.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analysis:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
name: perform flake analysis
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
- name: Check Nix flake inputs
|
||||||
|
uses: http://github.com/DeterminateSystems/flake-checker-action@main
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build Nix targets
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: http://github.com/cachix/install-nix-action@v18
|
|
||||||
- uses: http://github.com/cachix/cachix-action@v12
|
|
||||||
with:
|
|
||||||
name: statix
|
|
||||||
- name: Check Nix flake inputs
|
|
||||||
uses: http://github.com/DeterminateSystems/flake-checker-action@main
|
|
||||||
43
.gitea/workflows/deploy.yaml
Normal file
43
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
container:
|
||||||
|
volumes:
|
||||||
|
- /nix/store:/var/nix/hosted-store
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
name: build hive configuration
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: setup
|
||||||
|
env:
|
||||||
|
CACHE_PRIVKEY: ${{secrets.CACHE_PRIVKEY}}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p /var/secrets/
|
||||||
|
echo "$CACHE_PRIVKEY" >> /var/secrets/cache_privkey
|
||||||
|
mkdir -p /etc/nix
|
||||||
|
cp ./scripts/upload-to-cache.sh /etc/nix/
|
||||||
|
chmod +x /etc/nix/upload-to-cache.sh
|
||||||
|
- uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
extra-trusted-public-keys = localhost:TiRpr2LzamX/MCKBUmFlZ8inWz94QWGL88fMEHg9Kgc=
|
||||||
|
extra-substituters = "local?store=/var/nix/hosted-store&priority=20"
|
||||||
|
secret-key-files = /var/secrets/cache_privkey
|
||||||
|
post-build-hook = /etc/nix/upload-to-cache.sh
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: shimataro/ssh-key-action@v2
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- uses: http://github.com/cachix/cachix-action@v16
|
||||||
|
with:
|
||||||
|
name: colmena
|
||||||
|
- run: nix run .#colmena apply
|
||||||
192
flake.lock
generated
192
flake.lock
generated
@@ -8,11 +8,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754433428,
|
"lastModified": 1762618334,
|
||||||
"narHash": "sha256-NA/FT2hVhKDftbHSwVnoRTFhes62+7dxZbxj5Gxvghs=",
|
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "9edb1787864c4f59ae5074ad498b6272b3ec308d",
|
"rev": "fcdea223397448d35d9b31f798479227e80183f6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -30,11 +30,11 @@
|
|||||||
"stable": "stable"
|
"stable": "stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755272288,
|
"lastModified": 1762034856,
|
||||||
"narHash": "sha256-ypTPb2eKcOBbOoyvPV0j4ZOXs4kayo73/2KI456QnE0=",
|
"narHash": "sha256-QVey3iP3UEoiFVXgypyjTvCrsIlA4ecx6Acaz5C8/PQ=",
|
||||||
"owner": "zhaofengli",
|
"owner": "zhaofengli",
|
||||||
"repo": "colmena",
|
"repo": "colmena",
|
||||||
"rev": "5bf4ce6a24adba74a5184f4a9bef01d545a09473",
|
"rev": "349b035a5027f23d88eeb3bc41085d7ee29f18ed",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -49,11 +49,11 @@
|
|||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760309387,
|
"lastModified": 1769470446,
|
||||||
"narHash": "sha256-yCjkJuQbt6DjdS1XJL2uwyLu1AcmDvlyMGojBq8Ua38=",
|
"narHash": "sha256-nze0VZ70K2kbDxjE+BBZLD7juOmnZqNYdOhl9aUNGWg=",
|
||||||
"owner": "9001",
|
"owner": "9001",
|
||||||
"repo": "copyparty",
|
"repo": "copyparty",
|
||||||
"rev": "d099e5e84e191d67a7bffa574ab39b6d0d4f6adf",
|
"rev": "2f57228fd4e62f8cd8e12cb80a3531dc2d4d170a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -91,11 +91,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758287904,
|
"lastModified": 1769524058,
|
||||||
"narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=",
|
"narHash": "sha256-zygdD6X1PcVNR2PsyK4ptzrVEiAdbMqLos7utrMDEWE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "67ff9807dd148e704baadbd4fd783b54282ca627",
|
"rev": "71a3fc97d80881e91710fe721f1158d3b96ae14d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -233,11 +233,11 @@
|
|||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760234253,
|
"lastModified": 1769567010,
|
||||||
"narHash": "sha256-ElkSuw4RxtyOY3mThezUpOM8c0fTNWlL0we/deGiTZU=",
|
"narHash": "sha256-R4ESxjCluQQlSIPw4NaRYVvEtvsnKGRwmACcXU1at6g=",
|
||||||
"owner": "Infinidoge",
|
"owner": "Infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "a82ae8f5079a134d33337cf211d7617f1268b301",
|
"rev": "1c9c95fea177a4f8430c34dc1f974394e72bca1f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -311,16 +311,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759994382,
|
"lastModified": 1769318308,
|
||||||
"narHash": "sha256-wSK+3UkalDZRVHGCRikZ//CyZUJWDJkBDTQX1+G77Ow=",
|
"narHash": "sha256-Mjx6p96Pkefks3+aA+72lu1xVehb6mv2yTUUqmSet6Q=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5da4a26309e796daa7ffca72df93dbe53b8164c7",
|
"rev": "1cd347bf3355fce6c64ab37d3967b4a2cb4b878c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-25.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -340,36 +340,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
"nixpkgs_7": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1744440957,
|
|
||||||
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-24.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_8": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1744463964,
|
|
||||||
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
|
|
||||||
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
|
|
||||||
"revCount": 782401,
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.782401%2Brev-2631b0b7abcea6e640ce31cd78ea58910d31e650/01962c8a-63c4-7abd-a3df-63a17b548cc7/source.tar.gz"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_9": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736549401,
|
"lastModified": 1736549401,
|
||||||
"narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=",
|
"narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=",
|
||||||
@@ -385,56 +355,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pyproject-build-systems": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"striped-back",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"pyproject-nix": [
|
|
||||||
"striped-back",
|
|
||||||
"pyproject-nix"
|
|
||||||
],
|
|
||||||
"uv2nix": [
|
|
||||||
"striped-back",
|
|
||||||
"uv2nix"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1744599653,
|
|
||||||
"narHash": "sha256-nysSwVVjG4hKoOjhjvE6U5lIKA8sEr1d1QzEfZsannU=",
|
|
||||||
"owner": "pyproject-nix",
|
|
||||||
"repo": "build-system-pkgs",
|
|
||||||
"rev": "7dba6dbc73120e15b558754c26024f6c93015dd7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "pyproject-nix",
|
|
||||||
"repo": "build-system-pkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pyproject-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"striped-back",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1743438845,
|
|
||||||
"narHash": "sha256-1GSaoubGtvsLRwoYwHjeKYq40tLwvuFFVhGrG8J9Oek=",
|
|
||||||
"owner": "pyproject-nix",
|
|
||||||
"repo": "pyproject.nix",
|
|
||||||
"rev": "8063ec98edc459571d042a640b1c5e334ecfca1e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "pyproject-nix",
|
|
||||||
"repo": "pyproject.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
@@ -444,8 +364,6 @@
|
|||||||
"nix-minecraft": "nix-minecraft",
|
"nix-minecraft": "nix-minecraft",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"shoblog-front": "shoblog-front",
|
"shoblog-front": "shoblog-front",
|
||||||
"striped-back": "striped-back",
|
|
||||||
"striped-front": "striped-front",
|
|
||||||
"testing-grounds": "testing-grounds",
|
"testing-grounds": "testing-grounds",
|
||||||
"unstable": "unstable"
|
"unstable": "unstable"
|
||||||
}
|
}
|
||||||
@@ -484,45 +402,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"striped-back": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs_7",
|
|
||||||
"pyproject-build-systems": "pyproject-build-systems",
|
|
||||||
"pyproject-nix": "pyproject-nix",
|
|
||||||
"uv2nix": "uv2nix"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1748719386,
|
|
||||||
"narHash": "sha256-nyXHemXPEKnqIVIYIorSbt64zRwMvijyGQGCW3zUUkc=",
|
|
||||||
"ref": "refs/heads/master",
|
|
||||||
"rev": "bdfd6f1f4aac6a00ae4509f14b3a63c84d169edf",
|
|
||||||
"revCount": 8,
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@gitlab.com/striped1/striped-back"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@gitlab.com/striped1/striped-back"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"striped-front": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs_8"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1748718798,
|
|
||||||
"narHash": "sha256-KUxbrUjRfuKjkJZLzKr11WEXLfPs38YrW/CMG6XbnbY=",
|
|
||||||
"ref": "refs/heads/master",
|
|
||||||
"rev": "a553f10147dad9e41829f67b247817a079f6f671",
|
|
||||||
"revCount": 11,
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@gitlab.com/striped1/striped-front"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@gitlab.com/striped1/striped-front"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
@@ -555,7 +434,7 @@
|
|||||||
},
|
},
|
||||||
"testing-grounds": {
|
"testing-grounds": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_9"
|
"nixpkgs": "nixpkgs_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755527993,
|
"lastModified": 1755527993,
|
||||||
@@ -573,11 +452,11 @@
|
|||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760038930,
|
"lastModified": 1769461804,
|
||||||
"narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=",
|
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3",
|
"rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -586,31 +465,6 @@
|
|||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"uv2nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"striped-back",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"pyproject-nix": [
|
|
||||||
"striped-back",
|
|
||||||
"pyproject-nix"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1744797880,
|
|
||||||
"narHash": "sha256-gt9JBkYjZAEvGwCG7RMAAAr0j2RsaRmOMj/vV0briXk=",
|
|
||||||
"owner": "pyproject-nix",
|
|
||||||
"repo": "uv2nix",
|
|
||||||
"rev": "3583e037163491ecd833f1d5d3eedf3869543c5d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "pyproject-nix",
|
|
||||||
"repo": "uv2nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
170
flake.nix
170
flake.nix
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# Flake inputs
|
# Flake inputs
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
colmena.url = "github:zhaofengli/colmena";
|
colmena.url = "github:zhaofengli/colmena";
|
||||||
|
|
||||||
@@ -18,32 +18,31 @@
|
|||||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||||
testing-grounds.url = "gitlab:shobu13/testing-grounds";
|
testing-grounds.url = "gitlab:shobu13/testing-grounds";
|
||||||
shoblog-front.url = "gitlab:shobu13/shoblog";
|
shoblog-front.url = "gitlab:shobu13/shoblog";
|
||||||
striped-front.url = "git+ssh://git@gitlab.com/striped1/striped-front";
|
|
||||||
striped-back.url = "git+ssh://git@gitlab.com/striped1/striped-back";
|
|
||||||
|
|
||||||
copyparty.url = "github:9001/copyparty";
|
copyparty.url = "github:9001/copyparty";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Flake outputs
|
# Flake outputs
|
||||||
outputs = inputs@{
|
outputs =
|
||||||
self,
|
inputs@{
|
||||||
|
self,
|
||||||
nixpkgs,
|
|
||||||
unstable,
|
|
||||||
colmena,
|
|
||||||
|
|
||||||
agenix,
|
nixpkgs,
|
||||||
|
unstable,
|
||||||
|
colmena,
|
||||||
|
|
||||||
disko,
|
agenix,
|
||||||
|
|
||||||
shoblog-front,
|
disko,
|
||||||
striped-front,
|
|
||||||
striped-back,
|
shoblog-front,
|
||||||
nix-minecraft,
|
# striped-front,
|
||||||
testing-grounds,
|
# striped-back,
|
||||||
copyparty,
|
nix-minecraft,
|
||||||
...
|
testing-grounds,
|
||||||
|
copyparty,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# The systems supported for this flake
|
# The systems supported for this flake
|
||||||
@@ -52,16 +51,41 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Helper to provide system-specific attributes
|
# Helper to provide system-specific attributes
|
||||||
forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f {
|
forEachSupportedSystem =
|
||||||
pkgs = import inputs.nixpkgs { inherit system; };
|
f:
|
||||||
});
|
inputs.nixpkgs.lib.genAttrs supportedSystems (
|
||||||
|
system:
|
||||||
|
f {
|
||||||
|
pkgs = import inputs.nixpkgs { inherit system; };
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
nixosConfigurations = {
|
||||||
|
sin = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
disko.nixosModules.disko
|
||||||
|
agenix.nixosModules.default
|
||||||
|
./hosts/sin/configuration.nix
|
||||||
|
./hosts/sin/hardware-configuration.nix
|
||||||
|
]
|
||||||
|
++ [
|
||||||
|
# modules
|
||||||
|
./modules/gitea/sin
|
||||||
|
];
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
colmenaHive = colmena.lib.makeHive {
|
colmenaHive = colmena.lib.makeHive {
|
||||||
meta = {
|
meta = {
|
||||||
nixpkgs = import nixpkgs {
|
nixpkgs = import nixpkgs {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
overlays = [];
|
overlays = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
@@ -69,45 +93,75 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
thea = {name, nodes, pkgs, ...}: {
|
thea =
|
||||||
imports = [
|
{
|
||||||
./hosts/${name}/configuration.nix
|
name,
|
||||||
./hosts/${name}/hardware-configuration.nix
|
nodes,
|
||||||
] ++ [
|
pkgs,
|
||||||
# modules
|
...
|
||||||
./modules/gitea/${name}
|
}:
|
||||||
];
|
{
|
||||||
|
imports = [
|
||||||
|
agenix.nixosModules.default
|
||||||
|
./hosts/${name}/configuration.nix
|
||||||
|
./hosts/${name}/hardware-configuration.nix
|
||||||
|
]
|
||||||
|
++ [
|
||||||
|
# modules
|
||||||
|
./modules/gitea/${name}
|
||||||
|
];
|
||||||
|
|
||||||
deployment.targetHost = "thea.homelab.local";
|
deployment.targetHost = "192.168.1.12";
|
||||||
};
|
};
|
||||||
|
|
||||||
sin = {name, nodes, pkgs, ...}: {
|
sin =
|
||||||
imports = [
|
{
|
||||||
disko.nixosModules.disko
|
name,
|
||||||
agenix.nixosModules.default
|
nodes,
|
||||||
./hosts/${name}/configuration.nix
|
pkgs,
|
||||||
./hosts/${name}/hardware-configuration.nix
|
...
|
||||||
] ++ [
|
}:
|
||||||
# modules
|
{
|
||||||
./modules/gitea/${name}
|
imports = [
|
||||||
];
|
disko.nixosModules.disko
|
||||||
|
agenix.nixosModules.default
|
||||||
|
./hosts/${name}/configuration.nix
|
||||||
|
./hosts/${name}/hardware-configuration.nix
|
||||||
|
]
|
||||||
|
++ [
|
||||||
|
# modules
|
||||||
|
./modules/gitea/${name}
|
||||||
|
];
|
||||||
|
|
||||||
deployment.targetHost = "sin.homelab.local";
|
deployment.targetHost = "192.168.1.14";
|
||||||
};
|
deployment.allowLocalDeployment = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
devShells = forEachSupportedSystem (
|
||||||
default = pkgs.mkShell {
|
{ pkgs }:
|
||||||
# The Nix packages provided in the environment
|
{
|
||||||
# Add any you need here
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [ colmena.packages.${pkgs.system}.colmena ];
|
# The Nix packages provided in the environment
|
||||||
|
# Add any you need here
|
||||||
|
packages = with pkgs; [
|
||||||
|
colmena.packages.${pkgs.stdenv.system}.colmena
|
||||||
|
agenix.packages.${pkgs.stdenv.system}.agenix
|
||||||
|
];
|
||||||
|
|
||||||
# Set any environment variables for your dev shell
|
# Set any environment variables for your dev shell
|
||||||
env = { };
|
env = { };
|
||||||
|
|
||||||
# Add any shell logic you want executed any time the environment is activated
|
# Add any shell logic you want executed any time the environment is activated
|
||||||
shellHook = ''
|
shellHook = '''';
|
||||||
'';
|
};
|
||||||
};
|
}
|
||||||
});
|
);
|
||||||
|
|
||||||
|
packages = forEachSupportedSystem (
|
||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
inherit (colmena.packages."${pkgs.system}") colmena;
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
modulesPath,
|
modulesPath,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
./secrets.nix
|
./secrets.nix
|
||||||
./coredns
|
./coredns
|
||||||
./copyparty.nix
|
./copyparty.nix
|
||||||
|
./trilium.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "usb_storage" ];
|
boot.initrd.kernelModules = [ "usb_storage" ];
|
||||||
@@ -29,9 +31,11 @@
|
|||||||
networking = {
|
networking = {
|
||||||
hostName = "sin";
|
hostName = "sin";
|
||||||
|
|
||||||
nameservers = [ "10.0.0.4" ];
|
networkmanager.enable = true;
|
||||||
|
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
# nameservers = [ "10.0.0.4" ];
|
||||||
|
|
||||||
|
# dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
|
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
@@ -40,6 +44,8 @@
|
|||||||
|
|
||||||
3000 # gitea
|
3000 # gitea
|
||||||
|
|
||||||
|
config.services.trilium-server.port
|
||||||
|
|
||||||
53
|
53
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -49,36 +55,45 @@
|
|||||||
|
|
||||||
time.timeZone = "Europe/Paris";
|
time.timeZone = "Europe/Paris";
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
zimablade = {
|
zimablade = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos" ];
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
shobu = {
|
shobu = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos" ];
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
# change this to your ssh key
|
# change this to your ssh key
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = map lib.lowPrio [
|
environment.systemPackages =
|
||||||
pkgs.curl
|
map lib.lowPrio [
|
||||||
pkgs.gitMinimal
|
pkgs.curl
|
||||||
] ++ (with pkgs; [
|
pkgs.gitMinimal
|
||||||
helix
|
]
|
||||||
httpie
|
++ (with pkgs; [
|
||||||
btop
|
helix
|
||||||
tmux
|
httpie
|
||||||
# firefox
|
btop
|
||||||
]);
|
tmux
|
||||||
|
# firefox
|
||||||
|
]);
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
openssh = {
|
openssh = {
|
||||||
|
|||||||
@@ -1,29 +1,76 @@
|
|||||||
{inputs, pkgs, ...}: {
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [ inputs.copyparty.nixosModules.default ];
|
imports = [ inputs.copyparty.nixosModules.default ];
|
||||||
nixpkgs.overlays = [ inputs.copyparty.overlays.default ];
|
nixpkgs.overlays = [ inputs.copyparty.overlays.default ];
|
||||||
environment.systemPackages = [ pkgs.copyparty ];
|
environment.systemPackages = [ pkgs.copyparty ];
|
||||||
services.copyparty = {
|
services.copyparty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
group = "starr";
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
p = [ 8086 ];
|
p = [ 8086 ];
|
||||||
e2dsa = true;
|
e2dsa = true;
|
||||||
e2ts = true;
|
e2ts = true;
|
||||||
z = true;
|
z = true;
|
||||||
qr = true;
|
qr = true;
|
||||||
|
xff-hdr = "X-Real-IP";
|
||||||
xff-src = "lan";
|
xff-src = "lan";
|
||||||
|
rproxy = 1;
|
||||||
http-only = true;
|
http-only = true;
|
||||||
og = true;
|
og = true;
|
||||||
shr = "/shares";
|
shr = "/shares";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
accounts = {
|
||||||
|
serhao = {
|
||||||
|
passwordFile = config.age.secrets.copyparty-serhao.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
volumes = {
|
volumes = {
|
||||||
"/media" = {
|
"/movies" = {
|
||||||
path = "/mnt/mediacenter/media";
|
path = "/mnt/mediacenter/media/movies";
|
||||||
access = {
|
access = {
|
||||||
r = "*";
|
r = "*";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"/shows" = {
|
||||||
|
path = "/mnt/mediacenter/media/shows";
|
||||||
|
access = {
|
||||||
|
r = "*";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"/musics" = {
|
||||||
|
path = "/mnt/mediacenter/media/musics";
|
||||||
|
access = {
|
||||||
|
r = "*";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"/mediacenter" = {
|
||||||
|
path = "/mnt/mediacenter/media";
|
||||||
|
access = {
|
||||||
|
rw = ["serhao"];
|
||||||
|
};
|
||||||
|
flags = {
|
||||||
|
e2d = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"/data" = {
|
||||||
|
path = "/mnt/data";
|
||||||
|
access = {
|
||||||
|
rwd = ["serhao"];
|
||||||
|
};
|
||||||
|
flags = {
|
||||||
|
e2d = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
services.coredns = {
|
services.coredns = {
|
||||||
enable = true;
|
enable = false;
|
||||||
config = ''
|
config = ''
|
||||||
homelab.local {
|
homelab.local {
|
||||||
log
|
log
|
||||||
@@ -8,7 +9,7 @@
|
|||||||
cache
|
cache
|
||||||
file ${./db.homelab.local}
|
file ${./db.homelab.local}
|
||||||
}
|
}
|
||||||
|
|
||||||
. {
|
. {
|
||||||
forward . 8.8.8.8
|
forward . 8.8.8.8
|
||||||
log
|
log
|
||||||
|
|||||||
@@ -14,7 +14,15 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Flake outputs
|
# Flake outputs
|
||||||
outputs = inputs@{ self, nixpkgs, disko, unstable, agenix, ... }:
|
outputs =
|
||||||
|
inputs@{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
disko,
|
||||||
|
unstable,
|
||||||
|
agenix,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
# The systems supported for this flake
|
# The systems supported for this flake
|
||||||
supportedSystems = [
|
supportedSystems = [
|
||||||
@@ -22,9 +30,14 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Helper to provide system-specific attributes
|
# Helper to provide system-specific attributes
|
||||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
forEachSupportedSystem =
|
||||||
pkgs = import nixpkgs { inherit system; };
|
f:
|
||||||
});
|
nixpkgs.lib.genAttrs supportedSystems (
|
||||||
|
system:
|
||||||
|
f {
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations.zimablade = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.zimablade = nixpkgs.lib.nixosSystem {
|
||||||
@@ -40,15 +53,21 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
devShells = forEachSupportedSystem (
|
||||||
default = pkgs.mkShell {
|
{ pkgs }:
|
||||||
# The Nix packages provided in the environment
|
{
|
||||||
# Add any you need here
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [ pkgs.disko nixos-anywhere ];
|
# The Nix packages provided in the environment
|
||||||
|
# Add any you need here
|
||||||
|
packages = with pkgs; [
|
||||||
|
pkgs.disko
|
||||||
|
nixos-anywhere
|
||||||
|
];
|
||||||
|
|
||||||
# Add any shell logic you want executed any time the environment is activated
|
# Add any shell logic you want executed any time the environment is activated
|
||||||
shellHook = '''';
|
shellHook = '''';
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
services.glances = {
|
services.glances = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|||||||
@@ -1,26 +1,39 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
{
|
lib,
|
||||||
imports =
|
pkgs,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
modulesPath,
|
||||||
];
|
...
|
||||||
|
}:
|
||||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
{
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
imports = [
|
||||||
boot.extraModulePackages = [ ];
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
boot.initrd.availableKernelModules = [
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
"ahci"
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
"xhci_pci"
|
||||||
networking.useDHCP = lib.mkDefault true;
|
"usb_storage"
|
||||||
# networking.interfaces.enp0s21f0u3u4.useDHCP = lib.mkDefault true;
|
"usbhid"
|
||||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
"sd_mod"
|
||||||
|
"sdhci_pci"
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
];
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
boot.initrd.kernelModules = [ ];
|
||||||
}
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp0s21f0u3u4.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
|
{ inputs, pkgs, ... }:
|
||||||
{inputs, pkgs, ...}: {
|
{
|
||||||
services.homepage-dashboard = {
|
services.homepage-dashboard = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
allowedHosts = "dashboard.shobu.fr";
|
allowedHosts = "dashboard.shobu.fr";
|
||||||
settings = {
|
settings = {
|
||||||
title = "Shobu's homelab dashboard";
|
title = "Shobu's homelab dashboard";
|
||||||
description = "a dashboard of free and wesome bullshit";
|
description = "a dashboard of free and awesome bullshit";
|
||||||
startUrl = "https://dashboard.shobu.fr";
|
startUrl = "https://dashboard.shobu.fr";
|
||||||
base = "https://dashboard.shobu.fr";
|
base = "https://dashboard.shobu.fr";
|
||||||
headerStyle = "boxed";
|
headerStyle = "boxed";
|
||||||
@@ -14,9 +14,9 @@
|
|||||||
providers = {
|
providers = {
|
||||||
"finnhub" = "cuvq5e9r01qub8tv03g0cuvq5e9r01qub8tv03gg";
|
"finnhub" = "cuvq5e9r01qub8tv03g0cuvq5e9r01qub8tv03gg";
|
||||||
};
|
};
|
||||||
|
|
||||||
layout = [
|
layout = [
|
||||||
{"resources" = {};}
|
{ "resources" = { }; }
|
||||||
{
|
{
|
||||||
"about me stuff" = {
|
"about me stuff" = {
|
||||||
tab = "Public";
|
tab = "Public";
|
||||||
@@ -38,13 +38,13 @@
|
|||||||
header = false;
|
header = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
widgets = [
|
widgets = [
|
||||||
{
|
{
|
||||||
greeting = {
|
greeting = {
|
||||||
text = "Welcome on my services and links dashboard, make yourself home.";
|
text = "Welcome on my services and links dashboard, make yourself home. :3";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
icon = "https://bddtrans.shobu.fr/favicon.ico";
|
icon = "https://bddtrans.shobu.fr/favicon.ico";
|
||||||
href = "https://bddtrans.shobu.fr";
|
href = "https://bddtrans.shobu.fr";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
services = [
|
services = [
|
||||||
{
|
{
|
||||||
"gayming" = [
|
"gayming" = [
|
||||||
@@ -117,6 +117,15 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
"reclamation" = {
|
||||||
|
description = "bring back your world to life";
|
||||||
|
widget = {
|
||||||
|
type = "minecraft";
|
||||||
|
url = "udp://minecraft.shobu.fr:25665";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -146,7 +155,7 @@
|
|||||||
type = "jellyseerr";
|
type = "jellyseerr";
|
||||||
url = "https://jellyseerr.shobu.fr";
|
url = "https://jellyseerr.shobu.fr";
|
||||||
key = "MTczNzkyNzMxMzgwODk4N2FlZWJkLTQ0N2QtNGU0MS1iOWE1LTJmZmE3OTI4ZGQ5OQ==";
|
key = "MTczNzkyNzMxMzgwODk4N2FlZWJkLTQ0N2QtNGU0MS1iOWE1LTJmZmE3OTI4ZGQ5OQ==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{pkgs, inputs, ...}: let
|
{ pkgs, inputs, ... }:
|
||||||
|
let
|
||||||
unstable = import inputs.unstable { system = pkgs.system; };
|
unstable = import inputs.unstable { system = pkgs.system; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||||
};
|
};
|
||||||
@@ -9,10 +11,9 @@ in {
|
|||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
intel-media-driver
|
intel-media-driver
|
||||||
intel-vaapi-driver
|
intel-vaapi-driver
|
||||||
vaapiVdpau
|
libva-vdpau-driver
|
||||||
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
|
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
|
||||||
vpl-gpu-rt # QSV on 11th gen or newer
|
vpl-gpu-rt # QSV on 11th gen or newer
|
||||||
intel-media-sdk # QSV up to 11th gen
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -27,37 +28,80 @@ in {
|
|||||||
extraGroups = [ "jellyfin" ];
|
extraGroups = [ "jellyfin" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.sonarr.extraGroups = ["jellyfin" "radarr" "transmission" "starr"];
|
users.users.sonarr.extraGroups = [
|
||||||
users.users.radarr.extraGroups = ["jellyfin" "sonarr" "transmission" "starr"];
|
"jellyfin"
|
||||||
users.users.bazarr.extraGroups = ["jellyfin" "sonarr" "transmission" "starr" "radarr"];
|
"radarr"
|
||||||
users.users.lidarr.extraGroups = ["jellyfin" "starr" "transmission"];
|
"transmission"
|
||||||
|
"starr"
|
||||||
users.users.shobu.extraGroups = [ "jellyfin" "starr" "transmission" "radarr" "sonarr" ];
|
];
|
||||||
|
users.users.radarr.extraGroups = [
|
||||||
|
"jellyfin"
|
||||||
|
"sonarr"
|
||||||
|
"transmission"
|
||||||
|
"starr"
|
||||||
|
];
|
||||||
|
users.users.bazarr.extraGroups = [
|
||||||
|
"jellyfin"
|
||||||
|
"sonarr"
|
||||||
|
"transmission"
|
||||||
|
"starr"
|
||||||
|
"radarr"
|
||||||
|
];
|
||||||
|
users.users.lidarr.extraGroups = [
|
||||||
|
"jellyfin"
|
||||||
|
"starr"
|
||||||
|
"transmission"
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.whisparr.extraGroups = [
|
||||||
|
"jellyfin"
|
||||||
|
"starr"
|
||||||
|
"transmission"
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.shobu.extraGroups = [
|
||||||
|
"jellyfin"
|
||||||
|
"starr"
|
||||||
|
"transmission"
|
||||||
|
"radarr"
|
||||||
|
"sonarr"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
users.groups = {
|
users.groups = {
|
||||||
starr = {};
|
starr = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
sonarr = {
|
sonarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
group = "starr";
|
group = "starr";
|
||||||
|
settings = {
|
||||||
|
authentication.AuthenticationMethod = "external";
|
||||||
|
authentication.AuthenticationType = "enabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
radarr = {
|
radarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
group = "starr";
|
group = "starr";
|
||||||
|
settings = {
|
||||||
|
authentication.AuthenticationMethod = "external";
|
||||||
|
authentication.AuthenticationType = "enabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
prowlarr = {
|
prowlarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
authentication.AuthenticationMethod = "external";
|
||||||
|
authentication.AuthenticationType = "enabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
bazarr = {
|
bazarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -66,9 +110,20 @@ in {
|
|||||||
lidarr = {
|
lidarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
package = unstable.lidarr;
|
settings = {
|
||||||
|
authentication.AuthenticationMethod = "external";
|
||||||
|
authentication.AuthenticationType = "enabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
whisparr = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
authentication.AuthenticationMethod = "external";
|
||||||
|
authentication.AuthenticationType = "enabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
jellyseerr = {
|
jellyseerr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
# Devices will be mounted and formatted in alphabetical order, and btrfs can only mount raids
|
# Devices will be mounted and formatted in alphabetical order, and btrfs can only mount raids
|
||||||
@@ -6,7 +7,7 @@
|
|||||||
# and the actual btrfs raid on the second disk, and the name of these entries matters!
|
# and the actual btrfs raid on the second disk, and the name of these entries matters!
|
||||||
system = {
|
system = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/mmcblk0";
|
device = "/dev/sdb";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
@@ -41,6 +42,10 @@
|
|||||||
"/root" = {
|
"/root" = {
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
};
|
};
|
||||||
|
"/nix" = {
|
||||||
|
mountpoint = "/nix";
|
||||||
|
mountOptions = [ "compress=zstd:3" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -49,39 +54,17 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
data1 = {
|
data = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/sda";
|
device = "/dev/sda";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
crypt_p1 = {
|
crypt_p = {
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "luks";
|
||||||
name = "p_data1"; # device-mapper name when decrypted
|
name = "p_data";
|
||||||
# Remove settings.keyFile if you want to use interactive password entry
|
|
||||||
settings = {
|
|
||||||
allowDiscards = true;
|
|
||||||
keyFile = "/dev/disk/by-uuid/2021-07-11-12-33-27-00";
|
|
||||||
keyFileSize = 4096;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
data2 = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/sdb";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
crypt_p2 = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "luks";
|
|
||||||
name = "p_data2";
|
|
||||||
# Remove settings.keyFile if you want to use interactive password entry
|
# Remove settings.keyFile if you want to use interactive password entry
|
||||||
settings = {
|
settings = {
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
@@ -90,19 +73,11 @@
|
|||||||
};
|
};
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = [
|
|
||||||
"-d raid0"
|
|
||||||
"/dev/mapper/p_data1" # Use decrypted mapped device, same name as defined in disk1
|
|
||||||
];
|
|
||||||
subvolumes = {
|
subvolumes = {
|
||||||
"/" = {
|
"/" = {
|
||||||
mountpoint = "/mnt/fs";
|
mountpoint = "/mnt/fs";
|
||||||
mountOptions = [ "compress=zstd:3" ];
|
mountOptions = [ "compress=zstd:3" ];
|
||||||
};
|
};
|
||||||
"/nix" = {
|
|
||||||
mountpoint = "/nix";
|
|
||||||
mountOptions = [ "compress=zstd:3" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"/data" = {
|
"/data" = {
|
||||||
mountpoint = "/mnt/data";
|
mountpoint = "/mnt/data";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{pkgs, config, ...}:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
users.users = {
|
users.users = {
|
||||||
postgres = {
|
postgres = {
|
||||||
@@ -26,7 +26,10 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 8008 8448 ];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
8008
|
||||||
|
8448
|
||||||
|
];
|
||||||
|
|
||||||
services.matrix-synapse = {
|
services.matrix-synapse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -39,13 +42,16 @@
|
|||||||
listeners = [
|
listeners = [
|
||||||
{
|
{
|
||||||
port = 8008;
|
port = 8008;
|
||||||
bind_addresses = ["0.0.0.0"];
|
bind_addresses = [ "0.0.0.0" ];
|
||||||
type = "http";
|
type = "http";
|
||||||
tls = false;
|
tls = false;
|
||||||
x_forwarded = true;
|
x_forwarded = true;
|
||||||
resources = [
|
resources = [
|
||||||
{
|
{
|
||||||
names = [ "client" "federation" ];
|
names = [
|
||||||
|
"client"
|
||||||
|
"federation"
|
||||||
|
];
|
||||||
compress = true;
|
compress = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
21
hosts/sin/ollama.nix
Normal file
21
hosts/sin/ollama.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{ inputs, ... }:
|
||||||
|
{
|
||||||
|
# virtualisation.docker = {
|
||||||
|
# enable = true;
|
||||||
|
# storageDriver = "btrfs";
|
||||||
|
# };
|
||||||
|
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
loadModels = [ ];
|
||||||
|
acceleration = "cuda";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.open-webui = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
host = "0.0.0.0";
|
||||||
|
port = 8050;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
# captcha = {
|
# captcha = {
|
||||||
# file = ./secrets/matrix_captcha.age;
|
# file = ./secrets/matrix_captcha.age;
|
||||||
@@ -9,5 +10,22 @@
|
|||||||
file = ./secrets/airvpn_wireguard_key_env.age;
|
file = ./secrets/airvpn_wireguard_key_env.age;
|
||||||
mode = "700";
|
mode = "700";
|
||||||
};
|
};
|
||||||
|
copyparty-serhao = {
|
||||||
|
file = ./secrets/copyparty-serhao.age;
|
||||||
|
mode = "700";
|
||||||
|
owner = "copyparty";
|
||||||
|
};
|
||||||
|
authelia-jwt = {
|
||||||
|
file = ./secrets/authelia-jwt.age;
|
||||||
|
mode = "700";
|
||||||
|
};
|
||||||
|
authelia-encryption = {
|
||||||
|
file = ./secrets/authelia-encryption.age;
|
||||||
|
mode = "700";
|
||||||
|
};
|
||||||
|
authelia-session = {
|
||||||
|
file = ./secrets/authelia-session.age;
|
||||||
|
mode = "700";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
7
hosts/sin/secrets/authelia-encryption.age
Normal file
7
hosts/sin/secrets/authelia-encryption.age
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 /uqj4A L95rgX9APIgoMvkplZIYgMQDhKBOsPGOw/maymMhiks
|
||||||
|
LNfa/YBCd84iknAMk4wbQps4KMXCvrhPp2d9KkhJWHI
|
||||||
|
-> ssh-ed25519 NoSl6Q G/y6DUFTyV6Jy6KHo8yc+xxtu3aJtTOF3Ldmxq3FmyE
|
||||||
|
FOExj321S/VIPQ/qdvZBcJ930HI/GsjDVjJp9WMSXLA
|
||||||
|
--- iIpq/CWng+4+kQbvJQb/qgejr/eza94wCkegEJ2dvno
|
||||||
|
ÿNôU*1=DÔOˆ£W6]_â©Kà=©*ÊÞký¦_ù˜ÝøÉ‡™tmË•ãw°
|
||||||
7
hosts/sin/secrets/authelia-jwt.age
Normal file
7
hosts/sin/secrets/authelia-jwt.age
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 /uqj4A i6SPCzjkGrPMjhC9NQDdYTk3fzXoD4OSQdhS1togN0A
|
||||||
|
Lqus8sROz1O4EepauPwC4RX/qH+SnDiL2H5iZGtAhXo
|
||||||
|
-> ssh-ed25519 NoSl6Q LxV4a5HiB6qfPjbba75dkVVECzaqrMjksMXHh53JbGQ
|
||||||
|
x4POzurz+J2mymT81M+cu69Iv/MeiYt+JvaRteinm5Q
|
||||||
|
--- OFqooyZ2HPBxP756PqpgJAyVOTkqhJ0LhEQsLJBZUtE
|
||||||
|
—>»&Ȇw·\D„Au{õz{CˆÁ~á$‘_ˆ9»¢ZZ<5A>U^„ÎÊL!(lnпÂó‰Üv{fdº 1Ýßl¢,<2C>|<7C>Ü.¤çH«¤³êVaù¥ÍÓˆ™PêwOo3ž
|
||||||
7
hosts/sin/secrets/authelia-session.age
Normal file
7
hosts/sin/secrets/authelia-session.age
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 /uqj4A eff535EaT7gEZOacWx9raBJMdd4PPd9+y6Y3eOt1wBI
|
||||||
|
5P4aefjWVJ4L11ff+Cg8j3gQ58I+agDPUMFWiCaL/sQ
|
||||||
|
-> ssh-ed25519 NoSl6Q 3+EZtaiiZQk7JK6zCNo/nUSSRAJzf8nal2X1sFkYmxo
|
||||||
|
f5gzpiOtCbYdiV7vOxfZvJPRmRruTbHg6T8g0r5JRgc
|
||||||
|
--- BBL3wE2eSmHVI4tlhq+5fy84cauw6P6G69nFXuObLKE
|
||||||
|
êéæí @[¡SÓcñ‘<C3B1>SyÉŠ‡<; í†<C3AD>e±Ë茟<C592><C5B8>§(°Æž1\Yj›È¯½½4åõ Ýȹ.3>Â[Èq¢Jh8í·šÕVt”øX[Ì~[(#^‘_5€§<E282AC>
|
||||||
7
hosts/sin/secrets/copyparty-serhao.age
Normal file
7
hosts/sin/secrets/copyparty-serhao.age
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 BoEq8A O6x9n4kvpqLucX7NuNeD2SsMmvT5n6aVYwo4nQt21H8
|
||||||
|
R+4g1QuXtxovyv5Mav+mAhgGjOcGQW4q17FSBtzXZQo
|
||||||
|
-> ssh-ed25519 NoSl6Q iKPipXfIGWxUobXF/9CSRhc/zKgmKKWWZhDTDgX0jWA
|
||||||
|
LB4TFCdbEG0VToYzTWdFedd0duF5PKlCnpBs4nBbLAQ
|
||||||
|
--- D7VE3Mwgx9ehk5rNuHm62S5ggQBm9wJodZa61jLEVsY
|
||||||
|
8ÔîÐÄÒë`S«šéT¯Fª9&(½Ú²Á‡¸=~Ïášoù».X޶ž7ðV&'Øøå ÒÔ¸‹%ã î
|
||||||
@@ -1,9 +1,15 @@
|
|||||||
{config, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
users.users."starr" = {
|
users.users."starr" = {
|
||||||
extraGroups = [ "transmission" ];
|
extraGroups = [ "transmission" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.transmission = {
|
users.users.transmission = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "transmission";
|
group = "transmission";
|
||||||
@@ -14,56 +20,76 @@
|
|||||||
transmission.gid = 989;
|
transmission.gid = 989;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.oci-containers = let
|
# systemd.services = {
|
||||||
peerport = "63369";
|
# docker-transmission-network = {
|
||||||
in {
|
# after = [
|
||||||
backend = "docker";
|
# "network.target"
|
||||||
containers = {
|
# "docker-gluetun.service"
|
||||||
gluetun = {
|
# "docker-transmission.service"
|
||||||
image = "qmcgaw/gluetun";
|
# ];
|
||||||
environment = {
|
# wantedBy = [
|
||||||
VPN_SERVICE_PROVIDER = "airvpn";
|
# "docker-gluetun.service"
|
||||||
VPN_TYPE = "wireguard";
|
# "docker-transmission.service"
|
||||||
# WIREGUARD_PRIVATE_KEY = "from agenix";
|
# ];
|
||||||
# WIREGUARD_PRESHARED_KEY = "from agenix";
|
# serviceConfig = {
|
||||||
# WIREGUARD_ADDRESSES = "from agenix";
|
# ExecStart = "${lib.getExe pkgs.docker} network create docker-transmission; exit 0";
|
||||||
# SERVER_COUNTRIES = "from agenix";
|
# };
|
||||||
FIREWALL_VPN_INPUT_PORTS = "13277,${peerport}";
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
virtualisation.oci-containers =
|
||||||
|
let
|
||||||
|
peerport = "63369";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
backend = "docker";
|
||||||
|
containers = {
|
||||||
|
gluetun = {
|
||||||
|
image = "qmcgaw/gluetun";
|
||||||
|
environment = {
|
||||||
|
VPN_SERVICE_PROVIDER = "airvpn";
|
||||||
|
VPN_TYPE = "wireguard";
|
||||||
|
# WIREGUARD_PRIVATE_KEY = "from agenix";
|
||||||
|
# WIREGUARD_PRESHARED_KEY = "from agenix";
|
||||||
|
# WIREGUARD_ADDRESSES = "from agenix";
|
||||||
|
# SERVER_COUNTRIES = "from agenix";
|
||||||
|
FIREWALL_VPN_INPUT_PORTS = "13277,${peerport}";
|
||||||
|
};
|
||||||
|
environmentFiles = [
|
||||||
|
config.age.secrets.airvpn-params.path
|
||||||
|
];
|
||||||
|
extraOptions = [
|
||||||
|
"--cap-add=NET_ADMIN"
|
||||||
|
"--device=/dev/net/tun"
|
||||||
|
# "--network=docker-transmission"
|
||||||
|
];
|
||||||
|
ports = [
|
||||||
|
"13277:13277"
|
||||||
|
"9091:13277"
|
||||||
|
"${peerport}:${peerport}"
|
||||||
|
"${peerport}:${peerport}/udp"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
environmentFiles = [
|
transmission = {
|
||||||
config.age.secrets.airvpn-params.path
|
image = "docker.io/linuxserver/transmission:latest";
|
||||||
];
|
volumes = [
|
||||||
extraOptions = [
|
"/etc/transmission:/config"
|
||||||
"--cap-add=NET_ADMIN"
|
"/etc/localtime:/etc/localtime:ro"
|
||||||
"--device=/dev/net/tun"
|
"/mnt/mediacenter/torrents:/mnt/mediacenter/torrents"
|
||||||
];
|
"/mnt/data/transmission_downloads:/mnt/data/transmission_downloads"
|
||||||
ports = [
|
];
|
||||||
"13277:13277"
|
dependsOn = [
|
||||||
"9091:13277"
|
"gluetun"
|
||||||
"${peerport}:${peerport}"
|
];
|
||||||
"${peerport}:${peerport}/udp"
|
extraOptions = [
|
||||||
];
|
"--network=container:gluetun"
|
||||||
};
|
];
|
||||||
transmission = {
|
environment = {
|
||||||
image = "docker.io/linuxserver/transmission:latest";
|
PUID = toString config.users.users.transmission.uid;
|
||||||
volumes = [
|
GUID = toString config.users.groups.transmission.gid;
|
||||||
"/etc/transmission:/config"
|
PEERPORT = peerport;
|
||||||
"/etc/localtime:/etc/localtime:ro"
|
};
|
||||||
"/mnt/mediacenter/torrents:/mnt/mediacenter/torrents"
|
|
||||||
"/mnt/data/transmission_downloads:/mnt/data/transmission_downloads"
|
|
||||||
];
|
|
||||||
dependsOn = [
|
|
||||||
"gluetun"
|
|
||||||
];
|
|
||||||
extraOptions = [
|
|
||||||
"--network=container:gluetun"
|
|
||||||
];
|
|
||||||
environment = {
|
|
||||||
PUID = toString config.users.users.transmission.uid;
|
|
||||||
GUID = toString config.users.groups.transmission.gid;
|
|
||||||
PEERPORT = peerport;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
9
hosts/sin/trilium.nix
Normal file
9
hosts/sin/trilium.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
services.trilium-server = {
|
||||||
|
enable = true;
|
||||||
|
port = 12783;
|
||||||
|
host = "0.0.0.0";
|
||||||
|
noAuthentication = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
126
hosts/thea/authelia.nix
Normal file
126
hosts/thea/authelia.nix
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.services.authelia.instances.main;
|
||||||
|
dataDir = "/var/lib/authelia-${cfg.name}";
|
||||||
|
authelia-snippets = pkgs.callPackage ./lib/autheliaSnippets.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.authelia.instances = {
|
||||||
|
main = {
|
||||||
|
enable = true;
|
||||||
|
secrets = {
|
||||||
|
jwtSecretFile = config.age.secrets.authelia-jwt.path;
|
||||||
|
storageEncryptionKeyFile = config.age.secrets.authelia-encryption.path;
|
||||||
|
sessionSecretFile = config.age.secrets.authelia-session.path;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
theme = "light";
|
||||||
|
log.level = "debug";
|
||||||
|
|
||||||
|
authentication_backend = {
|
||||||
|
file = {
|
||||||
|
path = dataDir + "/users.yml";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
storage = {
|
||||||
|
local = {
|
||||||
|
path = dataDir + "/db.sqlite3";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
session = {
|
||||||
|
cookies = [
|
||||||
|
{
|
||||||
|
domain = "shobu.fr";
|
||||||
|
authelia_url = "https://auth.shobu.fr";
|
||||||
|
default_redirection_url = "https://shobu.fr";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
notifier = {
|
||||||
|
filesystem = {
|
||||||
|
filename = "${dataDir}/notification.txt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
access_control = {
|
||||||
|
default_policy = "deny";
|
||||||
|
rules = [
|
||||||
|
# {
|
||||||
|
# domain = "radarr.shobu.fr";
|
||||||
|
# policy = "bypass";
|
||||||
|
# }
|
||||||
|
{
|
||||||
|
domain = "*.shobu.fr";
|
||||||
|
policy = "one_factor";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
server = {
|
||||||
|
endpoints = {
|
||||||
|
authz = {
|
||||||
|
auth-request = {
|
||||||
|
implementation = "AuthRequest";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# systemd.tmpfiles.rules = lib.mkIf cfg.enable [
|
||||||
|
# "d '${dataDir}' 0700 ${cfg.user} ${cfg.group} - -"
|
||||||
|
# ];
|
||||||
|
|
||||||
|
age.secrets = {
|
||||||
|
authelia-jwt = {
|
||||||
|
owner = cfg.user;
|
||||||
|
file = ./secrets/authelia-jwt.age;
|
||||||
|
mode = "700";
|
||||||
|
};
|
||||||
|
authelia-encryption = {
|
||||||
|
owner = cfg.user;
|
||||||
|
file = ./secrets/authelia-encryption.age;
|
||||||
|
mode = "700";
|
||||||
|
};
|
||||||
|
authelia-session = {
|
||||||
|
owner = cfg.user;
|
||||||
|
file = ./secrets/authelia-session.age;
|
||||||
|
mode = "700";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
recommendedTlsSettings = true;
|
||||||
|
|
||||||
|
virtualHosts."auth.shobu.fr" =
|
||||||
|
let
|
||||||
|
upstream = "http://thea:9091";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = upstream;
|
||||||
|
extraConfig = ''
|
||||||
|
error_log /var/log/nginx/debug_authelia.log debug;
|
||||||
|
include ${authelia-snippets.proxy};
|
||||||
|
set $upstream ${upstream};
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
locations."/api/verify" = {
|
||||||
|
proxyPass = upstream;
|
||||||
|
};
|
||||||
|
locations."/api/authz" = {
|
||||||
|
proxyPass = upstream;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -2,18 +2,26 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
{ config, lib, pkgs, nodes, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
nodes,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
sin-address = "192.168.1.14";
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
./nginx.nix
|
||||||
./nginx.nix
|
# ./cybercoffee
|
||||||
# ./striped
|
./ollama.nix
|
||||||
# ./cybercoffee
|
./minecraft.nix
|
||||||
./ollama.nix
|
./secrets
|
||||||
./minecraft.nix
|
./authelia.nix
|
||||||
# ./shares.nix
|
];
|
||||||
];
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
@@ -22,29 +30,43 @@
|
|||||||
networking = {
|
networking = {
|
||||||
hostName = "thea"; # Define your hostname.
|
hostName = "thea"; # Define your hostname.
|
||||||
|
|
||||||
nameservers = [ "10.0.0.4" ];
|
networkmanager.enable = true;
|
||||||
|
|
||||||
|
# nameservers = [ "10.0.0.4" ];
|
||||||
|
|
||||||
|
# dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
|
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
|
||||||
|
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [ nodes.sin.config.services.gitea.settings.server.SSH_PORT ];
|
allowedTCPPorts = [
|
||||||
|
nodes.sin.config.services.gitea.settings.server.SSH_PORT
|
||||||
|
]
|
||||||
|
++ [
|
||||||
|
# minecraft ad hoc server ports
|
||||||
|
25665
|
||||||
|
25675
|
||||||
|
];
|
||||||
};
|
};
|
||||||
nat = {
|
nat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
internalInterfaces = [ "enp1s0" ];
|
internalInterfaces = [ "enp1s0" ];
|
||||||
externalInterface = "enp1s0";
|
externalInterface = "enp1s0";
|
||||||
forwardPorts = [ {
|
forwardPorts = [
|
||||||
# TODO refactor this in the gitea/n100 module
|
{
|
||||||
sourcePort = nodes.sin.config.services.gitea.settings.server.SSH_PORT;
|
# TODO refactor this in the gitea/n100 module
|
||||||
proto = "tcp";
|
sourcePort = nodes.sin.config.services.gitea.settings.server.SSH_PORT;
|
||||||
destination = "10.0.0.4:22";
|
proto = "tcp";
|
||||||
} ];
|
destination = "${sin-address}:22";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
time.timeZone = "Europe/Paris";
|
time.timeZone = "Europe/Paris";
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
users.users.n100 = {
|
users.users.n100 = {
|
||||||
@@ -53,16 +75,19 @@
|
|||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
];
|
];
|
||||||
|
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos" ];
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos" ];
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsu+4S+BHmypQTq2IR9y+ihvbF7sXbBznKtIjVAeHJ1 shobu@nixos"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
lunarvim
|
lunarvim
|
||||||
wget
|
wget
|
||||||
httpie
|
httpie
|
||||||
tmux
|
tmux
|
||||||
@@ -108,4 +133,3 @@
|
|||||||
system.stateVersion = "24.11"; # Did you read the comment?
|
system.stateVersion = "24.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{pkgs, ...}:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./halflife.nix
|
./halflife.nix
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
|
{ ... }: { }
|
||||||
{...}: {}
|
|
||||||
|
|||||||
@@ -12,23 +12,24 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Flake outputs
|
# Flake outputs
|
||||||
outputs = inputs@{
|
outputs =
|
||||||
self,
|
inputs@{
|
||||||
nixpkgs,
|
self,
|
||||||
nix-minecraft,
|
nixpkgs,
|
||||||
shoblog-front,
|
nix-minecraft,
|
||||||
striped-front,
|
shoblog-front,
|
||||||
striped-back,
|
striped-front,
|
||||||
...
|
striped-back,
|
||||||
}:
|
...
|
||||||
{
|
}:
|
||||||
nixosConfigurations.n100 = nixpkgs.lib.nixosSystem {
|
{
|
||||||
system = "x86_64-linux";
|
nixosConfigurations.n100 = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
system = "x86_64-linux";
|
||||||
modules = [
|
specialArgs = { inherit inputs; };
|
||||||
./configuration.nix
|
modules = [
|
||||||
./hardware-configuration.nix
|
./configuration.nix
|
||||||
];
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,47 +1,61 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "sdhci_pci" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"sd_mod"
|
||||||
|
"sdhci_pci"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
|
device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=root" ];
|
options = [ "subvol=root" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" = {
|
||||||
{ device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
|
device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=nix" ];
|
options = [ "subvol=nix" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" = {
|
||||||
{ device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
|
device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=home" ];
|
options = [ "subvol=home" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/swap" =
|
fileSystems."/swap" = {
|
||||||
{ device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
|
device = "/dev/disk/by-uuid/09c733e4-b0df-4416-977b-50d9feb225fc";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=swap" ];
|
options = [ "subvol=swap" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/D1B9-8019";
|
device = "/dev/disk/by-uuid/D1B9-8019";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = [
|
||||||
};
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
|||||||
81
hosts/thea/lib/autheliaSnippets.nix
Normal file
81
hosts/thea/lib/autheliaSnippets.nix
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
proxy = pkgs.writeText "proxy.conf" ''
|
||||||
|
## Headers
|
||||||
|
# proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-URI $request_uri;
|
||||||
|
proxy_set_header X-Forwarded-Ssl on;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
'';
|
||||||
|
authelia-location = pkgs.writeText "authelia-location.conf" ''
|
||||||
|
set $upstream_authelia http://192.168.1.12:9091/api/authz/auth-request;
|
||||||
|
|
||||||
|
## Virtual endpoint created by nginx to forward auth requests.
|
||||||
|
location /internal/authelia/authz {
|
||||||
|
## Essential Proxy Configuration
|
||||||
|
internal;
|
||||||
|
proxy_pass $upstream_authelia;
|
||||||
|
|
||||||
|
## Headers
|
||||||
|
## The headers starting with X-* are required.
|
||||||
|
proxy_set_header X-Original-Method $request_method;
|
||||||
|
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header Content-Length "";
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
|
||||||
|
## Basic Proxy Configuration
|
||||||
|
proxy_pass_request_body off;
|
||||||
|
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; # Timeout if the real server is dead
|
||||||
|
proxy_redirect http:// $scheme://;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_cache_bypass $cookie_session;
|
||||||
|
proxy_no_cache $cookie_session;
|
||||||
|
proxy_buffers 4 32k;
|
||||||
|
client_body_buffer_size 128k;
|
||||||
|
|
||||||
|
## Advanced Proxy Configuration
|
||||||
|
send_timeout 5m;
|
||||||
|
proxy_read_timeout 240;
|
||||||
|
proxy_send_timeout 240;
|
||||||
|
proxy_connect_timeout 240;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
authelia-authrequest = pkgs.writeText "authelia-authrequest.conf" ''
|
||||||
|
## Send a subrequest to Authelia to verify if the user is authenticated and has permission to access the resource.
|
||||||
|
auth_request /internal/authelia/authz;
|
||||||
|
|
||||||
|
## Save the upstream metadata response headers from Authelia to variables.
|
||||||
|
auth_request_set $user $upstream_http_remote_user;
|
||||||
|
auth_request_set $groups $upstream_http_remote_groups;
|
||||||
|
auth_request_set $name $upstream_http_remote_name;
|
||||||
|
auth_request_set $email $upstream_http_remote_email;
|
||||||
|
|
||||||
|
## Inject the metadata response headers from the variables into the request made to the backend.
|
||||||
|
proxy_set_header Remote-User $user;
|
||||||
|
proxy_set_header Remote-Groups $groups;
|
||||||
|
proxy_set_header Remote-Email $email;
|
||||||
|
proxy_set_header Remote-Name $name;
|
||||||
|
|
||||||
|
## Configure the redirection when the authz failure occurs. Lines starting with 'Modern Method' and 'Legacy Method'
|
||||||
|
## should be commented / uncommented as pairs. The modern method uses the session cookies configuration's authelia_url
|
||||||
|
## value to determine the redirection URL here. It's much simpler and compatible with the mutli-cookie domain easily.
|
||||||
|
|
||||||
|
## Modern Method: Set the $redirection_url to the Location header of the response to the Authz endpoint.
|
||||||
|
auth_request_set $redirection_url $upstream_http_location;
|
||||||
|
|
||||||
|
## Modern Method: When there is a 401 response code from the authz endpoint redirect to the $redirection_url.
|
||||||
|
error_page 401 =302 $redirection_url;
|
||||||
|
|
||||||
|
## Legacy Method: Set $target_url to the original requested URL.
|
||||||
|
## This requires http_set_misc module, replace 'set_escape_uri' with 'set' if you don't have this module.
|
||||||
|
# set_escape_uri $target_url $scheme://$http_host$request_uri;
|
||||||
|
|
||||||
|
## Legacy Method: When there is a 401 response code from the authz endpoint redirect to the portal with the 'rd'
|
||||||
|
## URL parameter set to $target_url. This requires users update 'auth.shobu.fr/' with their external authelia URL.
|
||||||
|
# error_page 401 =302 https://auth.shobu.fr/?rd=$target_url;
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -1,9 +1,18 @@
|
|||||||
{pkgs, inputs, ...}:
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
modpack = pkgs.fetchPackwizModpack {
|
modpack = pkgs.fetchPackwizModpack {
|
||||||
url = "file:///${inputs.testing-grounds.modpack}/pack.toml";
|
url = "file:///${inputs.testing-grounds.modpack}/pack.toml";
|
||||||
packHash = "sha256-+taYj4uroLNxM4Nia3n+5P1Y/g6dzE6Iq13TsZgk4mU=";
|
packHash = "sha256-+taYj4uroLNxM4Nia3n+5P1Y/g6dzE6Iq13TsZgk4mU=";
|
||||||
};
|
};
|
||||||
|
gregpack = pkgs.fetchPackwizModpack {
|
||||||
|
url = "https://raw.githubusercontent.com/GregTechCEu/GregTech-Modern-Community-Pack/refs/heads/main/pack.toml";
|
||||||
|
packHash = "sha256-SE86gP15H/Aug6vTLmMxHuxF2/+iLmCI/wQlON1xasM=";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ];
|
imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ];
|
||||||
@@ -30,4 +39,10 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
25865 # autismcraft
|
||||||
|
25665 # reclamation
|
||||||
|
25675 # reclamation
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,122 +1,203 @@
|
|||||||
{inputs, ...}:
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
striped-front = inputs.striped-front;
|
# striped-front = inputs.striped-front;
|
||||||
in {
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 8448 ];
|
sin-address = "192.168.1.14";
|
||||||
|
authelia-snippets = pkgs.callPackage ./lib/autheliaSnippets.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
8448
|
||||||
|
];
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
|
||||||
virtualHosts =
|
typesHashMaxSize = 512;
|
||||||
let
|
mapHashMaxSize = 512;
|
||||||
mkStarr = host: port: {
|
|
||||||
"${host}" = {
|
virtualHosts =
|
||||||
enableACME = true;
|
let
|
||||||
forceSSL = true;
|
mkVHost = host: port: {
|
||||||
|
"${host}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${sin-address}:${port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mkStarr = host: port: {
|
||||||
|
"${host}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://10.0.0.4:${port}";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_ssl_server_name on;
|
include ${authelia-snippets.authelia-location};
|
||||||
proxy_read_timeout 4800s;
|
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
(
|
|
||||||
mkStarr "jellyfin.shobu.fr" "8096"
|
|
||||||
// mkStarr "radarr.shobu.fr" "7878"
|
|
||||||
// mkStarr "sonarr.shobu.fr" "8989"
|
|
||||||
// mkStarr "prowlarr.shobu.fr" "9696"
|
|
||||||
// mkStarr "bazarr.shobu.fr" "6767"
|
|
||||||
// mkStarr "jellyseerr.shobu.fr" "5055"
|
|
||||||
// mkStarr "fileshelter.shobu.fr" "5091"
|
|
||||||
// mkStarr "lidarr.shobu.fr" "8686"
|
|
||||||
// mkStarr "transmission.shobu.fr" "9091"
|
|
||||||
// mkStarr "zimablade-admin.shobu.fr" "61208"
|
|
||||||
// {
|
|
||||||
"shobu.fr" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
|
|
||||||
root = "${inputs.shoblog-front.packages.x86_64-linux.default}/dist";
|
locations."/api" = {
|
||||||
};
|
proxyPass = "http://${sin-address}:${port}";
|
||||||
"data.shobu.fr" = {
|
proxyWebsockets = true;
|
||||||
enableACME = true;
|
extraConfig = ''
|
||||||
forceSSL = true;
|
proxy_ssl_server_name on;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${sin-address}:${port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
extraConfig = ''
|
||||||
|
include ${authelia-snippets.proxy};
|
||||||
|
include ${authelia-snippets.authelia-authrequest};
|
||||||
|
|
||||||
root = "/mnt/shares/data";
|
proxy_ssl_server_name on;
|
||||||
|
proxy_read_timeout 4800s;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
"bddtrans.shobu.fr" = {
|
withAuthelia =
|
||||||
enableACME = true;
|
vhost: location:
|
||||||
forceSSL = true;
|
(builtins.mapAttrs (
|
||||||
|
name: value:
|
||||||
|
(lib.recursiveUpdate value {
|
||||||
|
extraConfig = (if value ? extraConfig then value.extraConfig else "") + ''
|
||||||
|
include ${authelia-snippets.authelia-location};
|
||||||
|
'';
|
||||||
|
locations."${location}".extraConfig =
|
||||||
|
(
|
||||||
|
if value.locations."${location}" ? extraConfig then
|
||||||
|
value.locations."${location}".extraConfig
|
||||||
|
else
|
||||||
|
""
|
||||||
|
)
|
||||||
|
+ ''
|
||||||
|
include ${authelia-snippets.proxy};
|
||||||
|
include ${authelia-snippets.authelia-authrequest};
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
) vhost);
|
||||||
|
withWebsockets =
|
||||||
|
vhost: location:
|
||||||
|
(builtins.mapAttrs (
|
||||||
|
name: value:
|
||||||
|
(lib.recursiveUpdate value {
|
||||||
|
locations."${location}".proxyWebsockets = true;
|
||||||
|
})
|
||||||
|
) vhost);
|
||||||
|
in
|
||||||
|
(
|
||||||
|
(withWebsockets (mkVHost "jellyfin.shobu.fr" "8096") "/")
|
||||||
|
// mkStarr "radarr.shobu.fr" "7878"
|
||||||
|
// mkStarr "sonarr.shobu.fr" "8989"
|
||||||
|
// mkStarr "prowlarr.shobu.fr" "9696"
|
||||||
|
// mkStarr "bazarr.shobu.fr" "6767"
|
||||||
|
// mkStarr "lidarr.shobu.fr" "8686"
|
||||||
|
// mkStarr "whisparr.shobu.fr" "6969"
|
||||||
|
// mkVHost "jellyseerr.shobu.fr" "5055"
|
||||||
|
// mkVHost "transmission.shobu.fr" "9091"
|
||||||
|
// mkVHost "zimablade-admin.shobu.fr" "61208"
|
||||||
|
// (withWebsockets (withAuthelia (mkVHost "trilium.shobu.fr" "12783") "/") "/")
|
||||||
|
// {
|
||||||
|
"shobu.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
root = "${inputs.shoblog-front.packages.x86_64-linux.default}/dist";
|
||||||
|
};
|
||||||
|
"data.shobu.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
root = "/mnt/shares/data";
|
||||||
|
};
|
||||||
|
"bddtrans.shobu.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${sin-address}:8001";
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_ssl_server_name on;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"bddtrans-api.shobu.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${sin-address}:8000";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_ssl_server_name on;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# "striped.shobu.fr" = {
|
||||||
|
# enableACME = true;
|
||||||
|
# forceSSL = true;
|
||||||
|
|
||||||
|
# root = "${striped-front.packages.x86_64-linux.default}/dist";
|
||||||
|
# };
|
||||||
|
"dashboard.shobu.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${sin-address}:8082";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"git.shobu.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${sin-address}:3000";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"files.shobu.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://10.0.0.4:8001";
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_ssl_server_name on;
|
# include ${authelia-snippets.authelia-location};
|
||||||
|
# error_log /var/log/nginx/debug_files.log debug;
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
};
|
|
||||||
"bddtrans-api.shobu.fr" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://10.0.0.4:8000";
|
proxyPass = "http://${sin-address}:8086";
|
||||||
proxyWebsockets = true;
|
extraConfig = ''
|
||||||
extraConfig = ''
|
# include ${authelia-snippets.proxy};
|
||||||
proxy_ssl_server_name on;
|
# include ${authelia-snippets.authelia-authrequest};
|
||||||
'';
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
client_max_body_size 100M;
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
# "matrix.shobu.fr" = {
|
||||||
"striped.shobu.fr" = {
|
# forceSSL = true;
|
||||||
enableACME = true;
|
# enableACME = true;
|
||||||
forceSSL = true;
|
# locations."/".extraConfig = ''
|
||||||
|
# return 404;
|
||||||
root = "${striped-front.packages.x86_64-linux.default}/dist";
|
# '';
|
||||||
};
|
# locations."/_matrix".proxyPass = "http://${sin-address}:8008";
|
||||||
"dashboard.shobu.fr" = {
|
# locations."/_synapse/client".proxyPass = "http://${sin-address}:8008";
|
||||||
enableACME = true;
|
# locations."/.well-known/matrix/server".proxyPass = "http://${sin-address}:8008/.well-known/matrix/server";
|
||||||
forceSSL = true;
|
# };
|
||||||
|
}
|
||||||
locations."/" = {
|
);
|
||||||
proxyPass = "http://10.0.0.4:8082";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"git.shobu.fr" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://10.0.0.4:3000";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"files.shobu.fr" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://10.0.0.4:8086";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# "matrix.shobu.fr" = {
|
|
||||||
# forceSSL = true;
|
|
||||||
# enableACME = true;
|
|
||||||
# locations."/".extraConfig = ''
|
|
||||||
# return 404;
|
|
||||||
# '';
|
|
||||||
# locations."/_matrix".proxyPass = "http://10.0.0.4:8008";
|
|
||||||
# locations."/_synapse/client".proxyPass = "http://10.0.0.4:8008";
|
|
||||||
# locations."/.well-known/matrix/server".proxyPass = "http://10.0.0.4:8008/.well-known/matrix/server";
|
|
||||||
# };
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{inputs, ...}: {
|
{ inputs, ... }:
|
||||||
|
{
|
||||||
# virtualisation.docker = {
|
# virtualisation.docker = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# storageDriver = "btrfs";
|
# storageDriver = "btrfs";
|
||||||
|
|||||||
10
hosts/thea/secrets/authelia-encryption.age
Normal file
10
hosts/thea/secrets/authelia-encryption.age
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 /uqj4A 9cZH/SlDpiluz2O3wCxRcBhmt3L5eN24I0HHwiJDWRU
|
||||||
|
VVZaJlB4QzxBPcaN3MjCemjptEbqSUMD8VVtKyGezH8
|
||||||
|
-> ssh-ed25519 70Re8Q ZFEQxmnm+dFKSXcQAc0KxkewCB59J5FyL1Ob/uEEtVg
|
||||||
|
fRdEZpIytxjUeSKPieIzvZaAn5Mikjp28HlZhKwzS7M
|
||||||
|
-> ssh-ed25519 QvCxGg ifsqXBKO0mqE1RuJ44Y7qDJ7lyci8iyz+J1xFgO38jI
|
||||||
|
MkhMTZ+RttBFFMkbIaSCSQiExR1gf4OyFWHXIsx+QYQ
|
||||||
|
--- nnMlLyQjixpBkx+bSU5I364IP3KnZ0qnmMPueBcRHpU
|
||||||
|
ë˜<EFBFBD>6TX—ÕÞÌfÁ““É
|
||||||
|
®?Z7M<37>T<EFBFBD>Å|ÚQf
|
||||||
BIN
hosts/thea/secrets/authelia-jwt.age
Normal file
BIN
hosts/thea/secrets/authelia-jwt.age
Normal file
Binary file not shown.
9
hosts/thea/secrets/authelia-session.age
Normal file
9
hosts/thea/secrets/authelia-session.age
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 /uqj4A yxpGM3pJxfnM/5q9+NzdfG2kBjjNex6bdyUeZEBKjnI
|
||||||
|
UO6ovn2cFeNi6SbcGpfF71/OAyQccyG+l6aZXubUal8
|
||||||
|
-> ssh-ed25519 70Re8Q GW40lmeg6Lj7ntZswT0/hWZFpYBWoV3CMq4pdo+Ncgc
|
||||||
|
oWTYuM/s3G7EKPWPQpHbXo9Tpzgn7YlYVQHYGn4xKS8
|
||||||
|
-> ssh-ed25519 QvCxGg pKLpxtuMIa0xPXoaeb4WeQWVEINRE/j4nrxDB1J9BUI
|
||||||
|
1azpt5MImTiDSF+Ts9EvUCdWMeVG7lErUHSBQfMiip4
|
||||||
|
--- IOOR8Us6zlZhJm0V4X3IlbkHSdtR3GLLxEfa4i+lqv0
|
||||||
|
ó P¬¥rhé"BFãŽÌŸtÌ€ê¤{¾(öB`q“Óø"AµnN_ ™f*ÏŒºvPpj&{)ìŠØ@‹ÃkF«Ú]<Aš*Á<>‡<EFBFBD>´WTm”ƪD‡,Ý1E™”¦³eѨ·O¢š
|
||||||
3
hosts/thea/secrets/default.nix
Normal file
3
hosts/thea/secrets/default.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -1,10 +1,14 @@
|
|||||||
{...}: {
|
{ ... }:
|
||||||
|
let
|
||||||
|
sin-address = "192.168.1.14";
|
||||||
|
in
|
||||||
|
{
|
||||||
boot.supportedFilesystems = [ "fuse.sshfs" ];
|
boot.supportedFilesystems = [ "fuse.sshfs" ];
|
||||||
programs.fuse.userAllowOther = true;
|
programs.fuse.userAllowOther = true;
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/mnt/shares/data" = {
|
"/mnt/shares/data" = {
|
||||||
device = "shobu@10.0.0.4:/mnt/data/";
|
device = "shobu@${sin-address}:/mnt/data/";
|
||||||
fsType = "fuse.sshfs";
|
fsType = "fuse.sshfs";
|
||||||
options = [
|
options = [
|
||||||
"debug"
|
"debug"
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
{inputs, ...}:
|
{ inputs, ... }:
|
||||||
let
|
let
|
||||||
striped-back = inputs.striped-back;
|
striped-back = inputs.striped-back;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
striped-back.nixosModules.default
|
striped-back.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
services.striped-back-api = {
|
services.striped-back-api = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ in {
|
|||||||
socket.enable = true;
|
socket.enable = true;
|
||||||
|
|
||||||
settings.django = {
|
settings.django = {
|
||||||
allowed-hosts = ["striped-api.shobu.fr"];
|
allowed-hosts = [ "striped-api.shobu.fr" ];
|
||||||
debug = true;
|
debug = true;
|
||||||
databases = {
|
databases = {
|
||||||
default = {
|
default = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{striped-back, striped-front, ...}:{
|
{ striped-back, striped-front, ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./back.nix
|
./back.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{lib, ...}: let
|
{ lib, ... }:
|
||||||
|
let
|
||||||
ssh_port = 24658;
|
ssh_port = 24658;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services = {
|
services = {
|
||||||
gitea = {
|
gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -16,7 +18,7 @@ in {
|
|||||||
};
|
};
|
||||||
actions = {
|
actions = {
|
||||||
ENABLED = true;
|
ENABLED = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,10 +1,56 @@
|
|||||||
{nodes, ...}:{
|
{
|
||||||
|
nodes,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
sin-address = "192.168.1.14";
|
||||||
|
unstable = import inputs.unstable { system = pkgs.system; };
|
||||||
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./virtualisation.nix
|
./virtualisation.nix
|
||||||
];
|
];
|
||||||
networking.nat.forwardPorts = [{
|
networking.nat.forwardPorts = [
|
||||||
sourcePort = nodes.sin.config.services.gitea.settings.server.SSH_PORT;
|
{
|
||||||
proto = "tcp";
|
sourcePort = nodes.sin.config.services.gitea.settings.server.SSH_PORT;
|
||||||
destination = "10.0.0.4:22";
|
proto = "tcp";
|
||||||
}];
|
destination = "${sin-address}:22";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
services.gitea-actions-runner.package = unstable.gitea-actions-runner;
|
||||||
|
|
||||||
|
# services.gitea-actions-runner.instances = {
|
||||||
|
# "gitea.shobu.fr-runner" = {
|
||||||
|
# enable = true;
|
||||||
|
# name = "gitea.shobu.fr-runner";
|
||||||
|
# url = nodes.sin.config.services.gitea.settings.server.ROOT_URL;
|
||||||
|
# token = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW";
|
||||||
|
# labels = [
|
||||||
|
# "ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
|
||||||
|
# ];
|
||||||
|
# settings = {
|
||||||
|
# cache = {
|
||||||
|
# # Enable cache server to use actions/cache.
|
||||||
|
# enabled = true;
|
||||||
|
# # The directory to store the cache data.
|
||||||
|
# # If it's empty, the cache data will be stored in $HOME/.cache/actcache.
|
||||||
|
# dir = "";
|
||||||
|
# # The host of the cache server.
|
||||||
|
# # It's not for the address to listen, but the address to connect from job containers.
|
||||||
|
# # So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
|
||||||
|
# host = "";
|
||||||
|
# # The port of the cache server.
|
||||||
|
# # 0 means to use a random available port.
|
||||||
|
# port = 0;
|
||||||
|
# # The external cache server URL. Valid only when enable is true.
|
||||||
|
# # If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL rather than start a server by itself.
|
||||||
|
# # The URL should generally end with "/".
|
||||||
|
# external_server = "";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{nodes, pkgs, ...}: {
|
{ nodes, pkgs, ... }:
|
||||||
|
{
|
||||||
systemd.sockets.podman.socketConfig.Symlinks = [
|
systemd.sockets.podman.socketConfig.Symlinks = [
|
||||||
"/run/docker.sock"
|
"/run/docker.sock"
|
||||||
];
|
];
|
||||||
@@ -15,32 +16,40 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.oci-containers.containers = let
|
environment.systemPackages = with pkgs; [
|
||||||
runner_config = pkgs.writeTextFile {
|
podman-compose
|
||||||
name = "config.yml";
|
];
|
||||||
text = ''
|
|
||||||
container:
|
|
||||||
network: "bridge"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
gitea-runner = {
|
|
||||||
image = "gitea/act_runner@sha256:8477d5b61b655caad4449888bae39f1f34bebd27db56cb15a62dccb3dcf3a944";
|
|
||||||
autoStart = true;
|
|
||||||
|
|
||||||
# capabilities = {
|
virtualisation.oci-containers.containers =
|
||||||
# NET_RAW = true;
|
let
|
||||||
# };
|
runner_config = pkgs.writeTextFile {
|
||||||
|
name = "config.yml";
|
||||||
environment = {
|
text = ''
|
||||||
GITEA_INSTANCE_URL = nodes.sin.config.services.gitea.settings.server.ROOT_URL;
|
container:
|
||||||
GITEA_RUNNER_REGISTRATION_TOKEN = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW";
|
network: "host"
|
||||||
CONFIG_FILE = "/config.yml";
|
valid_volumes:
|
||||||
|
- "/var/nix/hosted-store"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
gitea-runner = {
|
||||||
|
image = "gitea/act_runner@sha256:8477d5b61b655caad4449888bae39f1f34bebd27db56cb15a62dccb3dcf3a944";
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
# capabilities = {
|
||||||
|
# NET_RAW = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
GITEA_INSTANCE_URL = nodes.sin.config.services.gitea.settings.server.ROOT_URL;
|
||||||
|
GITEA_RUNNER_REGISTRATION_TOKEN = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW";
|
||||||
|
CONFIG_FILE = "/config.yml";
|
||||||
|
};
|
||||||
|
volumes = [
|
||||||
|
"/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
"${runner_config}:/config.yml:ro"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
volumes = [
|
|
||||||
"/var/run/docker.sock:/var/run/docker.sock"
|
|
||||||
"${runner_config}:/config.yml:ro"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
11
scripts/upload-to-cache.sh
Normal file
11
scripts/upload-to-cache.sh
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
set -f
|
||||||
|
|
||||||
|
if ! nix --version; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
export IFS=' '
|
||||||
|
echo "Uploading paths" $OUT_PATHS
|
||||||
|
exec nix copy --to "ssh://root@localhost" $OUT_PATHS
|
||||||
Reference in New Issue
Block a user