nixos-config/configs/nixos/plover/modules/services/firewall.nix
Gabriel Arazas 0760acb676
configs: consolidate NixOS and home-manager config into one configs folder
Now we're going beyond these structuring as we might have to accomodate
non-system configurations like Nixvim.
2024-01-15 07:45:43 +08:00

23 lines
446 B
Nix

{ config, lib, pkgs, ... }:
let
hostCfg = config.hosts.plover;
cfg = hostCfg.services.firewall;
in
{
options.hosts.plover.services.firewall.enable = lib.mkEnableOption "firewall setup";
config = lib.mkIf cfg.enable {
networking = {
nftables.enable = true;
domain = "foodogsquared.one";
firewall = {
enable = true;
allowedTCPPorts = [
22 # Secure Shells.
];
};
};
};
}