nixos/taler: explicitly specify configFile

else the executables fail to work.
This commit is contained in:
eljamm 2025-05-29 10:49:45 +02:00 committed by Valentin Gagarin
parent 18f8cabb0a
commit 5db5bd097c
2 changed files with 8 additions and 4 deletions

View file

@ -25,6 +25,8 @@ let
"secmod-eddsa"
"secmod-rsa"
];
configFile = config.environment.etc."taler/taler.conf".source;
in
{
@ -140,14 +142,14 @@ in
lib.pipe servicesDB [
(map (name: ''
GRANT SELECT,INSERT,UPDATE${deletePerm name} ON ALL TABLES IN SCHEMA exchange TO "taler-exchange-${name}";
GRANT USAGE ON SCHEMA exchange TO "taler-exchange-${name}";
GRANT USAGE ON ALL SEQUENCES IN SCHEMA exchange TO "taler-exchange-${name}";
''))
lib.concatStrings
]
);
in
''
${lib.getExe' cfg.package "taler-exchange-dbinit"}
${lib.getExe' cfg.package "taler-exchange-dbinit"} -c ${configFile}
psql -U taler-exchange-httpd -f ${dbScript}
'';
};

View file

@ -19,6 +19,8 @@ let
"depositcheck"
"exchange"
];
configFile = config.environment.etc."taler/taler.conf".source;
in
{
imports = [
@ -95,13 +97,13 @@ in
lib.concatStrings (
map (name: ''
GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA merchant TO "taler-merchant-${name}";
GRANT USAGE ON SCHEMA merchant TO "taler-merchant-${name}";
GRANT USAGE ON ALL SEQUENCES IN SCHEMA merchant TO "taler-merchant-${name}";
'') servicesDB
)
);
in
''
${lib.getExe' cfg.package "taler-merchant-dbinit"}
${lib.getExe' cfg.package "taler-merchant-dbinit"} -c ${configFile}
psql -U taler-${talerComponent}-httpd -f ${dbScript}
'';
};