Compare commits

...

8 Commits

Author SHA1 Message Date
Joey Hafner
d85318e050
Init OBS xdg.desktopEntries
Some checks are pending
SSH and echo to file / ssh (push) Waiting to run
2024-10-24 12:01:49 -07:00
Joey Hafner
48ef0c3add
#14 Migrate Wireguard 2024-10-24 12:01:00 -07:00
Joey Hafner
9dc3789181
#14 Migrate Traefik 2024-10-24 12:00:37 -07:00
Joey Hafner
b1261a3116
#14 Migrate Plex 2024-10-24 12:00:18 -07:00
Joey Hafner
07471f05b0
Delete Nginx 2024-10-24 12:00:00 -07:00
Joey Hafner
cca0112d0c
#14 Migrate Navidrome 2024-10-24 11:59:49 -07:00
Joey Hafner
b0bdac8150
#14 Migrate Monitoring 2024-10-24 11:59:27 -07:00
Joey Hafner
a0a03b1329
#14 Migrate Minecraft 2024-10-24 11:58:53 -07:00
49 changed files with 17 additions and 566 deletions

View File

@ -1,14 +0,0 @@
services:
nginx:
image: nginx
container_name: nginx_nginx
restart: "no"
networks:
- web
labels:
- traefik.http.routers.nginx.rule=Host(`test.nginx.jafner.net`)
- traefik.http.routers.nginx.tls.certresolver=lets-encrypt-dns01
networks:
web:
external: true

View File

@ -1 +0,0 @@
DOCKER_DATA=/home/admin/data/traefik

View File

@ -1,5 +0,0 @@
### The `web` Network
Created with `docker network create --driver=bridge --subnet=172.20.0.0/23 --ip-range=172.20.1.0/24 web`
Previous version was naive, and had a subnet equal in size to the IP range. This meant that we would occasionally encounter address colisions between services which needed static IPs, and those handed IPs automatically.

View File

@ -1,123 +0,0 @@
tcp:
routers:
dungeon-master:
entrypoints:
- "websecure"
- "web"
rule: HostSNIRegexp(`^.+\.ai\.jafner\.(net|dev)$`)
service: "dungeon-master@file"
tls:
passthrough: true
services:
dungeon-master:
loadBalancer:
servers:
- address: "192.168.1.135:443"
http:
routers:
dungeon-master:
entrypoints:
- "websecure"
- "web"
rule: HostRegexp(`^.+\.ai\.jafner\.(net|dev)$`)
service: "dungeon-master@file"
services:
dungeon-master:
loadBalancer:
passHostHeader: true
servers:
- url: "https://192.168.1.135"
# http:
# routers:
# ollama:
# rule: "Host(`ollama.jafner.net`)"
# entryPoints: "websecure"
# middlewares:
# - "lan-only@file"
# service: "ollama@file"
# tls:
# certResolver: "lets-encrypt"
# open-webui:
# rule: "Host(`openwebui.jafner.net`)"
# entryPoints: "websecure"
# middlewares:
# - "lan-only@file"
# service: "open-webui@file"
# tls:
# certResolver: "lets-encrypt"
# sillytavern:
# rule: "Host(`sillytavern.jafner.net`)"
# entryPoints: "websecure"
# middlewares:
# - "lan-only@file"
# service: "sillytavern@file"
# tls:
# certResolver: "lets-encrypt"
# sdwebui:
# rule: "Host(`sdwebui.jafner.net`)"
# entryPoints: "websecure"
# middlewares:
# - "lan-only@file"
# service: "sdwebui@file"
# tls:
# certResolver: "lets-encrypt"
# oobabooga:
# rule: "Host(`oobabooga.jafner.net`)"
# entryPoints: "websecure"
# middlewares:
# - "lan-only@file"
# service: "oobabooga@file"
# tls:
# certResolver: "lets-encrypt"
# oobabooga-api:
# rule: "Host(`oobabooga-api.jafner.net`)"
# entryPoints: "websecure"
# middlewares:
# - "lan-only@file"
# service: "oobabooga-api@file"
# tls:
# certResolver: "lets-encrypt"
# exui:
# rule: "Host(`exui.jafner.net`)"
# entryPoints: "websecure"
# middlewares:
# - "lan-only@file"
# service: "exui@file"
# tls:
# certResolver: "lets-encrypt"
# services:
# ollama:
# loadBalancer:
# servers:
# - url: "http://192.168.1.135:11434"
# open-webui:
# loadBalancer:
# servers:
# - url: "http://192.168.1.135:3000"
# sillytavern:
# loadBalancer:
# servers:
# - url: "http://192.168.1.135:8000"
# sdwebui:
# loadBalancer:
# servers:
# - url: "http://192.168.1.135:7868"
# oobabooga:
# loadBalancer:
# servers:
# - url: "http://192.168.1.135:7860"
# oobabooga-api:
# loadBalancer:
# servers:
# - url: "http://192.168.1.135:5010"
# exui:
# loadBalancer:
# servers:
# - url: "http://192.168.1.135:5030"

