about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/pgweb.emile.space.nix
blob: 1ce8063edf8f06b3ee92a6dc677a61fbb70e2450 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ pkgs, ... }:

let
  ports = import ../ports.nix;
in {
  services.nginx.virtualHosts."pgweb.emile.space" = {
    forceSSL = true;
    enableACME = true;

    locations = {
      "/" = {
        proxyPass = "http://127.0.0.1:${toString ports.pgweb}";
      };
    };
  };

  environment.systemPackages = with pkgs; [ pgweb ];

  # systemd.services.pgweb = {
  #   wantedBy = [ "multi-user.target" ];
  #   serviceConfig.ExecStart = "${pkgs.pgweb}/bin/pwgeb";
  # };
}