liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

client.nix (439B)


      1 {
      2   liminix
      3 , lib
      4 , odhcp6c
      5 , odhcp-script
      6 }:
      7 { interface } :
      8 let
      9   inherit (liminix.services) longrun;
     10   inherit (lib) mkOption types;
     11   name = "dhcp6c.${interface.name}";
     12 in longrun {
     13   inherit name;
     14   notification-fd = 10;
     15   run = ''
     16     export SERVICE_STATE=$SERVICE_OUTPUTS/${name}
     17     ${odhcp6c}/bin/odhcp6c -s ${odhcp-script} -e -v -p /run/${name}.pid -P0 $(output ${interface} ifname)
     18     )
     19   '';
     20   dependencies = [ interface ];
     21 }