Compare commits
36 Commits
vaultwarde
...
nixpkgs_bu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c66a24563 | ||
|
|
344eeb437b | ||
| d5767508ef | |||
| a07b8ffd68 | |||
| 9d7ab9f901 | |||
| a55b498eaa | |||
|
8afc42d46f
|
|||
|
e32c1f31bc
|
|||
| 66a0433148 | |||
| 04ee3105c1 | |||
| 5a35febf77 | |||
| 5403d97506 | |||
| dabda0ccb9 | |||
| f6dc3d46e9 | |||
| 79fef44bcf | |||
|
6182318a29
|
|||
| 5a517d57fb | |||
|
329305a916
|
|||
| f28125c9a4 | |||
| e46c6bef00 | |||
| 6661357f05 | |||
| b012b89a48 | |||
| 4d101aee29 | |||
| 93fb64b2c6 | |||
| a92336fb30 | |||
|
a90960d7a1
|
|||
|
c73ffe95c5
|
|||
| 7464e0b710 | |||
| 5a12803694 | |||
| 0347fa68c7 | |||
| f0e1f07c3e | |||
| b4d199d00c | |||
| bec232a023 | |||
| 62c92821b4 | |||
| eb1ec22605 | |||
| cb5e68ef16 |
110
.gitea/workflows/autoupdate.yml
Normal file
110
.gitea/workflows/autoupdate.yml
Normal file
@@ -0,0 +1,110 @@
|
||||
name: Weekly Flake Update
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 4"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update_and_check_flake:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NIXPKGS_ALLOW_UNFREE: 1
|
||||
steps:
|
||||
- name: Install sudo
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y sudo
|
||||
- name: Install Tea
|
||||
env:
|
||||
TEA_DL_URL: "https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-amd64"
|
||||
shell: bash
|
||||
run: |
|
||||
TEA_DIR=$(mktemp -d -t tmp.XXXX)
|
||||
pushd $TEA_DIR
|
||||
wget "$TEA_DL_URL"
|
||||
wget "${TEA_DL_URL}.sha256"
|
||||
if $(sha256sum --quiet -c "tea-0.9.2-linux-amd64.sha256"); then
|
||||
mv "tea-0.9.2-linux-amd64" /usr/bin/tea
|
||||
chmod +x /usr/bin/tea
|
||||
popd
|
||||
rm -rf $TEA_DIR
|
||||
else
|
||||
popd
|
||||
rm -rf $TEA_DIR
|
||||
echo "::error title=⛔ error hint::Tea v0.9.2 Checksum Failed"
|
||||
exit 1
|
||||
fi
|
||||
- uses: https://code.forgejo.org/actions/checkout@v6
|
||||
- name: Set up Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v31
|
||||
with:
|
||||
github_access_token: ${{ secrets.AHTLONS_GITHUB_TOKEN }} #Fuck github
|
||||
|
||||
- name: Run nix flake update
|
||||
run: nix flake update
|
||||
|
||||
- name: Commit flake.lock
|
||||
run: |
|
||||
git config user.name "malobot"
|
||||
git config user.email "malobot@systemli.org"
|
||||
git stash push
|
||||
git branch nixpkgs_bump_$(date +%Y%m%d)
|
||||
git checkout nixpkgs_bump_$(date +%Y%m%d)
|
||||
git stash pop
|
||||
git add flake.lock
|
||||
git diff --staged --quiet || git commit -m "Update flake.lock"
|
||||
|
||||
- name: Check for eval warnings
|
||||
id: commit
|
||||
shell: bash
|
||||
run: |
|
||||
{
|
||||
echo "COMMIT_DESC<<EOF"
|
||||
echo "Date: $(date)"
|
||||
echo "Evaluation warnings:"
|
||||
nix flake check --all-systems --no-build 2>&1 | grep evaluation | awk '!seen[$0]++' || echo "None :)"
|
||||
echo EOF
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
|
||||
- name: Login to Gitea
|
||||
shell: bash
|
||||
env:
|
||||
GIT_SERVER_URL: https://git.dynamicdiscord.de
|
||||
GIT_SERVER_TOKEN: ${{ secrets.AHTLONS_GITEA_TOKEN }}
|
||||
run: >-
|
||||
tea login add
|
||||
-u "$GIT_SERVER_URL"
|
||||
-t "$GIT_SERVER_TOKEN"
|
||||
- name: Check for existing pull request
|
||||
id: no-pr
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
run: >-
|
||||
tea pr -f head -o simple |
|
||||
grep -q ${{ github.ref_name }} &&
|
||||
exit 1 ||
|
||||
exit 0
|
||||
- name: Force push branch
|
||||
run: git push --force -u origin nixpkgs_bump_$(date +%Y%m%d)
|
||||
- name: Create pull request
|
||||
if: steps.no-pr.outcome == 'success'
|
||||
env:
|
||||
COMMIT_MSG: Automatic Nixpkgs update
|
||||
COMMIT_DESC: ${{ steps.commit.outputs.COMMIT_DESC }}
|
||||
shell: bash
|
||||
run: >-
|
||||
tea pr create
|
||||
-L "bump"
|
||||
-t "$COMMIT_MSG"
|
||||
-d "$COMMIT_DESC"
|
||||
- name: Skip pull request
|
||||
if: steps.no-pr.outcome == 'failure'
|
||||
shell: bash
|
||||
run: >
|
||||
echo "::error title=⛔ error hint::
|
||||
A PR already exists for this branch: ${{ github.ref_name }}"
|
||||
93
flake.lock
generated
93
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746728054,
|
||||
"narHash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE=",
|
||||
"lastModified": 1768920986,
|
||||
"narHash": "sha256-CNzzBsRhq7gg4BMBuTDObiWDH/rFYHEuDRVOwCcwXw4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "ff442f5d1425feb86344c028298548024f21256d",
|
||||
"rev": "de5708739256238fb912c62f03988815db89ec9a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -21,6 +21,27 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"dns": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1768143854,
|
||||
"narHash": "sha256-E5/kyPz4zAZn/lZdvqlF83jMgCWNxmqYjjWuadngCbk=",
|
||||
"owner": "kirelagin",
|
||||
"repo": "dns.nix",
|
||||
"rev": "a97cf4156e9f044fe4bed5be531061000dfabb07",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kirelagin",
|
||||
"repo": "dns.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ep3-bs": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -43,15 +64,12 @@
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"lastModified": 1614513358,
|
||||
"narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"rev": "5466c5bbece17adaab2d82fae80b46e807611bf3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -102,18 +120,17 @@
|
||||
},
|
||||
"microvm": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"spectrum": "spectrum"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764549796,
|
||||
"narHash": "sha256-Mswg665P92EoHkBwCwPr/7bdnj04g2Qfb+t02ZEYTHA=",
|
||||
"lastModified": 1772338235,
|
||||
"narHash": "sha256-9XcwtSIL/c+pkC3SBNuxCJuSktFOBV1TLvvkhekyB8I=",
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"rev": "030d055e877cc13d7525b39f434150226d5e4482",
|
||||
"rev": "9d1ff9b53532908a5eba7707931c9093508b6b92",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -145,11 +162,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764234087,
|
||||
"narHash": "sha256-NHF7QWa0ZPT8hsJrvijREW3+nifmF2rTXgS2v0tpcEA=",
|
||||
"lastModified": 1769813415,
|
||||
"narHash": "sha256-nnVmNNKBi1YiBNPhKclNYDORoHkuKipoz7EtVnXO50A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "032a1878682fafe829edfcf5fdfad635a2efe748",
|
||||
"rev": "8946737ff703382fda7623b9fab071d037e897d5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -160,11 +177,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1764440730,
|
||||
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
|
||||
"lastModified": 1771969195,
|
||||
"narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
|
||||
"rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -192,11 +209,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1764517877,
|
||||
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
|
||||
"lastModified": 1772542754,
|
||||
"narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c",
|
||||
"rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -208,11 +225,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1764522689,
|
||||
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=",
|
||||
"lastModified": 1772598333,
|
||||
"narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f",
|
||||
"rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -225,6 +242,7 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"disko": "disko",
|
||||
"dns": "dns",
|
||||
"ep3-bs": "ep3-bs",
|
||||
"home-manager": "home-manager",
|
||||
"mfsync": "mfsync",
|
||||
@@ -246,11 +264,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764483358,
|
||||
"narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=",
|
||||
"lastModified": 1772495394,
|
||||
"narHash": "sha256-hmIvE/slLKEFKNEJz27IZ8BKlAaZDcjIHmkZ7GCEjfw=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "5aca6ff67264321d47856a2ed183729271107c9c",
|
||||
"rev": "1d9b98a29a45abe9c4d3174bd36de9f28755e3ff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -335,21 +353,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tasklist": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -408,7 +411,7 @@
|
||||
},
|
||||
"utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
@@ -426,7 +429,7 @@
|
||||
},
|
||||
"utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
disko.url = "github:nix-community/disko/latest";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
dns = {
|
||||
url = "github:kirelagin/dns.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
@@ -29,7 +29,6 @@ with lib;
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
services.malobeo-tasklist.enable = true;
|
||||
|
||||
@@ -43,20 +43,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."cloud.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.10";
|
||||
extraConfig = ''
|
||||
client_max_body_size 10G;
|
||||
client_body_timeout 3600s;
|
||||
send_timeout 3600s;
|
||||
fastcgi_buffers 64 4K;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."keys.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
@@ -67,7 +53,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
services.nginx.virtualHosts."grafana.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
@@ -88,24 +73,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
services.nginx.virtualHosts."zines.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.10";
|
||||
extraConfig = ''
|
||||
client_body_in_file_only clean;
|
||||
client_body_buffer_size 32K;
|
||||
|
||||
client_max_body_size 500M;
|
||||
|
||||
sendfile on;
|
||||
send_timeout 300s;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."status.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
let
|
||||
sshKeys = import ../ssh_keys.nix;
|
||||
peers = import ../modules/malobeo/peers.nix;
|
||||
hosts = import ../hosts.nix {};
|
||||
in
|
||||
{
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets.wg_private = {};
|
||||
sops.secrets.shop_auth = {};
|
||||
sops.secrets.njala_api_key = {};
|
||||
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
@@ -21,6 +23,7 @@ in
|
||||
inputs.self.nixosModules.malobeo.metrics
|
||||
inputs.self.nixosModules.malobeo.users
|
||||
inputs.self.nixosModules.malobeo.backup
|
||||
./dyndns.nix
|
||||
];
|
||||
|
||||
virtualisation.vmVariantWithDisko = {
|
||||
@@ -34,7 +37,7 @@ in
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
lokiHost = "10.0.0.14";
|
||||
lokiHost = hosts.malobeo.hosts.overwatch.network.address;
|
||||
};
|
||||
|
||||
malobeo.autoUpdate = {
|
||||
@@ -128,7 +131,13 @@ in
|
||||
privateKeyFile = config.sops.secrets.wg_private.path;
|
||||
};
|
||||
|
||||
services.malobeo.microvm.enableHostBridge = true;
|
||||
services.malobeo.microvm = {
|
||||
enableHostBridge = true;
|
||||
interface = "enp1s0";
|
||||
gateway = "192.168.1.1";
|
||||
address = "192.168.1.103/24";
|
||||
};
|
||||
|
||||
services.malobeo.microvm.deployHosts = [
|
||||
"overwatch"
|
||||
"infradocs"
|
||||
@@ -146,7 +155,17 @@ in
|
||||
};
|
||||
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 80 ];
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "malobeo@systemli.org";
|
||||
defaults = {
|
||||
dnsProvider = "njalla";
|
||||
credentialsFile = config.sops.secrets.njala_api_key.path;
|
||||
dnsPropagationCheck = false;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -154,16 +173,34 @@ in
|
||||
enable = true;
|
||||
virtualHosts."docs.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.11:9000";
|
||||
proxyPass = "http://${hosts.malobeo.hosts.infradocs.network.address}:9000";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."cloud.malobeo.org" = {
|
||||
virtualHosts."cloud.hq.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
acmeRoot = null;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.13";
|
||||
proxyPass = "http://${hosts.malobeo.hosts.nextcloud.network.address}";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
client_max_body_size ${inputs.self.nixosConfigurations.nextcloud.config.services.nextcloud.maxUploadSize};
|
||||
client_body_timeout 3600s;
|
||||
send_timeout 3600s;
|
||||
fastcgi_buffers 64 4K;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."cloud.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${hosts.malobeo.hosts.nextcloud.network.address}";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
client_max_body_size ${inputs.self.nixosConfigurations.nextcloud.config.services.nextcloud.maxUploadSize};
|
||||
@@ -176,7 +213,7 @@ in
|
||||
|
||||
virtualHosts."keys.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.16";
|
||||
proxyPass = "http://${hosts.malobeo.hosts.vaultwarden.network.address}";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
@@ -185,7 +222,7 @@ in
|
||||
|
||||
virtualHosts."grafana.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.14";
|
||||
proxyPass = "http://${hosts.malobeo.hosts.overwatch.network.address}";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
@@ -194,19 +231,38 @@ in
|
||||
|
||||
virtualHosts."tasklist.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.5:8080";
|
||||
proxyPass = "http://${hosts.malobeo.hosts.durruti.network.address}:8080";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."zines.malobeo.org" = {
|
||||
# created with: nix-shell --packages apacheHttpd --run 'htpasswd -B -c foo.txt malobeo'
|
||||
# then content of foo.txt put into sops
|
||||
# basicAuthFile = config.sops.secrets.shop_auth.path;
|
||||
virtualHosts."zines.hq.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
acmeRoot = null;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.15:8080";
|
||||
proxyPass = "http://${hosts.malobeo.hosts.zineshop.network.address}:8080";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
|
||||
client_body_in_file_only clean;
|
||||
client_body_buffer_size 32K;
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
sendfile on;
|
||||
send_timeout 300s;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."zines.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${hosts.malobeo.hosts.zineshop.network.address}:8080";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
wg_private: ENC[AES256_GCM,data:YEmIfgtyHE9msYijva0Ye2w7shVmYBPZ3mcKRF7Cy20xa6yHEUQ0kC2OWnM=,iv:ouK6fHcrxrEtsmiPmtCz9Ca8Ec1algOifrgZSBNHi74=,tag:524e/SQt++hwVyeWruCsLg==,type:str]
|
||||
njala_api_key: ENC[AES256_GCM,data:uEzx7KeI7ZZP63Igu5vHmuvASVxJai8bezM40UZVobQMr7r6opjnVTc0BPyIGfnG2mx/6Bo=,iv:lch04oGn6bkqtBGVzYlz6B97FGXlGOoxkiT1IplSxm4=,tag:bzXx2jSqFBv1hgJO1r5i+w==,type:str]
|
||||
njalacloud: ENC[AES256_GCM,data:Xg85D9LMMYd8po8vrpxHZA==,iv:L5Gsm3bX61WW1PAdWswFNrScFoBipS2qDGU7iTubt1U=,tag:M2PCfE1h4IkW/iFq8XeIrA==,type:str]
|
||||
njalazines: ENC[AES256_GCM,data:ooDRj4HqKVFrgRyzgFGQjg==,iv:9X8r1eY+6FqXv19mO0uMRd5A2tpvtmT11P77t9BQaCk=,tag:4BE55c8x66/UxyTCpCmdUg==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age18jn5mrfs4gqrnv0e2sxsgh3kq4sgxx39hwr8z7mz9kt7wlgaasjqlr88ng
|
||||
enc: |
|
||||
@@ -23,8 +22,8 @@ sops:
|
||||
NjJ5cFdTVS9NZmVWMjcrcHo2WDZEZDgKiDwkuUn90cDmidwYGZBb5qp+4R1HafV0
|
||||
vMQfjT9GrwB5K/O1GumOmvbzLNhvO2vRZJhfVHzyHLzQK64abQgF5Q==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-01-19T22:46:09Z"
|
||||
mac: ENC[AES256_GCM,data:eU3SIqAGrgbO2tz4zH1tgYcif7oe5j+/wmdYl2xXXI+D6IhiKrTJGvzE3rd3ElEpb+Bg0UQId952U2Ut0yPTfxGLtdlbJA66CmhLAksByoJ8lOXUcp/qDyA4yMRSuwYG2v7uF2crvue9fyRfZ7hl7abE/Q7Z2UjOKqhSZC5cO3U=,iv:NmCVvtBWZRzhpr5nMLy+98VuQZWoUms7xFSxq8PMvBA=,tag:UWjA7oqoNWh4wb0myNg7FA==,type:str]
|
||||
lastmodified: "2026-02-20T19:26:21Z"
|
||||
mac: ENC[AES256_GCM,data:D8ZOgcDCY+I2rFc6+GSRj53QjnhZP0oz5wPgG2x4dOfVRWYMEgR2pnb/IIF95Dq0XR6ja9PLgw42PfdI1dS7vITb1jW5IExcnkB/Pa/RjB3GFeXPFTV6QCAQcK9cLct6yhB/pPbHdt8qHQt7kddiN162RlMHDyR6BAh4gO0Rf3w=,iv:f1RWrxbqNNUdANDR6V+OFuEYJ2ZLVde+5GTcFmSXYSQ=,tag:IBEdkSEz/w4Rxwb6uSBpTw==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-01-19T22:45:26Z"
|
||||
enc: |-
|
||||
@@ -65,4 +64,4 @@ sops:
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
version: 3.11.0
|
||||
|
||||
25
machines/fanny/dyndns.nix
Normal file
25
machines/fanny/dyndns.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
sops.secrets.njalacloud = {};
|
||||
sops.secrets.njalazines = {};
|
||||
systemd.services."dyndns" = {
|
||||
script = ''
|
||||
KEYCLOUD=$(cat /run/secrets/njalacloud)
|
||||
KEYZINES=$(cat /run/secrets/njalazines)
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=cloud.malobeo.org&k="$KEYCLOUD"&auto"
|
||||
${pkgs.curl}/bin/curl --fail --silent --show-error "https://njal.la/update/?h=zines.malobeo.org&k="$KEYZINES"&auto"
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
systemd.timers."dyndns" = {
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnBootSec = "100s";
|
||||
OnUnitActiveSec = "10m";
|
||||
Unit = "dyndns.service";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
wg_private: ENC[AES256_GCM,data:kFuLzZz9lmtUccQUIYiXvJRf7WBg5iCq1xxCiI76J3TaIBELqgbEmUtPR4g=,iv:0S0uzX4OVxQCKDOl1zB6nDo8152oE7ymBWdVkPkKlro=,tag:gg1n1BsnjNPikMBNB60F5Q==,type:str]
|
||||
shop_cleartext: ENC[AES256_GCM,data:sifpX/R6JCcNKgwN2M4Dbflgnfs5CqB8ez5fULPohuFS6k36BLemWzEk,iv:1lRYausj7V/53sfSO9UnJ2OC/Si94JXgIo81Ld74BE8=,tag:5osQU/67bvFeUGA90BSiIA==,type:str]
|
||||
shop_auth: ENC[AES256_GCM,data:0NDIRjmGwlSFls12sCb5OlgyGTCHpPQIjycEJGhYlZsWKhEYXV2u3g1RHMkF8Ny913jarjf0BgwSq5pBD9rgPL9t8X8=,iv:3jgCv/Gg93Mhdm4eYzwF9QrK14QL2bcC4wwSajCA88o=,tag:h8dhMK46hABv9gYW4johkA==,type:str]
|
||||
njalacloud: ENC[AES256_GCM,data:sp79Ij1vd9pQZuPUR1phmw==,iv:AWKZoOfBA/n16pWQCfA0dZmH1KajCztnLvYItoZZbgA=,tag:BIUrobBoO96pxUz1sjIYIw==,type:str]
|
||||
njalazines: ENC[AES256_GCM,data:fnObUEnXYvdj9HtkZNzXVA==,iv:0Zj2n2we9w4fj/n7e1ayd9XgFEMAGCHk4QLTu1IlRnQ=,tag:zeOLAB0oE6XbxqdqhdRNxw==,type:str]
|
||||
njala_api_key: ENC[AES256_GCM,data:ohSVzQUvFjia/s9WceqnZCdLyk3N1Lm2BCBmXeBlkWD2dyrohKCnd9GiJ499IORpuYcOXyM=,iv:Uczk8op5mgqe8gefxgU9YuTqOsYvjzHCKvzA7GDsgio=,tag:XA7JRq/LsGkpHcQSO36Whg==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age136sz3lzhxf74ryruvq34d4tmmxnezkqkgu6zqa3dm582c22fgejqagrqxk
|
||||
enc: |
|
||||
@@ -25,8 +24,8 @@ sops:
|
||||
QVZyNWVOMTh3ejBha21Qb2xCRkFERGMKH9nMQUoS5bGcLUx2T1dOmKd9jshttTrP
|
||||
SKFx7MXcjFRLKS2Ij12V8ftjL3Uod6be5zoMibkxK19KmXY/514Jww==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-04-14T10:34:55Z"
|
||||
mac: ENC[AES256_GCM,data:vcDXtTi0bpqhHnL6XanJo+6a8f5LAE628HazDVaNO34Ll3eRyhi95eYGXQDDkVk2WUn9NJ5oCMPltnU82bpLtskzTfQDuXHaPZJq5gtOuMH/bAKrY0dfShrdyx71LkA4AFlcI1P5hchpbyY1FK3iqe4D0miBv+Q8lCMgQMVrfxI=,iv:1lMzH899K0CnEtm16nyq8FL/aCkSYJVoj7HSKCyUnPg=,tag:mEbkmFNg5VZtSKqq80NrCw==,type:str]
|
||||
lastmodified: "2026-02-20T19:25:05Z"
|
||||
mac: ENC[AES256_GCM,data:g+bFYqJN1X8F52tpIO60S2WKxLG27ZrP399fsfE6o7rPtIMimZou/4oUo7i+kpNtygEuCr3+suP8TPas4x5zMXhRjnjJuwJwL/NwdciHZU0O3rPJgucCEWqr9OdAtxezDM9c2vv+jzqZxWT9t0fIpB9RxO5oy1pHZs0RCgjAJR4=,iv:v6RdTMeQUxSdjIVNFbx2HtxCsdVgFTQTzMXS5Fj62is=,tag:pLoZMBRIXYElO5rY+xX9zg==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-02-11T18:32:49Z"
|
||||
enc: |-
|
||||
@@ -67,4 +66,4 @@ sops:
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.4
|
||||
version: 3.11.0
|
||||
|
||||
@@ -1,90 +1,107 @@
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
createMaloNet = hostId: mac: {
|
||||
local = true;
|
||||
hostId = hostId;
|
||||
address = "192.168.1.${hostId}";
|
||||
gateway = "192.168.1.1";
|
||||
nameservers = [ "192.168.1.1" "1.1.1.1" ]; #setting ns1 as nameserver
|
||||
mac = mac;
|
||||
};
|
||||
|
||||
createOffsiteNet = hostId: mac: {
|
||||
local = false;
|
||||
hostId = hostId;
|
||||
address = "10.0.0.${hostId}";
|
||||
gateway = "10.0.0.1";
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
mac = mac;
|
||||
};
|
||||
in
|
||||
{
|
||||
#TODO: fix local 192.168.1.0/24 addresses they are just palceholders!
|
||||
malobeo = {
|
||||
hosts = {
|
||||
louise = {
|
||||
type = "host";
|
||||
network = {
|
||||
local = true;
|
||||
hostId = "11";
|
||||
address = "192.168.1.101";
|
||||
};
|
||||
};
|
||||
|
||||
bakunin = {
|
||||
type = "host";
|
||||
network = {
|
||||
local = true;
|
||||
hostId = "12";
|
||||
address = "192.168.1.102";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
fanny = {
|
||||
type = "host";
|
||||
network = {
|
||||
local = true;
|
||||
hostId = "13";
|
||||
address = "192.168.1.103";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
lucia = {
|
||||
type = "rpi";
|
||||
network = {
|
||||
local = true;
|
||||
hostId = "15";
|
||||
address = "192.168.1.105";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
durruti = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.5";
|
||||
mac = "52:DA:0D:F9:EF:F9";
|
||||
};
|
||||
network = createMaloNet "5" "52:DA:0D:F9:EF:F9";
|
||||
};
|
||||
|
||||
|
||||
vpn = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.10";
|
||||
mac = "D0:E5:CA:F0:D7:E6";
|
||||
};
|
||||
network = createOffsiteNet "10" "52:DA:0D:F9:EF:E6";
|
||||
};
|
||||
|
||||
|
||||
infradocs = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.11";
|
||||
mac = "D0:E5:CA:F0:D7:E7";
|
||||
};
|
||||
network = createMaloNet "11" "52:DA:0D:F9:EF:E7";
|
||||
};
|
||||
|
||||
|
||||
uptimekuma = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.12";
|
||||
mac = "D0:E5:CA:F0:D7:E8";
|
||||
};
|
||||
network = createOffsiteNet "12" "52:DA:0D:F9:EF:E8";
|
||||
};
|
||||
|
||||
|
||||
nextcloud = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.13";
|
||||
mac = "D0:E5:CA:F0:D7:E9";
|
||||
};
|
||||
network = createMaloNet "13" "52:DA:0D:F9:EF:E9";
|
||||
};
|
||||
|
||||
|
||||
overwatch = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.14";
|
||||
mac = "D0:E5:CA:F0:D7:E0";
|
||||
};
|
||||
network = createMaloNet "14" "52:DA:0D:F9:EF:E0";
|
||||
};
|
||||
|
||||
|
||||
zineshop = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.15";
|
||||
mac = "D0:E5:CA:F0:D7:F1";
|
||||
};
|
||||
network = createMaloNet "15" "52:DA:0D:F9:EF:F1";
|
||||
};
|
||||
|
||||
vaultwarden = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.16";
|
||||
mac = "D0:E5:CA:F0:D7:F2";
|
||||
};
|
||||
network = createMaloNet "16" "D0:E5:CA:F0:D7:F2";
|
||||
};
|
||||
|
||||
testvm = {
|
||||
type = "host";
|
||||
ns1 = {
|
||||
type = "microvm";
|
||||
network = createMaloNet "17" "52:DA:0D:F9:EF:F3";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -19,7 +19,6 @@ with lib;
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
mpv
|
||||
vlc
|
||||
simple-scan
|
||||
bitwarden-desktop
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ rec {
|
||||
];
|
||||
defaultModules = baseModules;
|
||||
|
||||
makeMicroVM = hostName: ipv4Addr: macAddr: modules: [
|
||||
makeMicroVM = hostName: network: modules: [
|
||||
{
|
||||
microvm = {
|
||||
hypervisor = "cloud-hypervisor";
|
||||
@@ -83,7 +83,7 @@ rec {
|
||||
{
|
||||
type = "tap";
|
||||
id = "vm-${hostName}";
|
||||
mac = "${macAddr}";
|
||||
mac = "${network.mac}";
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -93,9 +93,9 @@ rec {
|
||||
systemd.network.networks."20-lan" = {
|
||||
matchConfig.Type = "ether";
|
||||
networkConfig = {
|
||||
Address = [ "${ipv4Addr}/24" ];
|
||||
Gateway = "10.0.0.1";
|
||||
DNS = ["1.1.1.1"];
|
||||
Address = [ "${network.address}/24" ];
|
||||
Gateway = "${network.gateway}";
|
||||
DNS = network.nameservers;
|
||||
DHCP = "no";
|
||||
};
|
||||
};
|
||||
@@ -165,6 +165,16 @@ rec {
|
||||
});
|
||||
};
|
||||
|
||||
systemd.network.networks."20-lan" = pkgs.lib.mkForce {
|
||||
matchConfig.Type = "ether";
|
||||
networkConfig = {
|
||||
Address = [ "10.0.0.${hosts.malobeo.hosts.${hostname}.network.hostId}/24" ];
|
||||
Gateway = "10.0.0.1";
|
||||
DNS = [ "1.1.1.1" ];
|
||||
DHCP = "no";
|
||||
};
|
||||
};
|
||||
|
||||
boot.isContainer = pkgs.lib.mkForce false;
|
||||
services.timesyncd.enable = false;
|
||||
users.users.root.password = "";
|
||||
@@ -210,8 +220,7 @@ rec {
|
||||
specialArgs.self = self;
|
||||
config = {
|
||||
imports = (makeMicroVM "${name}"
|
||||
"${hosts.malobeo.hosts.${name}.network.address}"
|
||||
"${hosts.malobeo.hosts.${name}.network.mac}" [
|
||||
hosts.malobeo.hosts.${name}.network [
|
||||
../${name}/configuration.nix
|
||||
(vmMicroVMOverwrites name {
|
||||
withNetworking = true;
|
||||
@@ -250,7 +259,7 @@ rec {
|
||||
modules = (if (settings.type != "microvm") then
|
||||
defaultModules ++ [ ../${host}/configuration.nix ]
|
||||
else
|
||||
makeMicroVM "${host}" "${settings.network.address}" "${settings.network.mac}" [
|
||||
makeMicroVM "${host}" settings.network [
|
||||
inputs.microvm.nixosModules.microvm
|
||||
../${host}/configuration.nix
|
||||
]);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.malobeo.metrics;
|
||||
hosts = import ../../hosts.nix {};
|
||||
in
|
||||
{
|
||||
options.malobeo.metrics = {
|
||||
@@ -21,7 +22,7 @@ in
|
||||
};
|
||||
lokiHost = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "10.0.0.14";
|
||||
default = hosts.malobeo.hosts.overwatch.network.address;
|
||||
description = "Address of loki host";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -14,6 +14,32 @@ in
|
||||
description = lib.mdDoc "Setup bridge device for microvms.";
|
||||
};
|
||||
|
||||
testHost = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = lib.mdDoc "Enable when the host is used for development and testing using run-vm";
|
||||
};
|
||||
|
||||
interface = mkOption {
|
||||
default = "eno1";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
gateway = mkOption {
|
||||
default = "10.0.0.1";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
address = mkOption {
|
||||
default = "10.0.0.1/24";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
dns = mkOption {
|
||||
default = [ "1.1.1.1" ];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
enableHostBridgeUnstable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
@@ -47,14 +73,31 @@ in
|
||||
|
||||
systemd.network = mkIf (cfg.enableHostBridge || cfg.enableHostBridgeUnstable) {
|
||||
enable = true;
|
||||
# create a bride device that all the microvms will be connected to
|
||||
netdevs."10-microvm".netdevConfig = {
|
||||
Kind = "bridge";
|
||||
Name = "microvm";
|
||||
networks."10-lan" = {
|
||||
matchConfig.Name = ["vm-*"] ++ (if !cfg.testHost then [ "${cfg.interface}" ] else [ ]);
|
||||
networkConfig = {
|
||||
Bridge = "malobeo0";
|
||||
};
|
||||
};
|
||||
|
||||
networks."10-microvm" = {
|
||||
matchConfig.Name = "microvm";
|
||||
|
||||
netdevs."malobeo0" = {
|
||||
netdevConfig = {
|
||||
Name = "malobeo0";
|
||||
Kind = "bridge";
|
||||
};
|
||||
};
|
||||
|
||||
networks."10-lan-bridge" = if !cfg.testHost then {
|
||||
matchConfig.Name = "malobeo0";
|
||||
networkConfig = {
|
||||
Address = [ "${cfg.address}" ];
|
||||
Gateway = "${cfg.gateway}";
|
||||
DNS = cfg.dns;
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
} else {
|
||||
matchConfig.Name = "malobeo0";
|
||||
networkConfig = {
|
||||
DHCPServer = true;
|
||||
IPv6SendRA = true;
|
||||
@@ -65,12 +108,6 @@ in
|
||||
{ Address = "10.0.0.1/24"; }
|
||||
];
|
||||
};
|
||||
|
||||
# connect the vms to the bridge
|
||||
networks."11-microvm" = {
|
||||
matchConfig.Name = "vm-*";
|
||||
networkConfig.Bridge = "microvm";
|
||||
};
|
||||
};
|
||||
|
||||
microvm.vms =
|
||||
@@ -81,7 +118,7 @@ in
|
||||
# under nixosConfigurations
|
||||
flake = inputs.malobeo;
|
||||
# Specify from where to let `microvm -u` update later on
|
||||
updateFlake = "git+https://git.dynamicdiscord.de/kalipso/infrastructure";
|
||||
updateFlake = "git+https://git.dynamicdiscord.de/malobeo/infrastructure";
|
||||
}; };
|
||||
in
|
||||
builtins.listToAttrs (map mapperFunc cfg.deployHosts);
|
||||
|
||||
41
machines/modules/malobeo/zones.nix
Normal file
41
machines/modules/malobeo/zones.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ inputs }:
|
||||
|
||||
let
|
||||
vpnNS = "vpn";
|
||||
localNS = "hq";
|
||||
peers = import ./peers.nix;
|
||||
hosts = ((import ../../hosts.nix ) {}).malobeo.hosts;
|
||||
|
||||
in
|
||||
{
|
||||
SOA = {
|
||||
nameServer = "ns1";
|
||||
adminEmail = "admin@malobeo.org";
|
||||
serial = 2019030801;
|
||||
};
|
||||
useOrigin = false;
|
||||
|
||||
NS = [
|
||||
"ns1.malobeo.org."
|
||||
];
|
||||
|
||||
subdomains = {
|
||||
ns1 = {
|
||||
A = [ hosts.ns1.network.address ];
|
||||
};
|
||||
|
||||
${localNS} = {
|
||||
A = [ hosts.fanny.network.address ];
|
||||
subdomains = builtins.mapAttrs (name: value: if value.network.local == true then {
|
||||
A = [ value.network.address ];
|
||||
} else {}) hosts;
|
||||
};
|
||||
|
||||
${vpnNS} = {
|
||||
A = [ peers.vpn.address ];
|
||||
subdomains = builtins.mapAttrs (name: value: if value.role != "server" then {
|
||||
A = [ value.address ];
|
||||
} else {}) peers;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
hosts = import ../hosts.nix {};
|
||||
in
|
||||
{
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets = {
|
||||
@@ -28,7 +31,6 @@ with lib;
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
services.postgresqlBackup = {
|
||||
@@ -59,8 +61,8 @@ with lib;
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
trusted_domains = ["10.0.0.13"];
|
||||
trusted_proxies = [ "10.0.0.1" ];
|
||||
trusted_domains = [ "cloud.malobeo.org" "cloud.hq.malobeo.org" ];
|
||||
trusted_proxies = [ hosts.malobeo.hosts.fanny.network.address ];
|
||||
"maintenance_window_start" = "1";
|
||||
"default_phone_region" = "DE";
|
||||
};
|
||||
|
||||
52
machines/ns1/configuration.nix
Normal file
52
machines/ns1/configuration.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{ config, self, lib, inputs, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with inputs;
|
||||
|
||||
let
|
||||
dns = inputs.dns;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
hostName = mkDefault "ns1";
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
imports = [
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
];
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 53 ];
|
||||
allowedUDPPorts = [ 53 ];
|
||||
};
|
||||
|
||||
services.bind = {
|
||||
enable = true;
|
||||
forwarders = [
|
||||
"1.1.1.1"
|
||||
"1.0.0.1"
|
||||
];
|
||||
|
||||
cacheNetworks = [
|
||||
"127.0.0.0/24"
|
||||
"10.0.0.0/24"
|
||||
"192.168.1.0/24"
|
||||
"10.100.0.0/24"
|
||||
];
|
||||
|
||||
zones = {
|
||||
"malobeo.org" = {
|
||||
master = true;
|
||||
file = pkgs.writeText "zone-malobeo.org" (dns.lib.toString "malobeo.org" (import ../modules/malobeo/zones.nix { inherit inputs; }));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
hosts = import ../hosts.nix {};
|
||||
in
|
||||
{
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets = {
|
||||
@@ -29,7 +32,6 @@ with lib;
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = false;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
services.grafana = {
|
||||
@@ -121,31 +123,31 @@ with lib;
|
||||
{
|
||||
job_name = "durruti";
|
||||
static_configs = [{
|
||||
targets = [ "10.0.0.5:9002" ];
|
||||
targets = [ "${hosts.malobeo.hosts.durruti.network.address}:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "infradocs";
|
||||
static_configs = [{
|
||||
targets = [ "10.0.0.11:9002" ];
|
||||
targets = [ "${hosts.malobeo.hosts.infradocs.network.address}:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "nextcloud";
|
||||
static_configs = [{
|
||||
targets = [ "10.0.0.13:9002" ];
|
||||
targets = [ "${hosts.malobeo.hosts.nextcloud.network.address}:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "zineshop";
|
||||
static_configs = [{
|
||||
targets = [ "10.0.0.15:9002" ];
|
||||
targets = [ "${hosts.malobeo.hosts.zineshop.network.address}:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "fanny";
|
||||
static_configs = [{
|
||||
targets = [ "10.0.0.1:9002" ];
|
||||
targets = [ "${hosts.malobeo.hosts.fanny.network.address}:9002" ];
|
||||
}];
|
||||
}
|
||||
# add vpn - check how to reach it first. most probably 10.100.0.1
|
||||
|
||||
@@ -23750,8 +23750,8 @@
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"text": "10.0.0.13:9002",
|
||||
"value": "10.0.0.13:9002"
|
||||
"text": "192.168.1.13:9002",
|
||||
"value": "192.168.1.13:9002"
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
|
||||
@@ -6,7 +6,7 @@ positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://10.0.0.13:3100/loki/api/v1/push
|
||||
- url: http://192.168.1.13:3100/loki/api/v1/push
|
||||
|
||||
|
||||
scrape_configs:
|
||||
|
||||
@@ -38,7 +38,7 @@ with lib;
|
||||
backupDir = "/var/local/vaultwarden/backup";
|
||||
environmentFile = config.sops.secrets.vaultwarden_env.path;
|
||||
config = {
|
||||
DOMAIN = "http://keys.malobeo.org";
|
||||
DOMAIN = "https://keys.malobeo.org";
|
||||
SIGNUPS_ALLOWED = true;
|
||||
#WEBSERVER
|
||||
ROCKET_ADDRESS = "127.0.0.1";
|
||||
|
||||
@@ -40,19 +40,6 @@ with lib;
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."cloud.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
client_max_body_size ${inputs.self.nixosConfigurations.nextcloud.config.services.nextcloud.maxUploadSize};
|
||||
client_body_timeout 3600s;
|
||||
send_timeout 3600s;
|
||||
fastcgi_buffers 64 4K;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."keys.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
@@ -79,28 +66,6 @@ with lib;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."zines.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Authorization $http_authorization; # Pass the Authorization header
|
||||
proxy_pass_header Authorization;
|
||||
|
||||
client_body_in_file_only clean;
|
||||
client_body_buffer_size 32K;
|
||||
|
||||
client_max_body_size 500M;
|
||||
|
||||
sendfile on;
|
||||
send_timeout 300s;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
|
||||
@@ -20,7 +20,6 @@ with lib;
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user