otbr
This commit is contained in:
36
modules/nixos/homeassistant/services/thread/default.nix
Normal file
36
modules/nixos/homeassistant/services/thread/default.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ 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
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user