{ 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 ${} ${myPython}/bin/python heater.py ''; }; }