about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/pgweb.emile.space.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/hosts/corrino/www/pgweb.emile.space.nix')
-rw-r--r--nix/hosts/corrino/www/pgweb.emile.space.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nix/hosts/corrino/www/pgweb.emile.space.nix b/nix/hosts/corrino/www/pgweb.emile.space.nix
new file mode 100644
index 0000000..522a6bf
--- /dev/null
+++ b/nix/hosts/corrino/www/pgweb.emile.space.nix
@@ -0,0 +1,21 @@
+{ pkgs, ... }:
+
+{
+  services.nginx.virtualHosts."pgweb.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:5432";
+      };
+    };
+  };
+
+  environment.systemPackages = with pkgs; [ pgweb ];
+
+  # systemd.services.pgweb = {
+  #   wantedBy = [ "multi-user.target" ];
+  #   serviceConfig.ExecStart = "${pkgs.pgweb}/bin/pwgeb";
+  # };
+}