convert network link/address to module-based-service
... 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
This commit is contained in:
@@ -15,21 +15,29 @@ let
|
||||
in
|
||||
{
|
||||
options = {
|
||||
system.service.bridge = mkOption {
|
||||
type = liminix.lib.types.serviceDefn;
|
||||
system.service.bridge = {
|
||||
primary = mkOption { type = liminix.lib.types.serviceDefn; };
|
||||
members = mkOption { type = liminix.lib.types.serviceDefn; };
|
||||
};
|
||||
};
|
||||
config.system.service = {
|
||||
bridge = liminix.callService ./service.nix {
|
||||
members = mkOption {
|
||||
type = types.listOf liminix.lib.types.service;
|
||||
description = "interfaces to add to the bridge";
|
||||
};
|
||||
config.system.service.bridge = {
|
||||
primary = liminix.callService ./primary.nix {
|
||||
ifname = mkOption {
|
||||
type = types.str;
|
||||
description = "bridge interface name to create";
|
||||
};
|
||||
};
|
||||
members = liminix.callService ./members.nix {
|
||||
primary = mkOption {
|
||||
type = liminix.lib.types.interface;
|
||||
description = "primary bridge interface";
|
||||
};
|
||||
|
||||
members = mkOption {
|
||||
type = types.listOf liminix.lib.types.interface;
|
||||
description = "interfaces to add to the bridge";
|
||||
};
|
||||
};
|
||||
};
|
||||
config.kernel.config.BRIDGE = "y";
|
||||
}
|
||||
|
Reference in New Issue
Block a user