Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa4afea341 | ||
|
|
b12731a100 | ||
|
|
ce2c9c76a7 | ||
|
|
dc083ddf1a | ||
|
|
75e71f9ce9 | ||
|
|
19540ea1da | ||
|
|
431f78f8af | ||
|
|
95eea6fc26 | ||
|
|
387a34ffff |
@@ -115,10 +115,15 @@ in
|
||||
"@\tIN\tSOA\t${config.networking.hostName}\tgreg@thehellings.com (1 1m 1m 1m 1m)"
|
||||
"\tIN\tNS\t${config.networking.hostName}"
|
||||
];
|
||||
makeHost = host: "${host.name}\tIN\tA\t${host.address}";
|
||||
makeHost =
|
||||
host:
|
||||
[ "${host.name}\tIN\tA\t${host.address}" ]
|
||||
++ lib.map (a: "${a}\tIN\tA\t${host.address}") (
|
||||
if builtins.hasAttr "aliases" host then host.aliases else [ ]
|
||||
);
|
||||
in
|
||||
pkgs.writeText "${domain}" (
|
||||
builtins.concatStringsSep "\n" (preamble ++ (lib.map makeHost hosts) ++ [ "" ])
|
||||
builtins.concatStringsSep "\n" (preamble ++ (lib.flatten (lib.map makeHost hosts)) ++ [ "" ])
|
||||
);
|
||||
in
|
||||
lib.mapAttrs
|
||||
|
||||
@@ -2,12 +2,24 @@
|
||||
# them by the following commands:
|
||||
# nix run nixpkgs.matrix-synapse
|
||||
# register_new_matrix_user -k "B9EoPr2WV9hzwc7uL2Sx1JmvCeKDEOGCpB0uginQcQtEH4wzRtkSIdo7lltrjSQa" http://localhost:8448
|
||||
{ config, lib, ... }:
|
||||
{ config, ... }:
|
||||
let
|
||||
domain = "${config.networking.domain}";
|
||||
fqdn = "matrix.${domain}";
|
||||
in
|
||||
{
|
||||
greg.proxies."${fqdn}" = {
|
||||
extraConfig = ''
|
||||
error_log /var/log/nginx/debug.log debug;
|
||||
proxy_ssl_verify off;
|
||||
proxy_ssl_server_name on;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
'';
|
||||
genAliases = false;
|
||||
ssl = true;
|
||||
target = "https://matrix.shire-zebra.ts.net";
|
||||
};
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
# Server the '.well-known' files to find the Matrix API server
|
||||
@@ -44,36 +56,6 @@ in
|
||||
return 200 '${builtins.toJSON client}';
|
||||
'';
|
||||
};
|
||||
|
||||
# Reverse proxy in front of the actual Matrix server
|
||||
"${fqdn}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
extraConfig = ''
|
||||
error_log /var/log/nginx/debug.log debug;
|
||||
'';
|
||||
|
||||
# Not the appropriate place for the chat client
|
||||
locations =
|
||||
(builtins.listToAttrs (
|
||||
builtins.map
|
||||
(
|
||||
val:
|
||||
lib.nameValuePair "/_${val}" {
|
||||
proxyPass = "https://matrix.shire-zebra.ts.net";
|
||||
}
|
||||
)
|
||||
[
|
||||
"matrix"
|
||||
"synapse"
|
||||
"dendrite"
|
||||
]
|
||||
))
|
||||
// {
|
||||
"/".extraConfig = "return 404;";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -34,10 +34,5 @@ in
|
||||
ssl = true;
|
||||
genAliases = false;
|
||||
};
|
||||
"doubles.thehellings.com" = {
|
||||
target = "http://localhost:8081";
|
||||
ssl = true;
|
||||
genAliases = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
(name: value: {
|
||||
inherit name;
|
||||
address = builtins.getAttr netAttr value;
|
||||
aliases = lib.optionals (builtins.hasAttr "aliases" value) (builtins.getAttr "aliases" value);
|
||||
})
|
||||
(
|
||||
lib.filterAttrs (
|
||||
|
||||
@@ -47,6 +47,12 @@ spec:
|
||||
type: LoadBalancer
|
||||
port: 32222
|
||||
nodePort: 32222
|
||||
# Anubis sidecar port — ingress routes here; Anubis proxies to :3000
|
||||
additionalPorts:
|
||||
- name: anubis
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
|
||||
gitea:
|
||||
admin:
|
||||
@@ -119,6 +125,46 @@ spec:
|
||||
cpu: "100m"
|
||||
memory: "2Gi"
|
||||
|
||||
# Anubis anti-crawler sidecar
|
||||
# Anubis listens on :8080 and proxies to Gitea at http://localhost:3000
|
||||
# Ingress is updated to route to the anubis port instead of http
|
||||
extraContainers:
|
||||
- name: anubis
|
||||
image: ghcr.io/techarohq/anubis:latest
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: BIND
|
||||
value: ":8080"
|
||||
- name: DIFFICULTY
|
||||
value: "4"
|
||||
- name: METRICS_BIND
|
||||
value: ":9090"
|
||||
- name: SERVE_ROBOTS_TXT
|
||||
value: "true"
|
||||
- name: TARGET
|
||||
value: "http://localhost:3000"
|
||||
- name: OG_PASSTHROUGH
|
||||
value: "true"
|
||||
- name: OG_EXPIRY_TIME
|
||||
value: "24h"
|
||||
resources:
|
||||
limits:
|
||||
cpu: "750m"
|
||||
memory: "256Mi"
|
||||
requests:
|
||||
cpu: "250m"
|
||||
memory: "256Mi"
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
runAsNonRoot: true
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
|
||||
@@ -8,7 +8,8 @@ spec:
|
||||
service:
|
||||
name: gitea-release-http
|
||||
port:
|
||||
name: http
|
||||
# Route through Anubis anti-crawler sidecar instead of directly to Gitea
|
||||
name: anubis
|
||||
tls:
|
||||
- hosts:
|
||||
- gitea
|
||||
|
||||
@@ -15,8 +15,8 @@ spec:
|
||||
storage: |-
|
||||
MINIO_ACCESS_KEY_ID={{ .minio_nas1_key }}
|
||||
MINIO_SECRET_ACCESS_KEY={{ .minio_nas1_secret }}
|
||||
#minio_key: "{{ .minio_nas1_key }}"
|
||||
#minio_secret: "{{ .minio_nas1_secret }}"
|
||||
minio_key: "{{ .minio_nas1_key }}"
|
||||
minio_secret: "{{ .minio_nas1_secret }}"
|
||||
secretStoreRef:
|
||||
name: bitwarden-login
|
||||
kind: ClusterSecretStore
|
||||
|
||||
@@ -19,6 +19,7 @@ spec:
|
||||
kind: HelmRepository
|
||||
name: mariadb-operator
|
||||
interval: "1h"
|
||||
version: "26.3.0"
|
||||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
@@ -33,6 +34,7 @@ spec:
|
||||
kind: HelmRepository
|
||||
name: mariadb-operator
|
||||
interval: "1h"
|
||||
version: "26.3.0"
|
||||
dependsOn:
|
||||
- name: mariadb-operator-crds
|
||||
- name: longhorn
|
||||
|
||||
@@ -11,6 +11,7 @@ spec:
|
||||
kind: HelmRepository
|
||||
name: mariadb-operator
|
||||
interval: "1h"
|
||||
version: "26.3.0"
|
||||
dependsOn:
|
||||
- name: mariadb-operator-crds
|
||||
- name: mariadb-operator
|
||||
|
||||
+2
-1
@@ -13,7 +13,8 @@
|
||||
"ip": "10.42.1.4",
|
||||
"pubkey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEBecZUva9OnZuXLaBun6/1ITo5f9p0YMLPD+q0egLRS",
|
||||
"external": true,
|
||||
"ts": "100.119.228.115"
|
||||
"ts": "100.119.228.115",
|
||||
"aliases": [ "s3" ]
|
||||
},
|
||||
"exodus": {
|
||||
"ip": null,
|
||||
|
||||
Reference in New Issue
Block a user