2021-03-16 22:14:50 +01:00
|
|
|
{ lib, pkgs, config, ... }: {
|
|
|
|
|
|
|
|
users.users.heater-control = { };
|
|
|
|
|
2021-03-24 06:04:48 +01:00
|
|
|
#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
|
|
|
|
# '';
|
|
|
|
#};
|
2021-03-17 09:09:44 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
};
|
2021-03-16 22:14:50 +01:00
|
|
|
}
|