at master 577 B view raw
1{ 2 ip4, 3 ip6, 4 extraConfig, 5}: 6{ 7 imports = [ 8 { 9 boot.kernel.sysctl = { 10 "net.ipv6.conf.all.forwarding" = "1"; 11 "net.ipv6.conf.default.forwarding" = "1"; 12 "net.ipv4.ip_forward" = "1"; 13 }; 14 15 networking.useDHCP = false; 16 networking.interfaces.eth1 = { 17 ipv4.addresses = [ 18 { 19 address = ip4; 20 prefixLength = 24; 21 } 22 ]; 23 ipv6.addresses = [ 24 { 25 address = ip6; 26 prefixLength = 64; 27 } 28 ]; 29 }; 30 } 31 extraConfig 32 ]; 33}