vps adjustments

This commit is contained in:
Danilo Reyes 2025-09-07 22:38:03 -06:00
parent ee75fed429
commit f181bcb2e2
7 changed files with 39 additions and 14 deletions

View File

@ -13,6 +13,7 @@
2049 # idk
9999 # stash
8384 # syncthing
5201 # vps speed test
config.my.servers.audiobookshelf.port
config.my.servers.bazarr.port
config.my.servers.collabora.port
@ -38,6 +39,7 @@
firewall = {
allowedTCPPorts = ports;
allowedUDPPorts = ports;
interfaces.wg0.allowedTCPPorts = [ 8081 ];
};
wireguard.interfaces.wg0 = {
ips = [ "10.77.0.2/32" ];

View File

@ -3,6 +3,13 @@ let
inherit name;
value.enable = true;
};
mkEnabledIp = name: {
inherit name;
value = {
enable = true;
ip = "10.77.0.2";
};
};
mkEnabledProxy = name: {
inherit name;
value = {
@ -46,7 +53,7 @@ in
"ffmpeg4discord"
"manage-library"
"library-report"
"update-dns"
# "update-dns" #vps
"stream-dl"
"pika-list"
"find-dup-episodes"
@ -68,7 +75,6 @@ in
# "stash"
# ]
# // enableList mkEnabledProxy [
"audiobookshelf"
"bazarr"
"collabora"
"homepage"
@ -84,7 +90,10 @@ in
"ryot"
"sonarr"
"synapse"
"vaultwarden"
"jellyfin"
]
// enableList mkEnabledIp [
"audiobookshelf"
"vaultwarden"
];
}

View File

@ -28,7 +28,7 @@
];
}
{
multi-scrobbpler = [
multi-scrobbler = [
{
abbr = "MS";
href = "https://scrobble.servidos.lat/";

View File

@ -21,9 +21,9 @@
}
{
openweathermap = {
label = "Celaya";
latitude = 20.5167;
longitude = -100.8167;
label = "Apodaca";
latitude = 25.760339;
longitude = -100.2190662;
units = "metric";
provider = "openweathermap";
cache = 5;

View File

@ -9,7 +9,7 @@ in
networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ];
sops.secrets = lib.mkIf cfg.enable { multi-scrobbler.sopsFile = ../../secrets/env.yaml; };
virtualisation.oci-containers.containers.multi-scrobbler = lib.mkIf cfg.enable {
image = "foxxmd/multi-scrobbler:0.9.1";
image = "foxxmd/multi-scrobbler:0.9.11";
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
environmentFiles = [ config.sops.secrets.multi-scrobbler.path ];
environment = {

View File

@ -79,7 +79,7 @@ in
services = {
nextcloud = {
enable = true;
https = true;
https = false; # vps
package = pkgs.nextcloud31;
appstoreEnable = true;
configureRedis = true;
@ -127,6 +127,7 @@ in
config.my.localhost
config.my.localhost6
config.my.routerip
"10.77.0.1" # vps
];
trusted_domains = [
config.my.ips.${config.networking.hostName}
@ -172,10 +173,22 @@ in
};
nginx.virtualHosts = {
"${cfg.host}" = lib.mkIf cfg.enableProxy {
forceSSL = true;
enableACME = true;
http2 = true;
default = true;
forceSSL = false; # vps
enableACME = false; # vps
http2 = false; # vps
# default = true; #vps
#vps
listen = [
{
addr = "10.77.0.2";
port = 8081;
}
{
addr = "127.0.0.1";
port = 8081;
}
];
#vps
serverAliases = [ "cloud.rotehaare.art" ];
locations = {
"/".proxyWebsockets = true;

View File

@ -20,7 +20,8 @@ in
package = pkgs.vaultwarden;
environmentFile = config.sops.secrets.vaultwarden.path;
config = {
ROCKET_ADDRESS = "${config.my.localhost}";
# ROCKET_ADDRESS = "${config.my.localhost}"; # VPS
ROCKET_ADDRESS = cfg.ip;
ROCKET_PORT = cfg.port;
WEBSOCKET_PORT = 8333;
DATABASE_URL = "postgresql:///${cfg.name}?host=${config.my.postgresSocket}";