default.nix (1696B)
1 ## DHCP6 client module 2 ## =================== 3 ## 4 ## This is for use if you have an IPv6-capable upstream that provides 5 ## address information and/or prefix delegation using DHCP6. It 6 ## provides a service to request address information in the form of a 7 ## DHCP lease, and two dependent services that listen for updates 8 ## to the DHCP address information and can be used to update 9 ## addresses of network interfaces that you want to assign those 10 ## prefixes to 11 12 { lib, pkgs, config, ...}: 13 let 14 inherit (lib) mkOption types; 15 inherit (pkgs.liminix.services) oneshot; 16 inherit (pkgs) liminix; 17 in 18 { 19 options = { 20 system.service.dhcp6c = { 21 client = mkOption { type = liminix.lib.types.serviceDefn; }; 22 prefix = mkOption { type = liminix.lib.types.serviceDefn; }; 23 address = mkOption { type = liminix.lib.types.serviceDefn; }; 24 }; 25 }; 26 config.system.service.dhcp6c = { 27 client = liminix.callService ./client.nix { 28 interface = mkOption { 29 type = liminix.lib.types.interface; 30 description = "interface (usually WAN) to query for DHCP6"; 31 }; 32 }; 33 address = liminix.callService ./address.nix { 34 client = mkOption { 35 type = types.anything; # liminix.lib.types.service; 36 }; 37 interface = mkOption { 38 type = liminix.lib.types.interface; 39 description = "interface to assign the address to"; 40 }; 41 }; 42 prefix = liminix.callService ./prefix.nix { 43 client = mkOption { 44 type = types.anything; # liminix.lib.types.service; 45 }; 46 interface = mkOption { 47 type = liminix.lib.types.interface; 48 description = "interface to assign <prefix>::1 to"; 49 }; 50 }; 51 }; 52 }