From cb75b0a444104e78dab4dd7f5ab7ecf11bccd660 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Mon, 17 Mar 2025 16:17:07 -0700 Subject: [PATCH] Pds, add default pds with config options --- nixosModules/services/pds/service.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 nixosModules/services/pds/service.nix diff --git a/nixosModules/services/pds/service.nix b/nixosModules/services/pds/service.nix new file mode 100644 index 0000000..500179e --- /dev/null +++ b/nixosModules/services/pds/service.nix @@ -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; + }; + }; + }; +}