vps adjustments
This commit is contained in:
parent
ee75fed429
commit
f181bcb2e2
@ -13,6 +13,7 @@
|
|||||||
2049 # idk
|
2049 # idk
|
||||||
9999 # stash
|
9999 # stash
|
||||||
8384 # syncthing
|
8384 # syncthing
|
||||||
|
5201 # vps speed test
|
||||||
config.my.servers.audiobookshelf.port
|
config.my.servers.audiobookshelf.port
|
||||||
config.my.servers.bazarr.port
|
config.my.servers.bazarr.port
|
||||||
config.my.servers.collabora.port
|
config.my.servers.collabora.port
|
||||||
@ -38,6 +39,7 @@
|
|||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = ports;
|
allowedTCPPorts = ports;
|
||||||
allowedUDPPorts = ports;
|
allowedUDPPorts = ports;
|
||||||
|
interfaces.wg0.allowedTCPPorts = [ 8081 ];
|
||||||
};
|
};
|
||||||
wireguard.interfaces.wg0 = {
|
wireguard.interfaces.wg0 = {
|
||||||
ips = [ "10.77.0.2/32" ];
|
ips = [ "10.77.0.2/32" ];
|
||||||
|
|||||||
@ -3,6 +3,13 @@ let
|
|||||||
inherit name;
|
inherit name;
|
||||||
value.enable = true;
|
value.enable = true;
|
||||||
};
|
};
|
||||||
|
mkEnabledIp = name: {
|
||||||
|
inherit name;
|
||||||
|
value = {
|
||||||
|
enable = true;
|
||||||
|
ip = "10.77.0.2";
|
||||||
|
};
|
||||||
|
};
|
||||||
mkEnabledProxy = name: {
|
mkEnabledProxy = name: {
|
||||||
inherit name;
|
inherit name;
|
||||||
value = {
|
value = {
|
||||||
@ -46,7 +53,7 @@ in
|
|||||||
"ffmpeg4discord"
|
"ffmpeg4discord"
|
||||||
"manage-library"
|
"manage-library"
|
||||||
"library-report"
|
"library-report"
|
||||||
"update-dns"
|
# "update-dns" #vps
|
||||||
"stream-dl"
|
"stream-dl"
|
||||||
"pika-list"
|
"pika-list"
|
||||||
"find-dup-episodes"
|
"find-dup-episodes"
|
||||||
@ -68,7 +75,6 @@ in
|
|||||||
# "stash"
|
# "stash"
|
||||||
# ]
|
# ]
|
||||||
# // enableList mkEnabledProxy [
|
# // enableList mkEnabledProxy [
|
||||||
"audiobookshelf"
|
|
||||||
"bazarr"
|
"bazarr"
|
||||||
"collabora"
|
"collabora"
|
||||||
"homepage"
|
"homepage"
|
||||||
@ -84,7 +90,10 @@ in
|
|||||||
"ryot"
|
"ryot"
|
||||||
"sonarr"
|
"sonarr"
|
||||||
"synapse"
|
"synapse"
|
||||||
"vaultwarden"
|
|
||||||
"jellyfin"
|
"jellyfin"
|
||||||
|
]
|
||||||
|
// enableList mkEnabledIp [
|
||||||
|
"audiobookshelf"
|
||||||
|
"vaultwarden"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
multi-scrobbpler = [
|
multi-scrobbler = [
|
||||||
{
|
{
|
||||||
abbr = "MS";
|
abbr = "MS";
|
||||||
href = "https://scrobble.servidos.lat/";
|
href = "https://scrobble.servidos.lat/";
|
||||||
|
|||||||
@ -21,9 +21,9 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
openweathermap = {
|
openweathermap = {
|
||||||
label = "Celaya";
|
label = "Apodaca";
|
||||||
latitude = 20.5167;
|
latitude = 25.760339;
|
||||||
longitude = -100.8167;
|
longitude = -100.2190662;
|
||||||
units = "metric";
|
units = "metric";
|
||||||
provider = "openweathermap";
|
provider = "openweathermap";
|
||||||
cache = 5;
|
cache = 5;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ in
|
|||||||
networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ];
|
networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ];
|
||||||
sops.secrets = lib.mkIf cfg.enable { multi-scrobbler.sopsFile = ../../secrets/env.yaml; };
|
sops.secrets = lib.mkIf cfg.enable { multi-scrobbler.sopsFile = ../../secrets/env.yaml; };
|
||||||
virtualisation.oci-containers.containers.multi-scrobbler = lib.mkIf cfg.enable {
|
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}" ];
|
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
||||||
environmentFiles = [ config.sops.secrets.multi-scrobbler.path ];
|
environmentFiles = [ config.sops.secrets.multi-scrobbler.path ];
|
||||||
environment = {
|
environment = {
|
||||||
|
|||||||
@ -79,7 +79,7 @@ in
|
|||||||
services = {
|
services = {
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
https = true;
|
https = false; # vps
|
||||||
package = pkgs.nextcloud31;
|
package = pkgs.nextcloud31;
|
||||||
appstoreEnable = true;
|
appstoreEnable = true;
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
@ -127,6 +127,7 @@ in
|
|||||||
config.my.localhost
|
config.my.localhost
|
||||||
config.my.localhost6
|
config.my.localhost6
|
||||||
config.my.routerip
|
config.my.routerip
|
||||||
|
"10.77.0.1" # vps
|
||||||
];
|
];
|
||||||
trusted_domains = [
|
trusted_domains = [
|
||||||
config.my.ips.${config.networking.hostName}
|
config.my.ips.${config.networking.hostName}
|
||||||
@ -172,10 +173,22 @@ in
|
|||||||
};
|
};
|
||||||
nginx.virtualHosts = {
|
nginx.virtualHosts = {
|
||||||
"${cfg.host}" = lib.mkIf cfg.enableProxy {
|
"${cfg.host}" = lib.mkIf cfg.enableProxy {
|
||||||
forceSSL = true;
|
forceSSL = false; # vps
|
||||||
enableACME = true;
|
enableACME = false; # vps
|
||||||
http2 = true;
|
http2 = false; # vps
|
||||||
default = true;
|
# default = true; #vps
|
||||||
|
#vps
|
||||||
|
listen = [
|
||||||
|
{
|
||||||
|
addr = "10.77.0.2";
|
||||||
|
port = 8081;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
addr = "127.0.0.1";
|
||||||
|
port = 8081;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
#vps
|
||||||
serverAliases = [ "cloud.rotehaare.art" ];
|
serverAliases = [ "cloud.rotehaare.art" ];
|
||||||
locations = {
|
locations = {
|
||||||
"/".proxyWebsockets = true;
|
"/".proxyWebsockets = true;
|
||||||
|
|||||||
@ -20,7 +20,8 @@ in
|
|||||||
package = pkgs.vaultwarden;
|
package = pkgs.vaultwarden;
|
||||||
environmentFile = config.sops.secrets.vaultwarden.path;
|
environmentFile = config.sops.secrets.vaultwarden.path;
|
||||||
config = {
|
config = {
|
||||||
ROCKET_ADDRESS = "${config.my.localhost}";
|
# ROCKET_ADDRESS = "${config.my.localhost}"; # VPS
|
||||||
|
ROCKET_ADDRESS = cfg.ip;
|
||||||
ROCKET_PORT = cfg.port;
|
ROCKET_PORT = cfg.port;
|
||||||
WEBSOCKET_PORT = 8333;
|
WEBSOCKET_PORT = 8333;
|
||||||
DATABASE_URL = "postgresql:///${cfg.name}?host=${config.my.postgresSocket}";
|
DATABASE_URL = "postgresql:///${cfg.name}?host=${config.my.postgresSocket}";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user