switch laptop config

This commit is contained in:
ParkerTenBroeck 2026-05-23 23:30:27 -04:00
parent 079b1eb5d6
commit 3a429b7fe1
10 changed files with 118 additions and 14 deletions

View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
let
in
{
networking.firewall = {
# if packets are still dropped, they will show up in dmesg
logReversePathDrops = true;
# wireguard trips rpfilter up
extraCommands = ''
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
'';
extraStopCommands = ''
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
'';
allowedUDPPorts = [ 51820 ];
};
}