forked from DGNum/liminix
28a5dec7dd
should we convert all ifwait uses to this trigger too? seems reasonable
15 lines
281 B
Nix
15 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}
|
|
'';
|
|
}
|