1 { inputs, pkgs, lib, config, hosts, ... }:
3 inherit (config.users) users;
7 (inputs.julm-nix + "/nixos/profiles/networking/nftables.nix")
9 networking.firewall.enable = false;
10 security.lockKernelModules = false;
11 systemd.services.disable-kernel-module-loading.after = [ "nftables.service" ];
12 # sudo nft --check -f - <<<$(nix eval --raw .#nixosConfigurations.mermet.config.networking.nftables.ruleset >/tmp/nftables.txt)
13 networking.nftables = {
22 tcp dport ssh counter accept comment "SSH"
23 udp dport 60000-60100 counter accept comment "Mosh"
26 tcp dport ssh counter accept comment "SSH"
27 udp dport 60000-60100 counter accept comment "Mosh"
31 tcp dport { ssh, 2222 } counter accept comment "SSH"
32 tcp dport { http, https } counter accept comment "HTTP(S)"
33 udp dport ntp skuid ${users.systemd-timesync.name} counter accept comment "NTP"
34 tcp dport git counter accept comment "Git"