{ config, lib, pkgs, ... }: let uffd = pkgs.callPackage ./uffd.nix {}; in { services.uwsgi = { enable = true; plugins = [ "python3" ]; instance = { type = "normal"; pythonPackages = self: with self; [ uffd ]; module = "uffd:create_app()"; # socket = "${config.services.uwsgi.runDir}/uwsgi.sock"; http = ":8080"; env = [ "CONFIG_PATH=/tmp/uffd.conf" "FLASK_ENV=development" ]; hook-pre-app = "exec:FLASK_APP=${uffd}/lib/python3.10/site-packages/uffd flask db upgrade"; }; }; }