15 lines
374 B
Nix
15 lines
374 B
Nix
|
{ 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}
|
||
|
'';
|
||
|
};
|
||
|
}
|