Create staging environment for frappe

As a lot of our stuff relies on frappe, we should have an environment to test
our changes (both imperative and version) before they become production.

Change-Id: I4e9a31652339fa0c98821b12d2f48d2c5ae5447c
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/629
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/common/frappe.nix b/modules/common/frappe.nix
index 9720364..f6128f9 100644
--- a/modules/common/frappe.nix
+++ b/modules/common/frappe.nix
@@ -22,6 +22,18 @@
       ];
     };
 
+    sites."staging.frappe.clicks.codes" = {
+      domains = [
+        "staging.frappe.clicks.codes"
+      ];
+
+      apps = [
+        "frappe"
+        "wiki"
+        "erpnext"
+      ];
+    };
+
     adminPassword = config.sops.secrets."modules/common/frappe.nix:adminPassword".path;
 
     gunicorn_workers = 9;
@@ -31,6 +43,10 @@
     enableACME = true;
   };
 
+  services.nginx.virtualHosts."staging.frappe.clicks.codes" = {
+    enableACME = true;
+  };
+
   sops.secrets."modules/common/frappe.nix:adminPassword" = {
     mode = "0400";
     owner = config.users.users.root.name;