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