use custom local subdomains for prometheus and adguard webui
This commit is contained in:
parent
fb2b347ec0
commit
dababfe6ee
4 changed files with 31 additions and 3 deletions
|
@ -3,6 +3,22 @@
|
|||
lib,
|
||||
...
|
||||
}: {
|
||||
networking.firewall = let
|
||||
allowTcpFromVPNToDefaultPorts = [
|
||||
config.services.prometheus.port
|
||||
config.services.adguardhome.port
|
||||
];
|
||||
in {
|
||||
extraCommands = builtins.concatStringsSep "\n" (map
|
||||
(port: "iptables -A nixos-fw -p tcp -s ${config.vpnNamespaces."wg".namespaceAddress} --dport ${toString port} -j nixos-fw-accept")
|
||||
allowTcpFromVPNToDefaultPorts);
|
||||
extraStopCommands = builtins.concatStringsSep "\n" (
|
||||
map
|
||||
(port: "iptables -D nixos-fw -p tcp -s ${config.vpnNamespaces."wg".namespaceAddress} --dport ${toString port} -j nixos-fw-accept || true")
|
||||
allowTcpFromVPNToDefaultPorts
|
||||
);
|
||||
};
|
||||
|
||||
vpnNamespaces."wg" = {
|
||||
enable = true;
|
||||
wireguardConfigFile = config.sops.secrets.wireguard.path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue