Kontist authorized but shared no accounts: psu_type was hardcoded to personal, and Enable Banking documents that a psu_type mismatch can yield a consent without the expected accounts. The bank listing now reports each institution's supported psu_types, the connect form offers only those, the chosen type reaches POST /auth, and an unsupported combination is refused before the user is sent to a bank. The choice is stored per consent so reconnecting reuses it; consents predating the choice stay personal. Also repairs the frontend derivation, which the Montserrat dependency broke: npmDepsHash was stale and web/public was missing from the fileset, so the traced duck icon never reached the built assets.
73 lines
1.7 KiB
Nix
73 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
buildNpmPackage,
|
|
nodejs,
|
|
stdenv,
|
|
}:
|
|
let
|
|
# Explicit allowlist: never include live finance/, secrets/, .env, node_modules,
|
|
# generated binaries, or a local DuckDB file in either package derivation.
|
|
root = ../.;
|
|
source = lib.fileset.toSource {
|
|
inherit root;
|
|
fileset = lib.fileset.unions [
|
|
../go.mod
|
|
../go.sum
|
|
../cmd
|
|
../internal
|
|
../web/embed.go
|
|
];
|
|
};
|
|
frontend = buildNpmPackage {
|
|
pname = "finance-duck-frontend";
|
|
version = "0.1.0";
|
|
inherit nodejs;
|
|
src = lib.fileset.toSource {
|
|
root = ../web;
|
|
fileset = lib.fileset.unions [
|
|
../web/src
|
|
../web/public
|
|
../web/index.html
|
|
../web/package.json
|
|
../web/package-lock.json
|
|
../web/tsconfig.json
|
|
../web/vite.config.ts
|
|
];
|
|
};
|
|
npmDepsHash = "sha256-u1pe2mJk8eyzzyZ1O55kxUhxdpHRCIyGOeuuP1RILFs=";
|
|
npmFlags = [ "--ignore-scripts" ];
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p "$out"
|
|
cp -r dist/. "$out/"
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
in
|
|
buildGoModule {
|
|
pname = "finance-duck";
|
|
version = "0.1.0";
|
|
src = source;
|
|
vendorHash = "sha256-ks/X1pmBjX1BTyQBSpvn1EbbUuv8RMi4n7at+o31mnw=";
|
|
proxyVendor = true;
|
|
env.CGO_ENABLED = "1";
|
|
nativeBuildInputs = [ stdenv.cc ];
|
|
subPackages = [ "cmd/finance-duck" ];
|
|
postConfigure = ''
|
|
mkdir -p web/dist
|
|
cp -r ${frontend}/. web/dist/
|
|
'';
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
go test ./internal/...
|
|
runHook postCheck
|
|
'';
|
|
passthru = { inherit frontend; };
|
|
meta = {
|
|
description = "Private personal finance dashboard with canonical plaintext journals";
|
|
mainProgram = "finance-duck";
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|