Refactor homelab ports

This commit is contained in:
Oliver Davies 2025-05-03 22:30:39 +01:00
parent 518bfe9cd4
commit f42833545b
10 changed files with 61 additions and 61 deletions

View file

@ -11,16 +11,13 @@ let
cfg = homelab.services.${service};
service = "tubearchivist";
homelab = config.homelab;
port = homelab.ports.${service};
in
{
options.homelab.services.${service} = {
enable = mkEnableOption "Enable ${service}";
port = mkOption {
default = 8099;
type = types.port;
};
url = mkOption {
default = "${service}.${homelab.domain}";
type = types.str;
@ -177,7 +174,7 @@ in
];
ports = [
"${toString cfg.port}:8000/tcp"
"${toString port}:8000/tcp"
];
dependsOn = [
@ -321,7 +318,7 @@ in
useACMEHost = homelab.domain;
locations."/" = {
proxyPass = "http://localhost:${toString cfg.port}";
proxyPass = "http://localhost:${toString port}";
recommendedProxySettings = true;
proxyWebsockets = true;