otbr
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11";
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
|
|
||||||
|
nixpkgs-otbr.url = "github:mrene/nixpkgs/openthread-border-router";
|
||||||
|
|
||||||
home-manager-stable = {
|
home-manager-stable = {
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||||
|
|||||||
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