default.nix (1332B)
1 ## IPv6 Autoconfiguration 2 ## ====================== 3 ## 4 ## Enable IPv6 neighbour discovery for an interface and allow it 5 ## to participate in router solicitation/router advertisement. 6 ## 7 ## You need this if you want to get an IPv6 address (or addresses) 8 ## whether by stateless allocation (SLAAC) or by DHCP6. You don't 9 ## need this on interfaces that are members of bridges, because they 10 ## shouldn't have addresses of their own. 11 12 { 13 lib, 14 pkgs, 15 config, 16 ... 17 }: 18 let 19 inherit (lib) mkOption types; 20 inherit (pkgs) liminix; 21 in 22 { 23 options.system.service.ipv6.autoconfig = mkOption { 24 type = liminix.lib.types.serviceDefn; 25 }; 26 27 config.system.service.ipv6 = { 28 autoconfig = config.system.callService ./autoconfig.nix { 29 interface = mkOption { 30 type = liminix.lib.types.interface; 31 }; 32 role = mkOption { 33 description = "configure as host or router (controls whether accept_ra sis set)"; 34 type = types.enum [ 35 "host" 36 "router" 37 ]; 38 default = "host"; 39 }; 40 sysctl = mkOption { 41 type = types.attrsOf types.str; 42 description = "additional sysctl settings to apply to /proc/sys/net/ipv6/conf/<ifname>"; 43 default = { }; 44 example = { 45 dad_transmits = 1; 46 hop_limit = 64; 47 }; 48 }; 49 }; 50 }; 51 }