this is the dhcp6c service we want

This commit is contained in:
Daniel Barlow
2023-09-24 23:29:30 +01:00
parent 1673a71831
commit c59a228955
11 changed files with 163 additions and 60 deletions

21
modules/dhcp6c/client.nix Normal file
View File

@@ -0,0 +1,21 @@
{
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 = ''
export SERVICE_STATE=/run/service-state/${name}
${odhcp6c}/bin/odhcp6c -s ${odhcp-script} -e -v -p /run/${name}.pid -P0 $(output ${interface} ifname)
)
'';
dependencies = [ interface ];
}