at 23.05-pre 487 B view raw
1{ lib, ... }: { ip4, ip6, extraConfig }: 2lib.mkMerge [ 3 { 4 boot.kernel.sysctl = { 5 "net.ipv6.conf.all.forwarding" = "1"; 6 "net.ipv6.conf.default.forwarding" = "1"; 7 "net.ipv4.ip_forward" = "1"; 8 }; 9 10 networking.useDHCP = false; 11 networking.interfaces.eth1 = { 12 ipv4.addresses = [{ 13 address = ip4; 14 prefixLength = 24; 15 }]; 16 ipv6.addresses = [{ 17 address = ip6; 18 prefixLength = 64; 19 }]; 20 }; 21 } 22 extraConfig 23]