1 { lib, hostName, ... }:
2 let netIface = "end0"; in
5 #networking/wireguard/intranet.nix
10 #wireless.enable = true;
12 #networkmanager.enable = true;
14 systemd.services.sshd.serviceConfig.LoadCredentialEncrypted = [
15 "host.key:${ssh/host.key.cred}"
19 settings.X11Forwarding = true;
22 #systemd.services.systemd-networkd.environment.SYSTEMD_LOG_LEVEL = "debug";
31 # Start a DHCP Client for IPv4 Addressing/Routing
34 # Accept Router Advertisements for Stateless IPv6 Autoconfiguraton (SLAAC)
36 IPv6PrivacyExtensions = true;
37 KeepConfiguration = "dhcp-on-stop";
40 RequiredForOnline = "no";
45 networking.nftables.ruleset = lib.mkAfter ''
48 iifname ${netIface} goto input-net
51 ip daddr 10.0.0.0/8 counter goto output-lan
52 ip daddr 172.16.0.0/12 counter goto output-lan
53 ip daddr 192.168.0.0/16 counter goto output-lan
54 ip daddr 224.0.0.0/3 counter goto output-lan
55 oifname ${netIface} jump output-net
56 oifname ${netIface} log level warn prefix "output-net: " counter drop
59 meta l4proto { udp, tcp } th dport bootps counter accept comment "DHCP"
64 oifname ${netIface} masquerade