mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
fix(nftables): local firewall
This commit is contained in:
parent
6dc06a746a
commit
a283b4bf9a
9 changed files with 167 additions and 41 deletions
|
|
@ -10,7 +10,7 @@ let
|
|||
inherit (lib.lists) optionals;
|
||||
inherit (config.services) tailscale;
|
||||
inherit (config.services.nginx) virtualHosts;
|
||||
inherit (config.networking.access) cidrForNetwork;
|
||||
inherit (config.networking.access) cidrForNetwork localaddrs;
|
||||
access = config.services.nginx.access.ldap;
|
||||
allows = let
|
||||
mkAllow = cidr: "allow ${cidr};";
|
||||
|
|
@ -18,7 +18,9 @@ let
|
|||
cidrForNetwork.loopback.all
|
||||
++ cidrForNetwork.local.all
|
||||
++ optionals tailscale.enable cidrForNetwork.tail.all;
|
||||
allows = concatMapStringsSep "\n" mkAllow allowAddresses;
|
||||
allows = concatMapStringsSep "\n" mkAllow allowAddresses + optionalString localaddrs.enable ''
|
||||
include ${localaddrs.stateDir}/*.nginx.conf;
|
||||
'';
|
||||
in ''
|
||||
${allows}
|
||||
deny all;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ in {
|
|||
'';
|
||||
};
|
||||
extraConfig = ''
|
||||
client_max_body_size 2048M;
|
||||
client_max_body_size 16384M;
|
||||
'';
|
||||
in {
|
||||
${access.domain} = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue