mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 16:57:55 +00:00
21 lines
395 B
Nix
21 lines
395 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
let
|
||
|
cfg = config.shared-setups.server.firewall;
|
||
|
in
|
||
|
{
|
||
|
options.shared-setups.server.firewall.enable = lib.mkEnableOption "typical firewall setup";
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
networking = {
|
||
|
nftables.enable = true;
|
||
|
firewall = {
|
||
|
enable = true;
|
||
|
allowedTCPPorts = [
|
||
|
22 # Secure Shells.
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|