summaryrefslogtreecommitdiff
path: root/os/srv/firewall.nix
blob: bc06ffef880e8faa8b22b2b5f6fa66889121f5e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ config, lib, ... }:
let
  cfg = config.os.srv.firewall;
in
{
  options.os.srv.firewall = {
    enable = lib.mkEnableOption "enables the nixos firewall and nftables";
  };

  config = lib.mkIf cfg.enable {
    networking = {
      firewall.enable = true;
      nftables.enable = true;
    };
  };
}