Browse Source

radiobert: re-enable pi-sensors

master
Astro 2 months ago
parent
commit
6ab9732dc9
  1. 9
      hosts/radiobert/default.nix

9
hosts/radiobert/default.nix

@ -64,7 +64,7 @@ in
c3d2 = {
isInHq = false;
hq.statistics.enable = true;
pi-sensors = lib.optionals false [ {
pi-sensors = [ {
type = "dht22";
pin = 17;
location = "Schrank";
@ -132,8 +132,7 @@ in
# TODO: `services.collectd.plugins.exec` is already defined by pi-sensors
# (https://github.com/NixOS/nixpkgs/pull/141551)
# services.collectd.extraConfig =
services.collectd.plugins.exec =
services.collectd.extraConfig =
let
distanceRb = pkgs.fetchurl {
url = "https://github.com/djberg96/gis-distance/raw/main/lib/gis/distance.rb";
@ -144,7 +143,9 @@ in
cp ${distanceRb} $out/distance.rb
'';
in ''
Exec "${config.services.collectd.user}" "${pkgs.ruby}/bin/ruby" "-I${libDir}" "${./collectd-adsb.rb}"
<Plugin exec>
Exec "${config.services.collectd.user}" "${pkgs.ruby}/bin/ruby" "-I${libDir}" "${./collectd-adsb.rb}"
</Plugin>
'';
environment.systemPackages = with pkgs; [

Loading…
Cancel
Save