Your one-stop-cake-shop for everything Freshly Baked has to offer

feat(pm/pds): automatically age-assure users

As a PDS, we make sure our users are over the age of majority. It's
silly for them to have to also give their ID to KWS to verify their
age again. We can make the endpoint return The Right Thing to skip out
on this

+22
+22
packetmix/systems/teal/pds.nix
··· 36 36 proxyWebsockets = true; 37 37 }; 38 38 39 + locations."/xrpc/app.bsky.ageassurance.getState" = { 40 + extraConfig = '' 41 + default_type application/json; 42 + add_header access-control-allow-headers "authorization,dpop,atproto-accept-labelers,atproto-proxy" always; 43 + add_header access-control-allow-origin "*" always; 44 + add_header X-Frame-Options SAMEORIGIN always; 45 + add_header X-Content-Type-Options nosniff; 46 + ''; 47 + return = "200 '${ 48 + builtins.toJSON { 49 + state = { 50 + lastInitiatedAt = "2025-09-11T19:18:03.551Z"; 51 + status = "assured"; 52 + access = "full"; 53 + }; 54 + metadata.accountCreatedAt = "2023-12-12T20:16:56.499Z"; 55 + } 56 + }'"; 57 + # Our PDS is private 58 + # Therefore, we have verified the age of everyone on the service is over the age of majority - and we didn't need KWS to do it! 59 + }; 60 + 39 61 extraConfig = '' 40 62 client_max_body_size 1024M; 41 63 '';