feat(compute01): init pages server #151

Open
Luj wants to merge 3 commits from init-dgnum-page into main
Showing only changes of commit 40b8b8eabc - Show all commits

View file

@ -36,7 +36,18 @@ let
in in
{ {
options.services.nginx.virtualHosts = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule {
config.extraConfig = ''
real_ip_header proxy_protocol;
set_real_ip_from 127.0.0.1;
'';
}
);
};
config = {
systemd.services.codeberg-pages = { systemd.services.codeberg-pages = {
inherit environment; inherit environment;
description = "Codeberg pages server"; description = "Codeberg pages server";
@ -81,6 +92,7 @@ in
ssl = false; ssl = false;
} }
]; ];
streamConfig = '' streamConfig = ''
map $ssl_preread_server_name $sni_upstream { map $ssl_preread_server_name $sni_upstream {
default 127.0.0.1:8010; default 127.0.0.1:8010;
@ -97,9 +109,7 @@ in
proxy_pass $sni_upstream; proxy_pass $sni_upstream;
proxy_protocol on; proxy_protocol on;
} }
''; '';
defaultSSLListenPort = 8446;
}; };
};
} }