char/topaz-flake
git clone https://git.t4t.associates/char/topaz-flake
39a1928
main
1{ pkgs , ...} : 2{ 3services . pocket-id = { 4enable = true ; 5package = pkgs . pocket-id . overrideAttrs ( old :{ 6patches = ( old . patches or [ ]) ++ [ 7./patches/pocket-id-oidc-email-domain-rewrites.patch 8]; 9}); 10environmentFile = "/var/lib/secrets/pocket-id.env" ; 11settings = { 12APP_URL = "https://id.t4t.associates" ; 13PORT = 1411 ; 14TRUST_PROXY = true ; 15}; 16}; 17 18services . nginx . virtualHosts = { 19"id.t4t.associates" = { 20forceSSL = true ; 21enableACME = true ; 22 23locations . "/" = { 24proxyPass = "http://127.0.0.1:1411" ; 25proxyWebsockets = true ; 26extraConfig = '' 27proxy_set_header Host $host; 28proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 29proxy_set_header X-Forwarded-Proto $scheme; 30'' ; 31}; 32}; 33 34"ts.t4t.associates" = { 35forceSSL = true ; 36enableACME = true ; 37 38locations . "= /.well-known/webfinger" . extraConfig = '' 39default_type application/json; 40return 200 '{"subject":"$arg_resource","links":[{"rel":"http://openid.net/specs/connect/1.0/issuer","href":"https://id.t4t.associates"}]}'; 41'' ; 42 43locations . "/" . extraConfig = '' 44return 404; 45'' ; 46}; 47}; 48}