nixos-config/configs/pepe/home-assistant/light-control.nix

15 lines
374 B
Nix
Raw Normal View History

2020-06-01 04:12:15 +02:00
{ pkgs, lib, config, ... }:
let
lightControlConfig = pkgs.writeText "light-control.json"
(lib.fileContents <assets/light-control.json>);
in {
systemd.services."light-control" = {
wantedBy = [ "multi-user.target" ];
environment = { RUST_LOG = "rust_iot=trace"; };
script = ''
${pkgs.light-control}/bin/rust-iot ${lightControlConfig}
'';
};
}