move config files to drive

This commit is contained in:
Satria 2026-04-16 21:51:10 +07:00
commit eb090161b8
2 changed files with 5 additions and 3 deletions

View file

@ -5,6 +5,7 @@
services = { services = {
jellyfin = { jellyfin = {
enable = true; enable = true;
dataDir = "/mnt/data/apps/jellyfin";
hardwareAcceleration = { hardwareAcceleration = {
enable = true; enable = true;
device = "/dev/dri/renderD128"; device = "/dev/dri/renderD128";
@ -43,4 +44,4 @@
# port = 8191; # port = 8191;
# }; # };
}; };
} }

View file

@ -1,4 +1,5 @@
{ pkgs, homelab, lib, ... }: let { pkgs, homelab, lib, ... }: let
htpasswd = "/mnt/data/apps/nginx/htpasswd";
exta-conf = '' exta-conf = ''
# proxy_set_header X-Auth-User $remote_user; # proxy_set_header X-Auth-User $remote_user;
proxy_read_timeout 600s; proxy_read_timeout 600s;
@ -60,7 +61,7 @@ in {
locations."/" = { locations."/" = {
proxyPass = cfg.dest; proxyPass = cfg.dest;
proxyWebsockets = true; proxyWebsockets = true;
basicAuthFile = if cfg.auth then "/var/lib/nginx/.htpasswd" else null; basicAuthFile = if cfg.auth then htpasswd else null;
extraConfig = exta-conf; extraConfig = exta-conf;
}; };
}) homelab.proxy.hosts; }) homelab.proxy.hosts;
@ -68,7 +69,7 @@ in {
traefik = { traefik = {
enable = true; enable = true;
dynamicConfigOptions = { dynamicConfigOptions = {
http.middlewares.auth.basicAuth.usersFile = "/var/lib/nginx/.htpasswd"; http.middlewares.auth.basicAuth.usersFile = htpasswd;
}; };
staticConfigOptions = { staticConfigOptions = {
entryPoints = { entryPoints = {