liminix/modules/network/link.nix

17 lines
291 B
Nix
Raw Normal View History

{
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}";
}