1
0
liminix/modules/bridge/primary.nix

17 lines
268 B
Nix
Raw Normal View History

{
liminix,
lib,
}:
{ ifname }:
let
2024-06-29 21:59:27 +00:00
inherit (liminix.services) oneshot;
in
oneshot rec {
name = "${ifname}.link";
up = ''
ip link add name ${ifname} type bridge
${liminix.networking.ifup name ifname}
'';
down = "ip link set down dev ${ifname}";
}