convert bridge service to serviceDefn
This commit is contained in:
parent
f82501d278
commit
93e04bb834
4 changed files with 25 additions and 33 deletions
|
@ -2,21 +2,36 @@
|
|||
let
|
||||
inherit (lib) mkOption types;
|
||||
inherit (pkgs.liminix.services) oneshot;
|
||||
inherit (pkgs) liminix;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
system.service.bridge = {
|
||||
primary = mkOption {
|
||||
type = types.functionTo pkgs.liminix.lib.types.service;
|
||||
type = liminix.lib.types.serviceDefn;
|
||||
};
|
||||
members = mkOption {
|
||||
type = types.functionTo pkgs.liminix.lib.types.service;
|
||||
type = liminix.lib.types.serviceDefn;
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
system.service.bridge.primary = pkgs.callPackage ./primary.nix {};
|
||||
system.service.bridge.members = pkgs.callPackage ./members.nix {};
|
||||
kernel.config.BRIDGE = "y";
|
||||
config.system.service.bridge = {
|
||||
primary = liminix.callService ./primary.nix {
|
||||
ifname = mkOption {
|
||||
type = types.str;
|
||||
description = "interface name for the bridge device";
|
||||
};
|
||||
};
|
||||
members = liminix.callService ./members.nix {
|
||||
members = mkOption {
|
||||
type = types.listOf liminix.lib.types.service;
|
||||
description = "interfaces to add to the bridge";
|
||||
};
|
||||
primary = mkOption {
|
||||
type = liminix.lib.types.service;
|
||||
description = "bridge interface to add them to";
|
||||
};
|
||||
};
|
||||
};
|
||||
config.kernel.config.BRIDGE = "y";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue