mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 18:09:06 +02:00
feat(dns,nginx): add some weird magic
This commit is contained in:
parent
ab03b23b45
commit
714a279fc2
8 changed files with 127 additions and 72 deletions
|
@ -36,17 +36,11 @@ rec {
|
|||
|
||||
mkVPNSubdomain = name: port: {
|
||||
luj.nginx.enable = true;
|
||||
security.acme.certs."${name}.luj".server = "https://ca.luj/acme/acme/directory";
|
||||
services.nginx.virtualHosts."${name}.luj" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${toString port}";
|
||||
extraConfig = ''
|
||||
allow 100.100.45.0/24;
|
||||
allow fd7a:115c:a1e0::/48;
|
||||
deny all;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue