Admin pubkey now can delete any event

This commit is contained in:
Tony Klink 2024-01-18 19:29:59 -06:00
parent 5b2726e66d
commit 025ba52a81
Signed by: klink
GPG key ID: 85175567C4D19231
12 changed files with 274 additions and 125 deletions

View file

@ -15,6 +15,12 @@ in {
domain from which the sneedstr will be acessible.
'';
};
adminPubkey = mkOption {
type = types.str;
description = ''
'npub' of the administrator account. Must be defined!
'';
};
sslEnable = mkEnableOption "Whether to enable ACME SSL for nginx proxy";
hostAddress = mkOption {
type = types.nullOr types.str;
@ -55,7 +61,10 @@ in {
systemd.services.sneedstr = {
enable = true;
description = "Sneedstr Nostr relay";
environment = { DATABASE_URL = "${DB_PATH}/sneedstr.db"; };
environment = {
DATABASE_URL = "${DB_PATH}/sneedstr.db";
ADMIN_PUBKEY = cfg.adminPubkey;
};
startLimitBurst = 1;
startLimitIntervalSec = 10;
unitConfig = {