DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: 197c3a3eec5e5efc4226010db8a02a615e47dc93 nix-arta/systems/hosts/auth/webfinger.nix -rw-r--r-- 717 bytes
197c3a3eJonni Liljamo chore: update nvim-flake 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;
          }
        '';
      };
    };
  };
}