enable multiple server profiles on hypervisor

This commit is contained in:
Dmitriy Kholkin 2024-12-28 11:44:59 +03:00
parent ceea442d76
commit ffbbeee9f7
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
3 changed files with 49 additions and 10 deletions

View File

@ -1,6 +1,5 @@
{ inputs, lib, pkgs, config, ... }: { inputs, lib, pkgs, config, ... }:
let persistRoot = config.autoinstall.persist.persistRoot or "/persist"; {
in {
imports = with inputs.self; [ imports = with inputs.self; [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
inputs.srvos.nixosModules.server inputs.srvos.nixosModules.server
@ -29,8 +28,8 @@ in {
customProfiles.gitea customProfiles.gitea
# customProfiles.homepage # customProfiles.homepage
# customProfiles.hoyolab # customProfiles.hoyolab
# customProfiles.inpx-web customProfiles.inpx-web
# customProfiles.it-tools customProfiles.it-tools
customProfiles.media-stack customProfiles.media-stack
# customProfiles.metrics # customProfiles.metrics
# customProfiles.minio # customProfiles.minio
@ -46,8 +45,8 @@ in {
customProfiles.tinyproxy customProfiles.tinyproxy
# customProfiles.vault # customProfiles.vault
customProfiles.vaultwarden customProfiles.vaultwarden
# customProfiles.webhooks customProfiles.webhooks
# customProfiles.wiki customProfiles.wiki
# customProfiles.yandex-db # customProfiles.yandex-db
# (import customProfiles.blocky { # (import customProfiles.blocky {

View File

@ -1,7 +1,8 @@
{ ... }: { pkgs, ... }:
{ {
services.nginx = { services.nginx = {
enable = true; enable = true;
package = pkgs.nginxQuic;
group = "acme"; group = "acme";
recommendedBrotliSettings = true; recommendedBrotliSettings = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
@ -29,7 +30,6 @@
in { in {
"media-stack" = { "media-stack" = {
serverAliases = [ serverAliases = [
"jellyfin.ataraxiadev.com"
"qbit.ataraxiadev.com" "qbit.ataraxiadev.com"
"prowlarr.ataraxiadev.com" "prowlarr.ataraxiadev.com"
"jackett.ataraxiadev.com" "jackett.ataraxiadev.com"
@ -61,11 +61,33 @@
'' + proxySettings; '' + proxySettings;
}; };
} // default; } // default;
"ataraxiadev.com" = { "jellyfin.ataraxiadev.com" = {
locations."/" = {
proxyPass = "http://127.0.0.1:8180";
extraConfig = ''
proxy_buffering off;
'' + proxySettings;
};
locations."/socket" = {
proxyPass = "http://127.0.0.1:8180";
proxyWebsockets = true;
extraConfig = proxySettings;
};
extraConfig = '' extraConfig = ''
return 301 https://code.ataraxiadev.com$request_uri; client_max_body_size 50M;
''; '';
} // default; } // default;
"ataraxiadev.com" = {
locations."/" = {
root = "/srv/http/ataraxiadev.com/docroot";
extraConfig = ''
try_files $uri $uri/ =404;
'';
};
locations."/hooks" = {
proxyPass = "http://127.0.0.1:9510/hooks";
};
} // default;
"cal.ataraxiadev.com" = { "cal.ataraxiadev.com" = {
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:5232"; proxyPass = "http://127.0.0.1:5232";
@ -78,6 +100,17 @@
extraConfig = proxySettings; extraConfig = proxySettings;
}; };
} // default; } // default;
"lib.ataraxiadev.com" = {
locations."/" = {
proxyPass = "http://127.0.0.1:8072";
proxyWebsockets = true;
};
} // default;
"tools.ataraxiadev.com" = {
locations."/" = {
proxyPass = "http://127.0.0.1:8070";
};
} // default;
"vw.ataraxiadev.com" = { "vw.ataraxiadev.com" = {
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:8812"; proxyPass = "http://127.0.0.1:8812";
@ -93,8 +126,14 @@
extraConfig = proxySettings; extraConfig = proxySettings;
}; };
} // default; } // default;
"wiki.ataraxiadev.com" = {
locations."/" = {
proxyPass = "http://127.0.0.1:8190";
};
} // default;
}; };
}; };
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 80 443 ];
} }

View File

@ -56,6 +56,7 @@ let
in { in {
services.nginx = { services.nginx = {
enable = true; enable = true;
package = pkgs.nginxQuic;
group = "acme"; group = "acme";
recommendedBrotliSettings = true; recommendedBrotliSettings = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;