ark/hosts/wolumonde/modules/atproto.nix

18 lines
456 B
Nix
Raw Normal View History

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
'';
in
{
services.nginx.virtualHosts."gaze.systems" = {
locations."/.well-known/".extraConfig = ''
add_header content-type text/plain;
add_header access-control-allow-origin *;
alias ${wellKnownFile}/;
'';
};
}