forked from DGNum/liminix
31f0213b6f
... and make bridge use it. We also had to convert bridge back into a pair of services. Downstreams want to depend on the bridge it self being configured even if not necessarily all the members are up. e.g. don't want to break ssh on lan if there's a misconfigured wlan device
16 lines
291 B
Nix
16 lines
291 B
Nix
{
|
|
liminix
|
|
, ifwait
|
|
, serviceFns
|
|
, lib
|
|
}:
|
|
{ifname, mtu} :
|
|
let
|
|
inherit (liminix.services) longrun oneshot;
|
|
inherit (lib) concatStringsSep;
|
|
name = "${ifname}.link";
|
|
up = liminix.networking.ifup name ifname;
|
|
in oneshot {
|
|
inherit name up;
|
|
down = "ip link set down dev ${ifname}";
|
|
}
|