View File

@ -1,82 +0,0 @@
http:
middlewares:
lan-only:
ipWhiteList:
sourceRange:
- "127.0.0.1/32"
- "192.168.1.1/24"
simple-auth:
basicAuth:
usersFile: "/.htpasswd"
securityheaders:
headers:
customResponseHeaders:
X-Robots-Tag: "none,noarchive,nosnippet,notranslate,noimageindex"
server: ""
sslProxyHeaders:
X-Forwarded-Proto: https
referrerPolicy: "same-origin"
hostsProxyHeaders:
- "X-Forwarded-Host"
customRequestHeaders:
X-Forwarded-Proto: "https"
X-Scheme: https
contentTypeNosniff: true
browserXssFilter: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsSeconds: 63072000
stsPreload: true
pihole:
addprefix:
prefix: "/admin"
traefik-forward-auth:
forwardauth:
address: http://forwardauth:4181
trustForwardHeader: true
authResponseHeaders:
- X-Forwarded-User
traefik-forward-auth-privileged:
forwardauth:
address: http://forwardauth-privileged:4181
trustForwardHeader: true
authResponseHeaders:
- X-Forwarded-User
nextcloud-headers:
headers:
accessControlMaxAge: 100
sslRedirect: true
stsSeconds: 63072000
stsIncludeSubdomains: true
stsPreload: true
forceSTSHeader: true
customFrameOptionsValue: "SAMEORIGIN" #CSP takes care of this but may be needed for organizr.
contentTypeNosniff: true
browserXssFilter: true
sslForceHost: true
sslHost: "nextcloud.jafner.net"
referrerPolicy: "no-referrer"
#contentSecurityPolicy: "frame-ancestors '*.example.com:*';object-src 'none';script-src 'none';"
featurePolicy: "camera 'none'; geolocation 'none'; microphone 'none'; payment 'none'; usb 'none'; vr 'none';"
customResponseHeaders:
X-Robots-Tag: "noindex, nofollow"
server: ""
nextcloud-redirect:
redirectRegex:
permanent: true
regex: "https://(.*)/.well-known/(card|cal)dav"
replacement: "https://${1}/remote.php/dav/"
keycloak:
headers:
customResponseHeaders:
X-Robots-Tag: "noindex, nofollow"
referrerPolicy: "same-origin"
hostsProxyHeaders:
- "X-Forwarded-Host"
customRequestHeaders:
X-Forwarded-Proto: "https"
X-Scheme: https
serversTransports:
insecureskipverify:
insecureSkipVerify: true

View File

@ -1,40 +0,0 @@
http:
routers:
barbarian:
rule: "Host(`barbarian.nas.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "barbarian@file"
tls:
certResolver: "lets-encrypt"
monk:
rule: "Host(`monk.nas.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "monk@file"
tls:
certResolver: "lets-encrypt"
paladin:
rule: "Host(`paladin.nas.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "paladin@file"
tls:
certResolver: "lets-encrypt"
services:
barbarian:
loadBalancer:
servers:
- url: "http://192.168.1.10/"
monk:
loadBalancer:
servers:
- url: "http://192.168.1.11/"
paladin:
loadBalancer:
servers:
- url: "http://192.168.1.12/"

