first commit

This commit is contained in:
emptyynes 2025-09-17 16:39:03 +07:00
commit 21737592da
27 changed files with 744 additions and 0 deletions

View file

@ -0,0 +1,48 @@
{ config, pkgs, ... }:
{
security.acme.defaults.email = "porject-a@project-a.space";
security.acme.acceptTerms = true;
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
defaultSSLListenPort = 444;
virtualHosts = {
"git.project-a.space" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:3000";
};
};
};
streamConfig = ''
map $ssl_preread_server_name $name {
git.project-a.space git;
default marzban;
}
upstream git {
server 127.0.0.1:444;
}
upstream marzban {
server 127.0.0.1:1080;
}
server {
listen 0.0.0.0:443;
listen [::0]:443;
proxy_pass $name;
ssl_preread on;
proxy_connect_timeout 1s;
proxy_timeout 1h;
proxy_buffer_size 16k;
}
'';
};
}