Home

infra @9e9d01d3a7a385ef214288b72455566d67ec9155 - refs - log -
-
https://git.jolheiser.com/infra.git
dragonwell flake
infra / dragonwell / services / pocket-id.nix
- raw -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ config, jolheiser, ... }:
let
  port = 2884;
  host = "id.${jolheiser.domain}";
in
{
  age.secrets.pocket-id.file = ../../secrets/pocket-id.age;
  services = {
    pocket-id = {
      enable = true;
      settings = {
        APP_URL = "https://${host}";
        PORT = port;
        APP_NAME = "jolheiser ID";
        EMAILS_VERIFIED = true;
        UI_CONFIG_DISABLED = true;
        HOST = "localhost";
        ANALYTICS_DISABLED = true;
      };
      environmentFile = config.age.secrets.pocket-id.path;
    };
    caddy.virtualHosts."${host}".extraConfig = ''
      reverse_proxy localhost:${builtins.toString port}
    '';
  };
}