2 Commits

Author SHA1 Message Date
Danilo Reyes
ee11d72de8 domain sandbox 2026-02-05 04:16:21 -06:00
Danilo Reyes
dce2142794 proper ip assignation for nginx 2026-02-05 03:39:27 -06:00
5 changed files with 12 additions and 17 deletions

View File

@@ -3,12 +3,13 @@ let
inherit (inputs.self.lib) inherit (inputs.self.lib)
enableList enableList
mkEnabled mkEnabled
mkEnabledProxy
mkEnabledWithUsers mkEnabledWithUsers
; ;
mkEnabledProxyIp = inputs.self.lib.mkEnabledProxyIp config.my.ips.wg-server; wgServerIp = config.my.ips.wg-server;
mkEnabledProxyIp = inputs.self.lib.mkEnabledProxyIp wgServerIp;
in in
{ {
domain = "servidos.lat";
enableProxy = true; enableProxy = true;
enableContainers = true; enableContainers = true;
apps.dictionaries.enable = true; apps.dictionaries.enable = true;
@@ -33,9 +34,11 @@ in
}; };
nextcloud = { nextcloud = {
enableProxy = true; enableProxy = true;
ip = wgServerIp;
port = 8081;
}; };
} }
// enableList mkEnabledProxy [ // enableList mkEnabledProxyIp [
"bazarr" "bazarr"
"collabora" "collabora"
"gitea" "gitea"
@@ -53,8 +56,6 @@ in
"radarr" "radarr"
"sonarr" "sonarr"
"yamtrack" "yamtrack"
]
// enableList mkEnabledProxyIp [
"audiobookshelf" "audiobookshelf"
"isso" "isso"
"keycloak" "keycloak"

View File

@@ -74,7 +74,7 @@ in
}; };
mainServer = lib.mkOption { mainServer = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "vps"; default = "server";
description = "The hostname of the main server."; description = "The hostname of the main server.";
}; };
postgresSocket = lib.mkOption { postgresSocket = lib.mkOption {

View File

@@ -167,7 +167,7 @@ in
forceSSL = false; # vps forceSSL = false; # vps
enableACME = false; # vps enableACME = false; # vps
http2 = false; # vps http2 = false; # vps
# default = true; #vps default = true; # vps
#vps #vps
listen = [ listen = [
{ {
@@ -261,7 +261,7 @@ in
collabora = lib.mkIf cfgC.enable { collabora = lib.mkIf cfgC.enable {
autoStart = true; autoStart = true;
image = "collabora/code:latest"; image = "collabora/code:latest";
ports = [ "9980:9980" ]; ports = [ "${toString cfgC.port}:${toString cfgC.port}" ];
environment = { environment = {
TZ = config.my.timeZone; TZ = config.my.timeZone;
domain = cfg.host; domain = cfg.host;

View File

@@ -40,7 +40,7 @@ in
secure = true; secure = true;
expire = "168h"; expire = "168h";
refresh = "1h"; refresh = "1h";
domain = ".lebubu.org"; domain = ".${config.my.domain}";
secret = config.sops.secrets.oauth2-proxy-cookie.path; secret = config.sops.secrets.oauth2-proxy-cookie.path;
}; };
extraConfig = { extraConfig = {
@@ -53,7 +53,7 @@ in
session-store-type = "cookie"; session-store-type = "cookie";
skip-provider-button = true; skip-provider-button = true;
code-challenge-method = "S256"; code-challenge-method = "S256";
whitelist-domain = [ ".lebubu.org" ]; whitelist-domain = [ ".${config.my.domain}" ];
}; };
}; };
}; };

View File

@@ -196,16 +196,10 @@ in
inherit ip; inherit ip;
}; };
}; };
mkEnabledProxy = name: {
inherit name;
value = {
enableProxy = true;
};
};
mkEnabledProxyIp = ip: name: { mkEnabledProxyIp = ip: name: {
inherit name; inherit name;
value = { value = {
enable = true; enableProxy = true;
inherit ip; inherit ip;
}; };
}; };