This commit is contained in:
mjallen18
2026-01-12 15:13:02 -06:00
parent 42e771ef1f
commit 639ce36cb0
3 changed files with 50 additions and 20 deletions

View File

@@ -1,19 +1,25 @@
{ config, lib, ... }:
{ inputs, config, namespace, lib, pkgs, ... }:
let
inherit (lib.${namespace}) mkModule mkOpt mkBoolOpt;
name = "otbr";
cfg = config.${namespace}.services.${name};
otbrPackage = pkgs.callPackage "${inputs.nixpkgs-otbr}/pkgs/by-name/op/openthread-border-router/package.nix" { };
otbrConfig = lib.${namespace}.mkModule {
inherit config name;
description = "Openthread border router";
options = { };
options = {
restPort = mkOpt lib.types.int 8081 "";
};
moduleConfig = {
services.openthread-border-router = {
enable = true;
backboneInterface = "enp2s0";
package = otbrPackage;
rest = {
listenAddress = cfg.listenAddress;
listenPort = cfg.port;
listenPort = cfg.restPort;
};
web = {
listenAddress = cfg.listenAddress;