2024-03-16 20:41:13 +00:00
|
|
|
{ ifwait, liminix } :
|
|
|
|
{
|
|
|
|
state
|
|
|
|
, interface
|
|
|
|
, service
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (liminix.services) longrun;
|
|
|
|
in longrun {
|
|
|
|
name = "ifwait.${interface.name}";
|
|
|
|
buildInputs = [ service ];
|
2024-06-16 11:58:06 +00:00
|
|
|
restart-on-upgrade = true;
|
2024-03-16 20:41:13 +00:00
|
|
|
run = ''
|
|
|
|
${ifwait}/bin/ifwait -s ${service.name} $(output ${interface} ifname) ${state}
|
|
|
|
'';
|
|
|
|
}
|