mempool: add frontend settings

This commit is contained in:
Erik Arvstedt 2025-06-01 23:03:33 +02:00
parent 81112a0553
commit 7822e2c9d3
No known key found for this signature in database
GPG key ID: 33312B944DD97846
3 changed files with 33 additions and 4 deletions

View file

@ -50,9 +50,23 @@ let
default = 60845; # A random private port
description = "HTTP server port.";
};
settings = mkOption {
type = with types; attrsOf anything;
default = {};
example = {
TESTNET_ENABLED = true;
MEMPOOL_WEBSITE_URL = "mempool.mynode.org";
};
description = ''
Mempool frontend settings.
See here for available options:
https://github.com/mempool/mempool/blob/master/frontend/src/app/services/state.service.ts
(`interface Env` and `defaultEnv`)
'';
};
staticContentRoot = mkOption {
type = types.path;
default = nbPkgs.mempool-frontend;
default = nbPkgs.mempool-frontend.withConfig cfg.frontend.settings;
defaultText = "config.nix-bitcoin.pkgs.mempool-frontend";
description = "
Path of the static frontend content root.
@ -106,7 +120,7 @@ let
};
description = ''
Mempool backend settings.
See here for possible options:
See here for available options:
https://github.com/mempool/mempool/blob/master/backend/src/config.ts
'';
};