View File

@ -1,17 +0,0 @@
http:
routers:
ranger:
rule: "Host(`pihole.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "ranger@file"
tls:
certResolver: "lets-encrypt"
services:
ranger:
loadBalancer:
servers:
- url: "http://192.168.1.32/"

View File

@ -1,36 +0,0 @@
tcp:
routers:
silver-hand:
entrypoints:
- "websecure"
- "web"
rule: HostSNIRegexp(`^.+\.jafner\.dev$`)
service: "silver-hand@file"
tls:
passthrough: true
services:
silver-hand:
loadBalancer:
servers:
- address: "192.168.1.31:443"
- address: "192.168.1.32:443"
- address: "192.168.1.33:443"
http:
routers:
silver-hand:
entrypoints:
- "websecure"
- "web"
rule: HostRegexp(`^.+\.jafner\.dev$`)
service: "silver-hand@file"
services:
silver-hand:
loadBalancer:
passHostHeader: true
servers:
- url: "https://192.168.1.31"
- url: "https://192.168.1.32"
- url: "https://192.168.1.33"

View File

@ -1,100 +0,0 @@
http:
routers:
toes-day:
rule: "Host(`day.toes.tasmota.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "toes-day@file"
tls:
certResolver: "lets-encrypt"
toes-night:
rule: "Host(`night.toes.tasmota.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "toes-night@file"
tls:
certResolver: "lets-encrypt"
lab-rack:
rule: "Host(`rack.tasmota.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "lab-rack@file"
tls:
certResolver: "lets-encrypt"
sprout-day:
rule: "Host(`day.sprout.tasmota.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "sprout-day@file"
tls:
certResolver: "lets-encrypt"
figment-day:
rule: "Host(`day.figment.tasmota.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "figment-day@file"
tls:
certResolver: "lets-encrypt"
figment-night:
rule: "Host(`night.figment.tasmota.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "figment-night@file"
tls:
certResolver: "lets-encrypt"
president-day:
rule: "Host(`day.president.tasmota.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "president-day@file"
tls:
certResolver: "lets-encrypt"
cowboy-day:
rule: "Host(`day.cowboy.tasmota.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
service: "cowboy-day@file"
tls:
certResolver: "lets-encrypt"
services:
toes-day:
loadBalancer:
servers:
- url: "http://192.168.1.50/"
lab-rack:
loadBalancer:
servers:
- url: "http://192.168.1.51/"
cowboy-day:
loadBalancer:
servers:
- url: "http://192.168.1.52/"
figment-day:
loadBalancer:
servers:
- url: "http://192.168.1.53/"
figment-night:
loadBalancer:
servers:
- url: "http://192.168.1.54/"
president-day:
loadBalancer:
servers:
- url: "http://192.168.1.55/"
toes-night:
loadBalancer:
servers:
- url: "http://192.168.1.56"
sprout-day:
loadBalancer:
servers:
- url: "http://192.168.1.57/"

View File

@ -1,4 +0,0 @@
tls:
options:
tls12:
minVersion: VersionTLS12

View File

@ -1,11 +0,0 @@
http:
routers:
api:
rule: "Host(`traefik.jafner.net`)"
entryPoints: "websecure"
middlewares:
- "lan-only@file"
#- "traefik-forward-auth@file"
service: "api@internal"
tls:
certResolver: "lets-encrypt"

View File

@ -1,27 +0,0 @@
services:
traefik:
image: traefik:latest
container_name: traefik_traefik
restart: "no"
networks:
web:
ipv4_address: 172.20.0.10
monitoring:
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yaml:/traefik.yaml
- ./config:/config
- $DOCKER_DATA/acme.json:/acme.json
- $DOCKER_DATA/acme-dns01.json:/acme-dns01.json
environment:
- CLOUDFLARE_DNS_API_TOKEN=${traefik_CLOUDFLARE_DNS_API_TOKEN}
networks:
web:
external: true
monitoring:
external: true

