upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/nix/module.nix
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-21 13:28:37 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-21 13:38:11 +0000
commit46fbcc0a4c8a8dbf6cd345d6eaa6fe33a82100bb (patch)
tree6ab52486732077dbab80907d974c195b1e2f7216 /nix/module.nix
parent780d09b0c1eb823f02fc61de6dbf99b2d5cefaca (diff)
feat: add archive-grasp-services configuration option
Enables relay operators to backup/archive specific GRASP servers by domain. Includes configuration, validation, documentation, and integration tests.
Diffstat (limited to 'nix/module.nix')
-rw-r--r--nix/module.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/nix/module.nix b/nix/module.nix
index 40bc868..564259e 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -196,6 +196,19 @@ let
196 ''; 196 '';
197 }; 197 };
198 198
199 archiveGraspServices = mkOption {
200 type = types.listOf types.str;
201 default = [ ];
202 example = [ "git.example.com" "git.nostr.dev" ];
203 description = ''
204 GRASP-05 archive GRASP services: list of GRASP server domains to archive.
205 Archives all repositories from the specified GRASP server domains.
206 Must be bare domains only (e.g., git.example.com, NOT wss://git.example.com).
207 Mutually exclusive with archiveAll and archiveWhitelist.
208 Automatically sets archiveReadOnly to true by default.
209 '';
210 };
211
199 archiveReadOnly = mkOption { 212 archiveReadOnly = mkOption {
200 type = types.nullOr types.bool; 213 type = types.nullOr types.bool;
201 default = null; 214 default = null;
@@ -205,7 +218,7 @@ let
205 - NIP-11 includes GRASP-05 in supported_grasps 218 - NIP-11 includes GRASP-05 in supported_grasps
206 - NIP-11 curation field describes archive scope 219 - NIP-11 curation field describes archive scope
207 - Repository announcements not listing this service are accepted per whitelist/archive-all 220 - Repository announcements not listing this service are accepted per whitelist/archive-all
208 Default: true if archiveAll or archiveWhitelist is set, false otherwise 221 Default: true if archiveAll, archiveWhitelist, or archiveGraspServices is set, false otherwise
209 Note: Setting to true without archive config causes startup error 222 Note: Setting to true without archive config causes startup error
210 Note: Cannot be used with repositoryWhitelist (mutually exclusive) 223 Note: Cannot be used with repositoryWhitelist (mutually exclusive)
211 ''; 224 '';
@@ -298,6 +311,8 @@ let
298 toString cfg.naughtyListExpirationHours; 311 toString cfg.naughtyListExpirationHours;
299 NGIT_ARCHIVE_ALL = if cfg.archiveAll then "true" else "false"; 312 NGIT_ARCHIVE_ALL = if cfg.archiveAll then "true" else "false";
300 NGIT_ARCHIVE_WHITELIST = concatStringsSep "," cfg.archiveWhitelist; 313 NGIT_ARCHIVE_WHITELIST = concatStringsSep "," cfg.archiveWhitelist;
314 NGIT_ARCHIVE_GRASP_SERVICES =
315 concatStringsSep "," cfg.archiveGraspServices;
301 NGIT_REPOSITORY_WHITELIST = concatStringsSep "," cfg.repositoryWhitelist; 316 NGIT_REPOSITORY_WHITELIST = concatStringsSep "," cfg.repositoryWhitelist;
302 NGIT_REPOSITORY_BLACKLIST = concatStringsSep "," cfg.repositoryBlacklist; 317 NGIT_REPOSITORY_BLACKLIST = concatStringsSep "," cfg.repositoryBlacklist;
303 NGIT_EVENT_BLACKLIST = concatStringsSep "," cfg.eventBlacklist; 318 NGIT_EVENT_BLACKLIST = concatStringsSep "," cfg.eventBlacklist;