summaryrefslogtreecommitdiff
path: root/ilex/uffd-service.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ilex/uffd-service.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/ilex/uffd-service.nix b/ilex/uffd-service.nix
new file mode 100644
index 0000000..000220f
--- /dev/null
+++ b/ilex/uffd-service.nix
@@ -0,0 +1,24 @@
+{ 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";
+ };
+ };
+}