From de659f1eeaa71cef188179d1ddb95362939f9337 Mon Sep 17 00:00:00 2001 From: Nicholas McDaniel Date: Thu, 22 Jan 2026 18:42:41 -0500 Subject: [PATCH] Add atproto PDS server --- configuration.nix | 1 + modules/nginx.nix | 14 ++++++++++++++ modules/pds.nix | 14 ++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 modules/pds.nix diff --git a/configuration.nix b/configuration.nix index ed4981b..d585eb9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -13,6 +13,7 @@ ./modules/nginx.nix ./modules/gitea.nix + ./modules/pds.nix ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/modules/nginx.nix b/modules/nginx.nix index aea70a3..ec6f425 100644 --- a/modules/nginx.nix +++ b/modules/nginx.nix @@ -22,6 +22,8 @@ systemd.tmpfiles.rules = [ # Core Web Directory "d /var/www/tty.garden - root nginx -" + # Well-known storage + "d /var/www/well-known - root nginx -" # Mirrors "d /var/www/mirror - root nginx -" "d /var/www/mirror/maple - ahill nginx -" @@ -41,6 +43,10 @@ # TODO: User public_html folders # Use disable symlinks with `if_not_owner` and from=$HOME for user + + locations."^~ /.well-known/" = { + alias = "/var/www/well-known/"; + }; }; "seed.tty.garden" = vhostDefault // { locations."/" = { @@ -54,6 +60,14 @@ extraConfig = "autoindex on;"; }; }; + "pds.tty.garden" = vhostDefault // { + serverAliases = [ ".pds.tty.garden" ]; + + locations."/" = { + proxyPass = "http://127.0.0.1:3001"; + proxyWebsockets = true; + }; + }; }; }; } diff --git a/modules/pds.nix b/modules/pds.nix new file mode 100644 index 0000000..6b9e151 --- /dev/null +++ b/modules/pds.nix @@ -0,0 +1,14 @@ +{config, ...}: +{ + services.bluesky-pds = { + enable = true; + + environmentFiles = [ "/root/pds_environment" ]; + + settings = { + PDS_PORT = 3001; + PDS_HOSTNAME = "pds.tty.garden"; + PDS_ADMIN_EMAIL = "nickmcdaniel00@gmail.com"; + }; + }; +}