Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Olsen
0cb0a49565 kvernberg/taler: move behind nginx 2024-11-17 12:52:55 +01:00
Daniel Olsen
eb2ab88f1c kvernberg/taler/bank: init 2024-11-17 12:20:44 +01:00
5 changed files with 73 additions and 2 deletions

View File

@ -7,6 +7,7 @@
(fp /misc/metrics-exporters.nix)
./disks.nix
./services/nginx.nix
./services/pvvvvvv
];

View File

@ -0,0 +1,5 @@
{ config, lib, ... }:
{
services.nginx.enable = true;
}

View File

@ -0,0 +1,47 @@
{ 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";
X_TALER_BANK_PAYTO_HOSTNAME = "bank.kvernberg.pvv.ntnu.no";
BASE_URL = "bank.kvernberg.pvv.ntnu.no";
ALLOW_REGISTRATION = "yes";
REGISTRATION_BONUS_ENABLED = "yes";
REGISTRATION_BONUS = "${CURRENCY}:500";
DEFAULT_DEBT_LIMIT = "${CURRENCY}:0";
ALLOW_CONVERSION = "no";
ALLOW_EDIT_CASHOUT_PAYTO_URI = "yes";
SUGGESTED_WITHDRAWAL_EXCHANGE = "https://exchange.kvernberg.pvv.ntnu.no/";
inherit CURRENCY;
};
};
};
services.nginx.virtualHosts."bank.kvernberg.pvv.ntnu.no" = {
enableACME = true;
forceSSL = true;
kTLS = true;
locations."/".proxyPass = "http://127.0.0.1:8082";
};
}

View File

@ -1,6 +1,7 @@
{
imports = [
./exchange.nix
./bank.nix
];
services.taler = {

View File

@ -11,10 +11,9 @@ in {
services.taler.exchange = {
enable = true;
debug = true;
openFirewall = true;
denominationConfig = ''
## Old denomination names cannot be used again
#[COIN-${CURRENCY}-k1-1-0]
# [COIN-${CURRENCY}-k1-1-0]
## NOK Denominations
[coin-${CURRENCY}-nok-1-0]
@ -147,6 +146,24 @@ in {
exchange-offline = {
MASTER_PRIV_FILE = config.sops.secrets.exchange-offline-master.path;
};
exchange-account-test = {
PAYTO_URI = "payto://x-taler-bank/bank.kvernberg.pvv.ntnu.no/exchange?receiver-name=Exchange";
ENABLE_DEBIT = "YES";
ENABLE_CREDIT = "YES";
};
exchange-accountcredentials-test = {
WIRE_GATEWAY_URL = "http://bank.kvernberg.pvv.ntnu.no/accounts/exchange/taler-wire-gateway/";
WIRE_GATEWAY_AUTH_METHOD = "BASIC";
USERNAME = "exchange";
PASSWORD = "exchange";
};
};
};
services.nginx.virtualHosts."exchange.kvernberg.pvv.ntnu.no" = {
enableACME = true;
forceSSL = true;
kTLS = true;
locations."/".proxyPass = "http://127.0.0.1:8081";
};
}