upleb.uk

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

summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/module.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nix/module.nix b/nix/module.nix
index 79b0e83..f82f069 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -177,6 +177,25 @@ let
177 description = "Hours before removing relay from naughty list"; 177 description = "Hours before removing relay from naughty list";
178 }; 178 };
179 179
180 archiveAll = mkOption {
181 type = types.bool;
182 default = false;
183 description = ''
184 Enable GRASP-05 archive mode: accept all repository announcements.
185 WARNING: Storage and bandwidth risk.
186 '';
187 };
188
189 archiveWhitelist = mkOption {
190 type = types.listOf types.str;
191 default = [ ];
192 example = [ "npub1alice..." "npub1bob.../linux" "bitcoin-core" ];
193 description = ''
194 GRASP-05 archive whitelist entries.
195 Formats: <npub>, <npub>/<identifier>, <identifier>
196 '';
197 };
198
180 user = mkOption { 199 user = mkOption {
181 type = types.str; 200 type = types.str;
182 default = "ngit-grasp-${name}"; 201 default = "ngit-grasp-${name}";
@@ -217,6 +236,8 @@ let
217 toString cfg.rejectedColdIndexExpirySecs; 236 toString cfg.rejectedColdIndexExpirySecs;
218 NGIT_NAUGHTY_LIST_EXPIRATION_HOURS = 237 NGIT_NAUGHTY_LIST_EXPIRATION_HOURS =
219 toString cfg.naughtyListExpirationHours; 238 toString cfg.naughtyListExpirationHours;
239 NGIT_ARCHIVE_ALL = toString cfg.archiveAll;
240 NGIT_ARCHIVE_WHITELIST = concatStringsSep "," cfg.archiveWhitelist;
220 RUST_LOG = cfg.logLevel; 241 RUST_LOG = cfg.logLevel;
221 } // optionalAttrs (cfg.relayName != null) { 242 } // optionalAttrs (cfg.relayName != null) {
222 NGIT_RELAY_NAME = cfg.relayName; 243 NGIT_RELAY_NAME = cfg.relayName;