2024-03-16 21:41:13 +01:00
|
|
|
{ ifwait, liminix } :
|
|
|
|
{
|
|
|
|
state
|
|
|
|
, interface
|
|
|
|
, service
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (liminix.services) longrun;
|
|
|
|
in longrun {
|
|
|
|
name = "ifwait.${interface.name}";
|
|
|
|
buildInputs = [ service ];
|
2024-04-04 00:07:56 +02:00
|
|
|
isTrigger = true;
|
2024-03-16 21:41:13 +01:00
|
|
|
run = ''
|
|
|
|
${ifwait}/bin/ifwait -s ${service.name} $(output ${interface} ifname) ${state}
|
|
|
|
'';
|
|
|
|
}
|