Fix monitoring firewall rules for hamilton
Only relevant until #29 is merged
This commit is contained in:
parent
1f168fe646
commit
9c44d7d0fe
1 changed files with 6 additions and 1 deletions
|
@ -8,6 +8,11 @@
|
|||
inherit (lib) escapeRegex;
|
||||
inherit (config.networking) fqdn hostName;
|
||||
|
||||
# Absolute hack until https://github.com/chaos-jetzt/chaos-jetzt-nixfiles/pull/29 is merged
|
||||
# But needed for us to have a working monitoring on our main matrix server (kinda important)
|
||||
# FIXME: Remove when #29 is merged
|
||||
monIf = if config.networking.hostName == "hamilton" then "enp7s0" else "ens10";
|
||||
|
||||
# Basically a manual list of (legacy) hosts not yet migrated to NixOS
|
||||
# but on which we'd like to have included in the monitoring.
|
||||
externalTargets = let
|
||||
|
@ -124,7 +129,7 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
networking.firewall.interfaces.ens10.allowedTCPPorts = let
|
||||
networking.firewall.interfaces.${monIf}.allowedTCPPorts = let
|
||||
inherit (config.services) prometheus;
|
||||
ifEnabled = x: lib.optional x.enable x.port;
|
||||
in (
|
||||
|
|
Loading…
Reference in a new issue