This commit is contained in:
mjallen18
2026-01-12 15:11:47 -06:00
parent 37d472c7db
commit 42e771ef1f
2 changed files with 38 additions and 0 deletions

View File

@@ -3,6 +3,8 @@
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-otbr.url = "github:mrene/nixpkgs/openthread-border-router";
home-manager-stable = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs-stable";

View 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
];
}