make a package for odhcpc-script

This commit is contained in:
Daniel Barlow 2023-06-30 20:02:03 +01:00
parent b6e72504d6
commit 9aa5ff6ed1
4 changed files with 6 additions and 2 deletions

View file

@ -284,13 +284,12 @@ in rec {
services.dhcp6 =
let
name = "dhcp6c.wan";
luafile = writeFennelScript "odhcpc-script" [] ./odhcp6-script.fnl;
in longrun {
inherit name;
notification-fd = 10;
run = ''
export SERVICE_STATE=/run/service-state/${name}
${pkgs.odhcp6c}/bin/odhcp6c -s ${luafile} -e -v -p /run/${name}.pid -P 48 $(output ${services.wan} ifname)
${pkgs.odhcp6c}/bin/odhcp6c -s ${pkgs.odhcp-script} -e -v -p /run/${name}.pid -P 48 $(output ${services.wan} ifname)
)
'';
dependencies = [ services.wan ];

View file

@ -55,4 +55,5 @@
hi = callPackage ./hi {};
firewallgen = callPackage ./firewallgen {};
kernel-modules = callPackage ./kernel-modules {};
odhcp-script = callPackage ./odhcp-script {};
}

View file

@ -0,0 +1,4 @@
{
writeFennelScript
}:
writeFennelScript "odhcpc-script" [] ./odhcp6-script.fnl