{ lib, pkgs, config, ... }: { users.users.property = { isSystemUser = true; }; systemd.services.property = { enable = true; wantedBy = [ "multi-user.target" ]; path = [ (pkgs.python3.withPackages (ps: with ps; [ flask selenium beautifulsoup4 urllib3 sqlalchemy mysqlclient pytest dateparser geopy nltk click ])) ]; serviceConfig = { User = "property"; }; script = '' FLASK_APP=${}/server.py \ FLASK_RUN_PORT=7888 \ flask run --host 0.0.0.0 \ "$@" ''; }; services.nginx = { enable = true; virtualHosts = { "property.workhorse.private" = { locations."/" = { proxyPass = "http://localhost:7888"; }; }; }; }; }