box,pwntie: setup rtlamr and rtlamr2mqtt (non-working)
This commit is contained in:
parent
8339ab6fe2
commit
63bde1fd09
@ -267,6 +267,7 @@
|
||||
spkgs.callPackage ./pkgs/ada_language_server.nix {inherit spkgs;};
|
||||
alire = spkgs.callPackage ./pkgs/alire.nix {inherit spkgs;};
|
||||
bearclaw = spkgs.callPackage ./pkgs/bearclaw.nix {inherit spkgs;};
|
||||
rtlamr = spkgs.callPackage ./pkgs/rtlamr.nix {inherit spkgs;};
|
||||
clilol = spkgs.callPackage ./pkgs/clilol.nix {inherit spkgs;};
|
||||
gqrss = spkgs.callPackage ./pkgs/gqrss.nix {
|
||||
inherit spkgs;
|
||||
|
@ -44,6 +44,12 @@
|
||||
owner = config.users.users.nginx.name;
|
||||
mode = "400";
|
||||
};
|
||||
rtlamr2mqtt = pkgs.fetchFromGitHub {
|
||||
owner = "allangood";
|
||||
repo = "rtlamr2mqtt";
|
||||
rev = "b2b05b9c16c396790913fd6f2ff11d5afdef4de8";
|
||||
hash = "sha256-bm348peVASsApjH+tUyFeF/gXltUNhssT7o+z20qnCc=";
|
||||
};
|
||||
in {
|
||||
_module.args.isUnstable = false;
|
||||
imports = [
|
||||
@ -51,6 +57,11 @@ in {
|
||||
#"${inputs.unstable}/nixos/modules/services/home-automation/home-assistant.nix"
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"C /var/lib/hass/custom_components/rtlamr2mqtt - - - - ${rtlamr2mqtt}"
|
||||
"Z /var/lib/hass/custom_components 770 hass hass - -"
|
||||
];
|
||||
|
||||
sops.secrets = {
|
||||
#nextcloud_db_pass = {
|
||||
# owner = config.users.users.nextcloud.name;
|
||||
@ -136,6 +147,7 @@ in {
|
||||
config.services.gitea.settings.server.SSH_PORT
|
||||
21063 #homekit
|
||||
21064 #homekit
|
||||
1883 # mosquitto
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
5353 #homekit
|
||||
@ -233,6 +245,17 @@ in {
|
||||
hardware.rtl-sdr.enable = true;
|
||||
|
||||
services = {
|
||||
mosquitto = {
|
||||
enable = true;
|
||||
listeners = [
|
||||
{
|
||||
acl = ["pattern readwrite #"];
|
||||
omitPasswordAuth = true;
|
||||
settings.allow_anonymous = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
avahi = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
@ -253,22 +276,38 @@ in {
|
||||
"aprs"
|
||||
"brother"
|
||||
"esphome"
|
||||
"rest"
|
||||
"ffmpeg"
|
||||
"homekit"
|
||||
"homekit_controller"
|
||||
"icloud"
|
||||
"jellyfin"
|
||||
"logger"
|
||||
"met"
|
||||
"prometheus"
|
||||
"mqtt"
|
||||
"nextdns"
|
||||
"prometheus"
|
||||
"pushover"
|
||||
"rest"
|
||||
"snmp"
|
||||
"zeroconf"
|
||||
|
||||
"logger"
|
||||
];
|
||||
config = {
|
||||
mqtt.sensor = [
|
||||
# {
|
||||
# name = "Gas Meter";
|
||||
# unique_id = "gas_meter";
|
||||
# state_topic = "readings/48582066/meter_reading";
|
||||
# icon = "mdi:gas-burner";
|
||||
# unit_of_measurement = "cu ft";
|
||||
# }
|
||||
# {
|
||||
# name = "Electric Meter";
|
||||
# unique_id = "electric_meter";
|
||||
# state_topic = "readings/20015637/meter_reading";
|
||||
# icon = "mdi:meter-electric-outline";
|
||||
# unit_of_measurement = "kWh";
|
||||
# }
|
||||
];
|
||||
logger = {
|
||||
default = "warning";
|
||||
logs = {
|
||||
|
@ -45,6 +45,8 @@ in {
|
||||
#nixpkgs.config.allowUnfree = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
rtl-sdr
|
||||
direwolf
|
||||
(callPackage ../../pkgs/rtlamr.nix {})
|
||||
];
|
||||
|
||||
#programs = {
|
||||
|
27
pkgs/rtlamr.nix
Normal file
27
pkgs/rtlamr.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
buildGoModule rec {
|
||||
pname = "rtlamr";
|
||||
version = "0.9.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bemasher";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-0LufLU/wTmCRqTnQBNJg5UnDv0u1Thec5FSWATWqZsQ=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-uT6zfsWgIot0EMNqwtwJNFXN/WaAyOGfcYJjuyOXT4g=";
|
||||
|
||||
meta = {
|
||||
description = "rtl-sdr receiver for Itron ETR meters";
|
||||
homepage = "https://github.com/bemasher/rtlamr";
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [qbit];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user