extract bridge to module-based services
This commit is contained in:
22
modules/bridge/primary.nix
Normal file
22
modules/bridge/primary.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
liminix
|
||||
, lib
|
||||
}:
|
||||
let
|
||||
inherit (liminix.networking) interface;
|
||||
inherit (liminix.lib) typeChecked;
|
||||
inherit (lib) mkOption types;
|
||||
t = {
|
||||
ifname = mkOption {
|
||||
type = types.str;
|
||||
description = "interface name for the bridge device";
|
||||
};
|
||||
};
|
||||
in
|
||||
params:
|
||||
let
|
||||
inherit (typeChecked "bridge" t params) ifname;
|
||||
in interface {
|
||||
device = ifname;
|
||||
type = "bridge";
|
||||
}
|
Reference in New Issue
Block a user