Files
nix-config/modules/nixos/homeassistant/services/thread/default.nix
mjallen18 42e771ef1f otbr
2026-01-12 15:11:47 -06:00

36 lines
907 B
Nix

{ config, lib, ... }:
let
name = "otbr";
cfg = config.${namespace}.services.${name};
otbrConfig = lib.${namespace}.mkModule {
inherit config name;
description = "Openthread border router";
options = { };
moduleConfig = {
services.openthread-border-router = {
enable = true;
backboneInterface = "enp2s0";
rest = {
listenAddress = cfg.listenAddress;
listenPort = cfg.port;
};
web = {
listenAddress = cfg.listenAddress;
listenPort = cfg.port;
};
radio = {
device = "/dev/serial/by-idusb-dresden_elektronik_Thread_RCP__ConBee_II__DE2475318-if00";
baudRate = 460800;
flowControl = true;
};
};
};
};
in
{
imports = [
"${inputs.nixpkgs-otbr}/nixos/modules/services/home-automation/openthread-border-router.nix"
otbrConfig
];
}