pvv-nixos-config/hosts/kvernberg/services/pvvvvvv/bank.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2024-11-17 12:12:41 +01:00
{ config, lib, pkgs, ... }:
let
cfg = config.services.libeufin.bank;
tcfg = config.services.taler;
inherit (tcfg.settings.taler) CURRENCY;
in {
services.libeufin.bank = {
enable = true;
debug = true;
createLocalDatabase = true;
initialAccounts = [
{ username = "exchange";
password = "exchange";
name = "Exchange";
}
];
settings = {
libeufin-bank = {
WIRE_TYPE = "x-taler-bank";
2024-11-17 12:52:55 +01:00
X_TALER_BANK_PAYTO_HOSTNAME = "bank.kvernberg.pvv.ntnu.no";
2024-11-20 02:43:58 +01:00
BASE_URL = "bank.kvernberg.pvv.ntnu.no/";
2024-11-17 12:12:41 +01:00
ALLOW_REGISTRATION = "yes";
REGISTRATION_BONUS_ENABLED = "yes";
2024-11-17 12:52:55 +01:00
REGISTRATION_BONUS = "${CURRENCY}:500";
2024-11-17 12:12:41 +01:00
2024-11-17 12:52:55 +01:00
DEFAULT_DEBT_LIMIT = "${CURRENCY}:0";
2024-11-17 12:12:41 +01:00
ALLOW_CONVERSION = "no";
ALLOW_EDIT_CASHOUT_PAYTO_URI = "yes";
2024-11-17 12:52:55 +01:00
SUGGESTED_WITHDRAWAL_EXCHANGE = "https://exchange.kvernberg.pvv.ntnu.no/";
2024-11-17 12:12:41 +01:00
inherit CURRENCY;
};
};
};
2024-11-17 12:52:55 +01:00
services.nginx.virtualHosts."bank.kvernberg.pvv.ntnu.no" = {
enableACME = true;
forceSSL = true;
kTLS = true;
2024-11-20 02:43:58 +01:00
locations."/" = {
proxyPass = "http://127.0.0.1:8082";
extraConfig = ''
proxy_read_timeout 300s;
'';
};
2024-11-17 12:52:55 +01:00
};
2024-11-17 12:12:41 +01:00
}