mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
Add NixOS module options for deletion requests
This commit is contained in:
@@ -250,6 +250,29 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
deletionRequestDisrespector = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Archival relay mode that ignores NIP-09 deletion requests.
|
||||
When true, all deletion requests are ignored and events are retained permanently.
|
||||
Prevents "left-pad" scenarios where critical code is deleted from the network.
|
||||
Useful for archival relays that prioritize data preservation.
|
||||
'';
|
||||
};
|
||||
|
||||
archiveRetentionSecs = mkOption {
|
||||
type = types.int;
|
||||
default = 7776000;
|
||||
description = ''
|
||||
Archive retention period in seconds for deleted events and git data.
|
||||
How long to keep archived events and git data before permanent deletion.
|
||||
Default: 7776000 seconds (90 days).
|
||||
Set to lower values for testing (e.g., 60 for 1 minute).
|
||||
Has no effect if deletionRequestDisrespector is true (events never deleted).
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "ngit-grasp-${name}";
|
||||
@@ -295,6 +318,9 @@ let
|
||||
NGIT_REPOSITORY_WHITELIST = concatStringsSep "," cfg.repositoryWhitelist;
|
||||
NGIT_REPOSITORY_BLACKLIST = concatStringsSep "," cfg.repositoryBlacklist;
|
||||
NGIT_EVENT_BLACKLIST = concatStringsSep "," cfg.eventBlacklist;
|
||||
NGIT_DELETION_REQUEST_DISRESPECTOR =
|
||||
if cfg.deletionRequestDisrespector then "true" else "false";
|
||||
NGIT_ARCHIVE_RETENTION_SECS = toString cfg.archiveRetentionSecs;
|
||||
RUST_LOG = cfg.logLevel;
|
||||
} // optionalAttrs (cfg.relayName != null) {
|
||||
NGIT_RELAY_NAME = cfg.relayName;
|
||||
|
||||
Reference in New Issue
Block a user