feat(van-weather): port weather service to Rust
treefmt / nix fmt (pull_request) Successful in 6s
pytest / pytest (pull_request) Successful in 33s
build_systems / build-bob (pull_request) Successful in 55s
build_systems / build-rhapsody-in-green (pull_request) Successful in 1m8s
build_systems / build-brain (pull_request) Successful in 2m4s
build_systems / build-jeeves (pull_request) Successful in 2m44s
test ebook search / test-ebook-search (pull_request) Successful in 40s

Add a Rust implementation with privacy-masked locations, HTTP retries,
and Home Assistant sensor publishing. Package it with Nix and switch the
systemd service from Python to the compiled binary.
This commit is contained in:
2026-08-18 15:57:39 -04:00
parent cb3eb83935
commit 1c81fbfc62
7 changed files with 3978 additions and 7 deletions
+4 -7
View File
@@ -1,8 +1,10 @@
{
pkgs,
inputs,
...
}:
let
van-weather = pkgs.callPackage ../../../rust/van_weather/package.nix { };
in
{
systemd.services.van-weather = {
description = "Van Weather Service";
@@ -13,13 +15,9 @@
requires = [ "home-assistant.service" ];
wantedBy = [ "multi-user.target" ];
environment = {
PYTHONPATH = "${inputs.self}/";
};
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.my_python}/bin/python -m python.van_weather.main";
ExecStart = "${van-weather}/bin/van-weather";
EnvironmentFile = "/etc/van_weather.env";
Restart = "on-failure";
RestartSec = "5s";
@@ -29,7 +27,6 @@
ProtectSystem = "strict";
ProtectHome = "read-only";
PrivateTmp = true;
ReadOnlyPaths = [ "${inputs.self}" ];
};
};
}