anubis test

This commit is contained in:
Vinzenz Schroeter 2025-09-06 20:28:38 +02:00
parent 857471d3db
commit 88f192d38d

View file

@ -1,30 +1,66 @@
_: { { inputs, pkgs, ... }:
services.nginx = { let
enable = true; blog-domain-socket = "/run/nginx/blog.sock";
anubis-domain-socket = "/run/anubis/anubis-blog.sock";
in
{
users.groups = {
anubis.members = [ "nginx" ];
nginx.members = [ "anubis" ];
};
services = {
nginx = {
enable = true;
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;
virtualHosts = { virtualHosts = {
"vinzenz-lpt2" = { #"vinzenz-lpt2" = {
locations."/" = { # locations."/" = {
proxyPass = "http://127.0.0.1:3000/"; # proxyPass = "http://127.0.0.1:3000/";
proxyWebsockets = true; # proxyWebsockets = true;
# };
#
# serverAliases = [ "172.23.42.96" ];
#};
"vinzenz-lpt2" = {
locations."/" = {
proxyPass = ("http://unix:" + anubis-domain-socket);
};
}; };
serverAliases = [ "172.23.42.96" ]; "vinzenz-lpt2-in-anubis" = {
root = inputs.zerforschen-plus.packages."${pkgs.system}".zerforschen-plus-content;
listen = [
{
addr = ("unix:" + blog-domain-socket);
}
];
};
};
};
#networking.firewall = {
# allowedTCPPorts = [
# 80
# 8001
# 3000
# ];
# allowedUDPPorts = [ 2342 ];
#};
anubis = {
instances.main = {
enable = true;
settings = {
BIND = anubis-domain-socket;
TARGET = "unix://" + blog-domain-socket;
};
}; };
}; };
}; };
networking.firewall = {
allowedTCPPorts = [
80
8001
3000
];
allowedUDPPorts = [ 2342 ];
};
} }