2024-01-14 22:05:39 +03:00
|
|
|
{pkgs, ...}: let
|
|
|
|
_wellKnownFile =
|
|
|
|
pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae";
|
|
|
|
wellKnownFile = pkgs.runCommand "well-known" {} ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp ${_wellKnownFile} $out/atproto-did
|
|
|
|
'';
|
2024-05-28 05:49:23 +03:00
|
|
|
in {
|
2024-01-14 22:05:39 +03:00
|
|
|
services.nginx.virtualHosts."gaze.systems" = {
|
|
|
|
locations."/.well-known/".extraConfig = ''
|
|
|
|
add_header content-type text/plain;
|
|
|
|
add_header access-control-allow-origin *;
|
|
|
|
alias ${wellKnownFile}/;
|
|
|
|
'';
|
|
|
|
};
|
2024-11-21 20:35:08 +03:00
|
|
|
# redirect any requests to my profile
|
|
|
|
services.nginx.virtualHosts."bsky.gaze.systems" = {
|
|
|
|
useACMEHost = "gaze.systems";
|
|
|
|
forceSSL = true;
|
|
|
|
extraConfig = ''
|
|
|
|
location / {
|
|
|
|
return 301 https://bsky.app/profile/gaze.systems$request_uri;
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
2024-01-14 22:05:39 +03:00
|
|
|
}
|