2023-09-25 00:29:30 +02:00
|
|
|
{
|
|
|
|
liminix
|
|
|
|
, lib
|
|
|
|
, odhcp6c
|
|
|
|
, odhcp-script
|
|
|
|
}:
|
|
|
|
{ interface } :
|
|
|
|
let
|
|
|
|
inherit (liminix.services) longrun;
|
|
|
|
inherit (lib) mkOption types;
|
|
|
|
name = "dhcp6c.${interface.name}";
|
|
|
|
in longrun {
|
|
|
|
inherit name;
|
|
|
|
notification-fd = 10;
|
|
|
|
run = ''
|
2024-02-13 22:41:43 +01:00
|
|
|
export SERVICE_STATE=$SERVICE_OUTPUTS/${name}
|
2023-09-25 00:29:30 +02:00
|
|
|
${odhcp6c}/bin/odhcp6c -s ${odhcp-script} -e -v -p /run/${name}.pid -P0 $(output ${interface} ifname)
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
dependencies = [ interface ];
|
|
|
|
}
|