liminix

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

ifwait.nix (321B)


      1 { ifwait, liminix }:
      2 {
      3   state,
      4   interface,
      5   service,
      6 }:
      7 let
      8   inherit (liminix.services) longrun;
      9 in
     10 longrun {
     11   name = "ifwait.${interface.name}-${state}";
     12   buildInputs = [ service ];
     13   restart-on-upgrade = true;
     14   run = ''
     15     ${ifwait}/bin/ifwait -s ${service.name}  $(output ${interface} ifname) ${state}
     16   '';
     17 }