kvernberg/taler/bank: init

This commit is contained in:
Daniel Lovbrotte Olsen 2024-11-17 12:12:41 +01:00
parent 1c2a949102
commit a17a4497d7
3 changed files with 57 additions and 5 deletions

View File

@ -0,0 +1,40 @@
{ 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;
openFirewall = true;
createLocalDatabase = true;
initialAccounts = [
{ username = "exchange";
password = "exchange";
name = "Exchange";
}
];
settings = {
libeufin-bank = {
WIRE_TYPE = "x-taler-bank";
X_TALER_BANK_PAYTO_HOSTNAME = "kvernberg.pvv.ntnu.no:8082";
BASE_URL = "kvernberg.pvv.ntnu.no:8082";
ALLOW_REGISTRATION = "yes";
REGISTRATION_BONUS_ENABLED = "yes";
REGISTRATION_BONUS = "${CURRENCY}:100";
DEFAULT_DEBT_LIMIT = "${CURRENCY}:500";
ALLOW_CONVERSION = "no";
ALLOW_EDIT_CASHOUT_PAYTO_URI = "yes";
SUGGESTED_WITHDRAWAL_EXCHANGE = "http://kvernberg.pvv.ntnu.no:8081/";
inherit CURRENCY;
};
};
};
}

View File

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

View File

@ -13,10 +13,10 @@ in {
debug = true; debug = true;
openFirewall = true; openFirewall = true;
denominationConfig = '' denominationConfig = ''
## Old denomination names cannot be used again ;; Old denomination names cannot be used again
#[COIN-${CURRENCY}-k1-1-0] ; [COIN-${CURRENCY}-k1-1-0]
## NOK Denominations ;; NOK Denominations
[coin-${CURRENCY}-nok-1-0] [coin-${CURRENCY}-nok-1-0]
VALUE = ${CURRENCY}:1 VALUE = ${CURRENCY}:1
DURATION_WITHDRAW = 7 days DURATION_WITHDRAW = 7 days
@ -125,8 +125,8 @@ in {
RSA_KEYSIZE = 2048 RSA_KEYSIZE = 2048
CIPHER = RSA CIPHER = RSA
## PVV Special Prices ;; PVV Special Prices
# 2024 pizza egenandel ; 2024 pizza egenandel
[coin-${CURRENCY}-pvv-64-0] [coin-${CURRENCY}-pvv-64-0]
VALUE = ${CURRENCY}:64 VALUE = ${CURRENCY}:64
DURATION_WITHDRAW = 7 days DURATION_WITHDRAW = 7 days
@ -147,6 +147,17 @@ in {
exchange-offline = { exchange-offline = {
MASTER_PRIV_FILE = config.sops.secrets.exchange-offline-master.path; MASTER_PRIV_FILE = config.sops.secrets.exchange-offline-master.path;
}; };
exchange-account-test = {
PAYTO_URI = "payto://x-taler-bank/bank:8082/exchange?receiver-name=Exchange";
ENABLE_DEBIT = "YES";
ENABLE_CREDIT = "YES";
};
exchange-accountcredentials-test = {
WIRE_GATEWAY_URL = "http://bank:8082/accounts/exchange/taler-wire-gateway/";
WIRE_GATEWAY_AUTH_METHOD = "BASIC";
USERNAME = "exchange";
PASSWORD = "exchange";
};
}; };
}; };
} }