31 lines
558 B
Nix
Raw Normal View History

2024-12-20 22:37:44 -05:00
{
config,
lib,
...
}:
2024-12-20 21:06:04 -05:00
{
2024-12-20 22:37:44 -05:00
imports = [ ];
2024-12-20 21:06:04 -05:00
options.me = {
firewall.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install firewall.";
};
};
config = lib.mkIf config.me.firewall.enable {
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
22 # ssh
];
networking.firewall.allowedUDPPorts = [
5353 # mDNS
];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
};
2024-12-20 21:06:04 -05:00
}