diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-12 20:30:13 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-12 20:30:13 +0000 |
| commit | a12927181c571fc1641772ad44dd4c6a4ab209d9 (patch) | |
| tree | d7cb99fa87606e9fb13d91305cda8a0f919e6528 /.env.example | |
| parent | c29191b1e1239e931c575a926ec9480e594476d6 (diff) | |
feat(grasp-05): add read-only mode with auto-enable for archive configs
Implements NGIT_ARCHIVE_READ_ONLY configuration option that defaults to true
when archive mode is enabled, allowing relays to operate as read-only syncs
of archived repositories.
Key changes:
- Add NGIT_ARCHIVE_READ_ONLY config option (defaults to true if archive enabled)
- NIP-11 advertises GRASP-05 support and includes curation field when read-only
- Validation logic rejects non-whitelisted repos in read-only mode
- Comprehensive tests for read-only behavior and defaults
- Full documentation in config reference, .env.example, and NixOS module
Read-only mode enables passive mirroring without being listed in announcements,
useful for backup/archive operations while preventing accidental write acceptance.
Diffstat (limited to '.env.example')
| -rw-r--r-- | .env.example | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/.env.example b/.env.example index 2dc5266..cb797a8 100644 --- a/.env.example +++ b/.env.example | |||
| @@ -189,4 +189,17 @@ | |||
| 189 | # NGIT_ARCHIVE_WHITELIST=npub1alice... | 189 | # NGIT_ARCHIVE_WHITELIST=npub1alice... |
| 190 | # NGIT_ARCHIVE_WHITELIST=npub1alice...,npub1bob.../linux | 190 | # NGIT_ARCHIVE_WHITELIST=npub1alice...,npub1bob.../linux |
| 191 | # NGIT_ARCHIVE_WHITELIST=bitcoin-core,linux,rust | 191 | # NGIT_ARCHIVE_WHITELIST=bitcoin-core,linux,rust |
| 192 | # NGIT_ARCHIVE_WHITELIST= \ No newline at end of file | 192 | # NGIT_ARCHIVE_WHITELIST= |
| 193 | |||
| 194 | # Archive read-only mode (relay is read-only sync of archived repositories) | ||
| 195 | # When true: | ||
| 196 | # - NIP-11 includes GRASP-05 in supported_grasps | ||
| 197 | # - NIP-11 curation field describes archive scope | ||
| 198 | # - Repository announcements not listing this service are accepted per whitelist/archive-all | ||
| 199 | # When false: | ||
| 200 | # - Archive mode disabled (standard GRASP-01 operation) | ||
| 201 | # | ||
| 202 | # CLI: --archive-read-only | ||
| 203 | # Default: true if NGIT_ARCHIVE_ALL or NGIT_ARCHIVE_WHITELIST is set, false otherwise | ||
| 204 | # Note: Setting to true without archive config causes startup error | ||
| 205 | # NGIT_ARCHIVE_READ_ONLY= \ No newline at end of file | ||