nixos-config/nixos/configs/pepe/home-assistant/iot-control.nix
2021-09-25 20:28:25 +02:00

30 lines
771 B
Nix

{ lib, pkgs, config, ... }: {
users.users.heater-control = { };
#systemd.services.heater-control = {
# enable = true;
# wantedBy = [ "multi-user.target" ];
# serviceConfig = { User = "heater-control"; };
# script =
# let myPython = pkgs.python3.withPackages (ps: with ps; [ paho-mqtt ]);
# in ''
# cd ${<mqtt>}
# ${myPython}/bin/python heater.py
# '';
#};
users.users.fyrtur-control = { };
systemd.services.fyrtur-control = {
enable = true;
wantedBy = [ "multi-user.target" ];
serviceConfig = { User = "fyrtur-control"; };
script =
let myPython = pkgs.python3.withPackages (ps: with ps; [ paho-mqtt ]);
in ''
cd ${<mqtt>}
${myPython}/bin/python fyrtur.py
'';
};
}