diff --git a/config/hosts/public-web-static/spaceapid-config/ccchh-dynamic.json b/config/hosts/public-web-static/spaceapid-config/ccchh-dynamic.json index 885d339..b2f9f8e 100644 --- a/config/hosts/public-web-static/spaceapid-config/ccchh-dynamic.json +++ b/config/hosts/public-web-static/spaceapid-config/ccchh-dynamic.json @@ -2,6 +2,26 @@ "dynamic": { "sensors": { "temperature": [ + { + "sensor_data": { + "unit": "°C", + "location": "Hauptraum", + "description": "Sensor im Hauptraum" + }, + "allowed_credentials": [ + "club-assistant" + ] + }, + { + "sensor_data": { + "unit": "°C", + "location": "Loetschlauch", + "description": "Sensor im Lötschlauch (Teil der Werkstatt)" + }, + "allowed_credentials": [ + "club-assistant" + ] + }, { "sensor_data": { "unit": "°C", @@ -14,6 +34,26 @@ } ], "humidity": [ + { + "sensor_data": { + "unit": "%", + "location": "Hauptraum", + "description": "Sensor im Hauptraum" + }, + "allowed_credentials": [ + "club-assistant" + ] + }, + { + "sensor_data": { + "unit": "%", + "location": "Loetschlauch", + "description": "Sensor im Lötschlauch (Teil der Werkstatt)" + }, + "allowed_credentials": [ + "club-assistant" + ] + }, { "sensor_data": { "unit": "%", @@ -24,6 +64,28 @@ "club-assistant" ] } + ], + "CO2": [ + { + "sensor_data": { + "unit": "ppm", + "location": "Hauptraum", + "description": "Sensor im Hauptraum (Typ: SCD41)" + }, + "allowed_credentials": [ + "club-assistant" + ] + }, + { + "sensor_data": { + "unit": "ppm", + "location": "Loetschlauch", + "description": "Sensor im Lötschlauch (Teil der Werkstatt, Typ: SCD41)" + }, + "allowed_credentials": [ + "club-assistant" + ] + } ] }, "state": { diff --git a/config/hosts/public-web-static/spaceapid.nix b/config/hosts/public-web-static/spaceapid.nix index 3f1f8fe..13de76b 100644 --- a/config/hosts/public-web-static/spaceapid.nix +++ b/config/hosts/public-web-static/spaceapid.nix @@ -1,20 +1,19 @@ { pkgs, ... }: let - version = "v0.1.0"; - spaceapidSrc = pkgs.fetchgit { + spaceapidSrc = builtins.fetchGit { url = "https://git.hamburg.ccc.de/CCCHH/spaceapid.git"; - rev = version; - hash = "sha256-2SDhliltzyydPPZdNn/htDydiK/SHQcYyG/dQ0EyFrY="; + ref = "main"; + rev = "17753f535c68157e80f30f50deb488133cc98258"; }; spaceapid = pkgs.buildGoModule rec { pname = "spaceapid"; - inherit version; + version = "main"; src = spaceapidSrc; ldflags = [ - "-X main.version=${version}" + "-X main.version=${version}-${spaceapidSrc.rev}" ]; # Since spaceapid doesn't have any dependencies, we can set this to null and