nix/modules/system/hardware/firewall.nix

25 lines
404 B
Nix
Raw Permalink Normal View History

{ config, lib, ... }:
2024-03-12 21:24:29 +01:00
with lib;
let
cfg = config.settings.hardware.firewall;
in {
options = {
settings.hardware.firewall.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable firewall
'';
};
};
config = mkIf cfg.enable {
networking.firewall = {
enable = true;
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
};
2024-03-12 21:24:29 +01:00
};
}