Home

infra @d90c04166f06de839690278fa032be27d0d3e86a - 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
27
28
29
30
31
32
{
  config,
  jolheiser,
  lib,
  ...
}:
let
  enable = true;
  port = 2884;
  host = "id.${jolheiser.domain}";
in
lib.mkIf enable {
  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}
    '';
  };
}