View File

@ -1,7 +0,0 @@
# for all web-facing services
traefik.http.routers.<router-name>.rule=Host(`<subdomain>.jafner.net`)
traefik.http.routers.<router-name>.tls.certresolver=lets-encrypt
# for restricting service to LAN IPs
traefik.http.routers.<router-name>.middlewares=lan-only@file
# for setting a non-default port
traefik.http.services.<service-name>.loadbalancer.server.port=1234

View File

@ -1,58 +0,0 @@
{
"traefik_CLOUDFLARE_DNS_API_TOKEN": "ENC[AES256_GCM,data:lY+Jx3L9rrnXymSqX05wLUUHYCpgRM3J8ameErWwjGI7bnwssxefig==,iv:45p12agnCVVJ10uHCNPrqFq88RQH3C2arkxjDrGVyHA=,tag:NlNIQWkL6qCfnAdpzYDCFw==,type:str]",
"sops": {
"shamir_threshold": 2,
"key_groups": [
{
"hc_vault": null,
"age": [
{
"recipient": "age1zswcq6t5wl8spr3g2wpxhxukjklngcav0vw8py0jnfkqd2jm2ypq53ga00",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRMmduV2dmRWdRQmFYaTFp\nd3RWQmlnTjZ1d1h6Y3drdldzTnBOUE5iNFVZCnNPUC9lZHVjMldrby9zWVVuakFV\nV3NraHc1Yjkva1ZOMWxXamZXcTN0VncKLS0tIHpZNHU3WWRyNHd1WVBwNXBSZE1m\nZ3FkRE1XcTlDMkR1Sm8xNWxac3l2bDAKF5fSw1mwmxOZsLgIZkWxdf8TFqqL4/s+\nwlOxUeqUD3zXJPqVPbFW5MbgjX/J1wfpuNi1GH8Y0Ll9e0nQQFQ5P4s=\n-----END AGE ENCRYPTED FILE-----\n"
}
]
},
{
"hc_vault": null,
"age": [
{
"recipient": "age1zswcq6t5wl8spr3g2wpxhxukjklngcav0vw8py0jnfkqd2jm2ypq53ga00",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCUmgyQXpKZStnMVJLQzda\nQTZpUWRvNnoyTVFaUVEzUnh2ZlA5MXU5ZWtNCjVPc0d1eGdERE0yL0daOVZHczc1\neGVFRWNETFpBV2hQTTJDWVRDZGJSUkUKLS0tIExxL0pjOUxKRGx5elluWjB1Nk1z\neVp1Z2M3L0JzU3Q2SjRWWndjRE05QmMKgbK781ytHXabTLvCK6o1Xl/VUgimBlHx\nNev5+8zKigZ4P5vpeDePpJxtFURuSS6uloalzS22Suo+HMUeZn3/Hww=\n-----END AGE ENCRYPTED FILE-----\n"
}
]
},
{
"hc_vault": null,
"age": [
{
"recipient": "age193t908fjxl8ekl77p5xqnpj4xmw3y0khvyzlrw22hdzjduk6l53q05spq3",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSMy9tNDNBL2R6VStnRDNI\neSt1cFJEQnpKc2k2a1JqN0g4dGRVU1ZoVEMwCjhQaG9BSDUzM3VHWFZEYjJOR0pq\nU241VEJwYjU4a3lCR1dMK3JvT1dHZGsKLS0tIDlJU1FZTEUxMDhxdGQ0UDUzamhQ\nQzk1SmFkUER4STdCc3BGbEd6WG94TEUKHFQ3RmB1VPPHqui6QToU+xxnbv5rbsoU\noQo9or0G0GGE37uRyVJv9CI82yJxvuCFPl8Yuk5wFzC8A8eSu9eVUH0=\n-----END AGE ENCRYPTED FILE-----\n"
}
]
},
{
"hc_vault": null,
"age": [
{
"recipient": "age13prhyye2jy3ysa6ltnjgkrqtxrxgs0035d86jyn4ltgk3wxtqgrqgav855",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBMOGk5N0FkS3ppaXVielNF\na0J6U1QyRnhLNFFxelk2T1YzQ2VkcTkwZXl3Ck1QNmNUa0VTOURvbkN3MzBGK0cv\nT1dVQjF1WDZnbnVFMUlaZzI3N2R3ZUUKLS0tIGtvckc2eXhUSVVQQmRJUUo3cFFC\nQnVKTGNnUzNwdWVlQ252Q1ZoQldDZTQKB20ACAopk9hwM/rka16aGCNQzXf6k0E4\nDcm5WfAM2lRX304xRvtuaH+3LGox4yPlSMST3fY3mA/QaIAB5MGIbR0=\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1n20krynrj75jqfy2muvhrygvzd4ee8ngamljqavsrk033zwx0ses2tdtfe",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBDY2drTU5rU3dNaUZTWlUx\ndnRSc0lWV1ZtSS9vTmtCdzZIYnVYU1gzdGg0CkdaVDAvVklRYXE3YnNBVUl0V2t0\nSTZNZHh0VCtjQTRTNG9OT2dTRVhZWW8KLS0tIFA5QXltNllPeFd6ODV2YTZqTmM1\nYUdpWHgweHNwcUVlZDlHbHZFNllOWkkKF7jXVvqcskzTx5YxgekhmSWTvbARTYnu\n2P/skePzalJYbYl8Cz6edVdQQ+YpZ9kT3dWpekq68FNtI1eIaHkXB14=\n-----END AGE ENCRYPTED FILE-----\n"
}
]
}
],
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": null,
"lastmodified": "2024-10-21T21:56:18Z",
"mac": "ENC[AES256_GCM,data:U45wBUVGuj9v4OoDhHr4Y4DSncX771eyriboihbwqAllH8WpPCVTHCGdCPoUEIlDzzacnVVHd3cQqlT67i0uuh6OrAxKO7am8O/uO183I89m5PY7PLEfVq298l7XjxsQ+Kz4bbITlbi4SK3I1RXneEfptqS6RtrN3IaO3Tv1WZA=,iv:G/sTYQTuACeXRlNh9cniaHKNxp7Dex20TMN2L5BmAes=,tag:yG0JyN1mWgQw5OmZ6mB4hA==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.0"
}
}

