Implemented feature:

- NIP-42 Can be enabled in nix module or as environment variable 'CONFIG_ENABLE_AUTH'
 - NIP-05 Still WIP, but building up slowly
This commit is contained in:
Tony Klink 2024-02-08 19:19:03 -06:00
parent 377da44eed
commit f7b74bd22c
Signed by: klink
GPG key ID: 85175567C4D19231
18 changed files with 1001 additions and 294 deletions

View file

@ -21,6 +21,11 @@ in {
'npub' of the administrator account. Must be defined!
'';
};
enableAuth = mkOption {
type = type.bool;
default = false;
description = "Require NIP-42 Authentication for REQ and EVENT";
};
sslEnable = mkEnableOption "Whether to enable ACME SSL for nginx proxy";
hostAddress = mkOption {
type = types.nullOr types.str;
@ -64,6 +69,7 @@ in {
environment = {
DATABASE_URL = "${DB_PATH}/sneedstr.db";
ADMIN_PUBKEY = cfg.adminPubkey;
CONFIG_ENABLE_AUTH = cfg.enableAuth;
};
startLimitBurst = 1;
startLimitIntervalSec = 10;