{ pkgs, lib, config, ... }: let lightControlConfig = pkgs.writeText "light-control.json" (lib.fileContents ); in { systemd.services."light-control" = { wantedBy = [ "multi-user.target" ]; environment = { RUST_LOG = "rust_iot=trace"; }; script = '' ${pkgs.light-control}/bin/rust-iot ${lightControlConfig} ''; }; }