From 4744eb9235938ee59faa489594b7267a9c4ecb94 Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 9 Nov 2021 18:48:06 +0100 Subject: [PATCH] radiobert: update and adopt heliwatch --- flake.lock | 8 ++++---- flake.nix | 1 + hosts/radiobert/readsb.nix | 6 +++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 6b27268c..3f806648 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1636416807, - "narHash": "sha256-cKVugZtEszVAz6+emfCgl4CdIzVcqP1CcfVCvpMdS5g=", + "lastModified": 1636472542, + "narHash": "sha256-HlzWJXlcgzGQRFkv1q/Bi2aWlHlpmEYiOjaz5LKJAgo=", "ref": "master", - "rev": "3455a8d579aa67423adbc85abddab7c4d95e4eb8", - "revCount": 27, + "rev": "4e3504259a46bc586296bf15ffb9c72ffedf9b28", + "revCount": 34, "type": "git", "url": "https://gitea.c3d2.de/astro/heliwatch.git" }, diff --git a/flake.nix b/flake.nix index 4943691a..fd9cc066 100644 --- a/flake.nix +++ b/flake.nix @@ -222,6 +222,7 @@ radiobert = nixosSystem' { modules = [ "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" + { nixpkgs.overlays = [ heliwatch.overlay ]; } ./hosts/radiobert ]; system = "aarch64-linux"; diff --git a/hosts/radiobert/readsb.nix b/hosts/radiobert/readsb.nix index 77088600..beeda6e0 100644 --- a/hosts/radiobert/readsb.nix +++ b/hosts/radiobert/readsb.nix @@ -38,7 +38,7 @@ in { wantedBy = [ "multi-user.target" ]; requires = [ "readsb.service" ]; serviceConfig = { - ExecStart = "${pkgs.ruby}/bin/ruby ${./sbs2json.rb}"; + ExecStart = "${pkgs.heliwatch.http-json}/bin/http-json"; User = "sbs2json"; Group = "adsb"; ProtectSystem = "full"; @@ -66,6 +66,10 @@ in { }; }; + services.collectd.plugins.exec = '' + Exec "${config.services.collectd.user}" "${pkgs.heliwatch.collectd-stats}/bin/collectd-stats" + ''; + environment.systemPackages = with pkgs; [ dump1090_sdrplus readsb