some formatting

This commit is contained in:
2025-01-22 16:38:15 -06:00
parent e1be43a0a5
commit cdd9dac355
25 changed files with 29 additions and 57 deletions

View File

@@ -6,7 +6,6 @@ in
{
options.my.servers.audiobookshelf = setup.mkOptions "audiobookshelf" "audiobooks" 5687;
config = {
my.servers.audiobookshelf.ip = "127.0.0.3";
services = {
audiobookshelf = lib.mkIf cfg.enable {
inherit (cfg) port;
@@ -14,22 +13,7 @@ in
host = cfg.ip;
group = "piracy";
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
setup.proxy {
"/" = {
proxyPass = cfg.local;
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_redirect http:// https://;
'';
};
}
);
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
};
};
}