Pds, add default pds with config options

This commit is contained in:
Julia Lange 2025-03-17 16:17:07 -07:00
parent c383aee76e
commit 1182970d58

View file

@ -0,0 +1,21 @@
{ config, pkgs, lib, ... }:
{
options.pds = {
enable = lib.mkEnableOption "Enables atproto Personal Data Server";
hostname = lib.mkOption { type = lib.types.str; };
adminEmail = lib.mkOption { type = lib.types.str; };
environmentFile = lib.mkOption { type = lib.types.path; };
};
config = lib.mkIf config.pds.enable {
services.pds = {
enable = true;
environmentFiles = [ config.pds.environmentFile ];
settings = {
PDS_HOSTNAME = config.pds.hostname;
PDS_ADMIN_EMAIL = config.pds.adminEmail;
};
};
};
}