View File

@ -1,41 +0,0 @@
entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: :443
certificatesResolvers:
lets-encrypt:
acme:
email: jafner425@gmail.com
storage: acme.json
tlsChallenge: {}
lets-encrypt-dns01:
acme:
email: jafner425@gmail.com
storage: acme-dns01.json
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53"
api:
insecure: true
dashboard: true
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
watch: true
network: web
file:
directory: /config

View File

@ -137,6 +137,23 @@
${pkgs-unstable.nixgl.nixVulkanIntel}/bin/nixVulkanIntel ${pkgs-unstable.obs-studio}/bin/obs "$@"
'';
};
xdg.desktopEntries."obs" = {
name = "OBS Studio";
genericName = "Streaming/Recording Software";
type = "Application";
comment = "Free and Open Source Streaming/Recording Software";
categories = [ "AudioVideo" "Recorder" ];
exec = "nixGL obs";
icon = pkgs.fetchurl {
url = "https://upload.wikimedia.org/wikipedia/commons/d/d3/OBS_Studio_Logo.svg";
sha256 = "sha256-7kTlDSmknwahRiiSPZPU7Fs49q2ViSIPsI/1s8z8mIs=";
};
terminal = false;
settings = {
StartupNotify = true;
StartupWMClass = "obs";
};
};
programs.git = {
enable = true;
userName = "Joey Hafner";