otbr
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user