File tree Expand file tree Collapse file tree
System/Lenovo-Laptop/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22{
33 # Don't wait for online.
44 systemd . services . NetworkManager-wait-online . enable = false ;
5+ boot . initrd . systemd . network . wait-online . enable = false ;
6+ systemd . network . wait-online . enable = false ;
57
68 networking = {
79 firewall = config . hm-config . firewall // {
810 enable = true ;
11+ extraCommands = ''
12+ # Delete the accept rule for nixos-fw-accept
13+ ip6tables -D nixos-fw-accept -j ACCEPT
14+
15+ # Delete critical rules that redirect to nixos-fw-accept
16+ ip6tables -D nixos-fw -i lo -j nixos-fw-accept
17+ ip6tables -D nixos-fw -m conntrack --ctstate RELATED,ESTABLISHED -j nixos-fw-accept
18+ ip6tables -D nixos-fw -p ipv6-icmp -j nixos-fw-accept
19+ ip6tables -D nixos-fw -d fe80::/64 -p udp --dport 546 -j nixos-fw-accept
20+ ip6tables -D nixos-fw -i podman0 -p udp --dport 53 -j nixos-fw-accept
21+
22+ # Add the critical rules back, with ACCEPT
23+ ip6tables -A nixos-fw -i lo -j ACCEPT
24+ ip6tables -A nixos-fw -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
25+ ip6tables -A nixos-fw -p ipv6-icmp -j ACCEPT
26+ ip6tables -A nixos-fw -d fe80::/64 -p udp --dport 546 -j ACCEPT
27+ ip6tables -A nixos-fw -i podman0 -p udp --dport 53 -j ACCEPT
28+
29+ # Set DROP rule for nixos-fw-accept
30+ ip6tables -A nixos-fw-accept -j nixos-fw-log-refuse
31+ '' ;
932 } ;
1033 hostName = "lenovo-laptop" ;
1134 networkmanager . connectionConfig = {
You can’t perform that action at this time.
0 commit comments