extract bridge to module-based services

This commit is contained in:
Daniel Barlow
2023-07-20 11:46:19 +01:00
parent 86e73317ee
commit 9b70fd62f6
4 changed files with 88 additions and 23 deletions

View File

@@ -0,0 +1,22 @@
{ lib, pkgs, config, ...}:
let
inherit (lib) mkOption types;
inherit (pkgs.liminix.services) oneshot;
in
{
options = {
system.service.bridge = {
primary = mkOption {
type = types.functionTo pkgs.liminix.lib.types.service;
};
members = mkOption {
type = types.functionTo pkgs.liminix.lib.types.service;
};
};
};
config = {
system.service.bridge.primary = pkgs.callPackage ./primary.nix {};
system.service.bridge.members = pkgs.callPackage ./members.nix {};
kernel.config.BRIDGE = "y";
};
}