ark/hosts/wolumonde/modules/atproto.nix

36 lines
1.0 KiB
Nix
Raw Normal View History

2024-01-14 22:05:39 +03:00
{pkgs, ...}: let
2024-05-28 05:49:23 +03:00
in {
2025-02-04 20:37:21 +09:00
services.nginx.virtualHosts."gaze.systems" = let
_wellKnownFile =
pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae";
wellKnownDir = pkgs.runCommand "well-known" {} ''
mkdir -p $out
cp ${_wellKnownFile} $out/atproto-did
'';
in {
2024-01-14 22:05:39 +03:00
locations."/.well-known/".extraConfig = ''
add_header content-type text/plain;
add_header access-control-allow-origin *;
2025-02-04 20:37:21 +09:00
alias ${wellKnownDir}/;
2024-01-14 22:05:39 +03:00
'';
};
2025-02-04 20:37:21 +09:00
services.nginx.virtualHosts."dawn.gaze.systems" = let
_atprotoDidFile =
pkgs.writeText "server" "did:web:dawn.gaze.systems";
_didFile = ../../../secrets/dawn.did;
wellKnownDir = pkgs.runCommand "well-known" {} ''
mkdir -p $out
cp ${_didFile} $out/did.json
cp ${_atprotoDidFile} $out/atproto-did
'';
in {
2024-11-22 02:35:08 +09:00
useACMEHost = "gaze.systems";
forceSSL = true;
2025-02-04 20:37:21 +09:00
locations."/.well-known/".extraConfig = ''
add_header content-type text/plain;
add_header access-control-allow-origin *;
alias ${wellKnownDir}/;
2024-11-22 02:35:08 +09:00
'';
};
2024-01-14 22:05:39 +03:00
}