open mdns port in flake

This commit is contained in:
Robin Appelman 2022-07-10 23:22:21 +02:00
commit d2ee4300ab

View file

@ -70,10 +70,25 @@
example = true;
description = "enable docker integration";
};
openPort = mkOption rec {
type = types.bool;
default = false;
example = true;
description = "open port";
};
openMDNSPort = mkOption rec {
type = types.bool;
default = false;
example = true;
description = "open mdns port";
};
};
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [cfg.port];
networking.firewall.allowedTCPPorts = lib.optional cfg.openPort cfg.port;
networking.firewall.allowedUDPPorts = lib.optional cfg.openMDNSPort 5353;
users.groups.palantir = {};
users.groups.powermonitoring = {};