forked from DGNum/liminix
16 lines
281 B
Nix
16 lines
281 B
Nix
|
{ ifwait, liminix } :
|
||
|
{
|
||
|
state
|
||
|
, interface
|
||
|
, service
|
||
|
}:
|
||
|
let
|
||
|
inherit (liminix.services) longrun;
|
||
|
in longrun {
|
||
|
name = "ifwait.${interface.name}";
|
||
|
buildInputs = [ service ];
|
||
|
run = ''
|
||
|
${ifwait}/bin/ifwait -s ${service.name} $(output ${interface} ifname) ${state}
|
||
|
'';
|
||
|
}
|