DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: 830b63aaa048a48275e6544b89afb0687bc448e0 nix-arta/systems/hosts/auth/webfinger.nix -rw-r--r-- 717 bytes
830b63aaJonni Liljamo chore: remove pointless postgres enableTCPIP a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{...}: {
  networking.firewall.allowedTCPPorts = [80];

  services.nginx = {
    enable = true;
    virtualHosts."liljamo.com" = {
      default = true;
      locations."/.well-known/webfinger" = {
        # https://www.authelia.com/integration/openid-connect/tailscale/
        extraConfig = ''
          set $jlres '{"subject": "acct:jonni@liljamo.com", "links": [{"rel": "http://openid.net/specs/connect/1.0/issuer", "href": "https://auth.liljamo.com"}]}';
          if ($request_uri ~ 'resource=acct:jonni@liljamo.com') {
            return 200 $jlres;
          }
          if ($request_uri ~ 'resource=acct%3Ajonni%40liljamo.com') {
            return 200 $jlres;
          }
        '';
      };
    };
  };
}