forked from DGNum/liminix
19 lines
366 B
Nix
19 lines
366 B
Nix
|
{
|
||
|
liminix
|
||
|
, ifwait
|
||
|
, lib
|
||
|
}:
|
||
|
{ primary, members } :
|
||
|
let
|
||
|
inherit (liminix.services) oneshot;
|
||
|
in oneshot {
|
||
|
name = "${primary.name}.oper";
|
||
|
up = ''
|
||
|
ip link set up dev $(output ${primary} ifname)
|
||
|
${ifwait}/bin/ifwait -v $(output ${primary} ifname) running
|
||
|
'';
|
||
|
down = "ip link set down dev $(output ${primary} ifname)";
|
||
|
|
||
|
dependencies = [ members ];
|
||
|
}
|