From 8ceedf2b8d930876486a3ee7f214cee59ec6b044 Mon Sep 17 00:00:00 2001 From: Jaculabilis Date: Fri, 19 Feb 2021 07:52:22 +0000 Subject: [PATCH] Remove unneeded docstore config --- docstore.nix | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 docstore.nix diff --git a/docstore.nix b/docstore.nix deleted file mode 100644 index 4abf86b..0000000 --- a/docstore.nix +++ /dev/null @@ -1,49 +0,0 @@ -# Configuration for the DocStore service - -{ config, pkgs, ... }: - -# Set up python -with pkgs; -let docstore-requires = python-packages: with python-packages; [ - flask flask_login flask_wtf gunicorn -]; -python3-with-docstore-requires = python3.withPackages docstore-requires; -in -{ - # Create a user for the server process to run under - users.users.docstore = { - description = "DocStore system user"; - isSystemUser = true; - home = "/home/docstore"; - createHome = true; - packages = [ python3-with-docstore-requires ]; - }; - - # Create the server process systemd unit - systemd.services.docstore = { - enable = true; - description = "DocStore server"; - serviceConfig = { - Type = "simple"; - ExecStart = "${python3-with-docstore-requires}/bin/python -m docstore.server /srv/docstore --port 8001"; - Restart = "on-failure"; - User = "docstore"; - WorkingDirectory = "/home/docstore/DocStore"; - }; - wantedBy = [ "multi-user.target" ]; - }; - - # Configure nginx to forward to the server at the docs subdomain - services.nginx.virtualHosts."docs.alogoulogoi.com" = { - enableACME = true; - forceSSL = true; - extraConfig = '' - access_log /var/log/nginx/access.docs.log; - ''; - locations."/".extraConfig = '' - proxy_buffering off; - proxy_pass http://localhost:8001/; - ''; - }; -} -