DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: 1ed6268e307d7b7d3dfa1c36757788192339a05e nix-arta/systems/hosts/auth/webfinger.nix -rw-r--r-- 717 bytes
1ed6268eJonni Liljamo chore: update nvim-flake 14 days 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;
          }
        '';
      };
    };
  };
}