forked from DGNum/liminix
implement ifwait trigger service and use in bridge
should we convert all ifwait uses to this trigger too? seems reasonable
This commit is contained in:
parent
fad0a47b75
commit
28a5dec7dd
5 changed files with 91 additions and 14 deletions
15
modules/ifwait/ifwait.nix
Normal file
15
modules/ifwait/ifwait.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ 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}
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue