feat: created db config for panoramax

This commit is contained in:
Leyla Becker 2025-09-17 22:18:15 -05:00
parent 7e6fa744af
commit 333c68a8cd
3 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,29 @@
{
lib,
config,
...
}: {
config = lib.mkIf config.services.panoramax.enable (lib.mkMerge [
{
host = {
postgres = {
enable = true;
};
};
}
(lib.mkIf config.host.postgres.enable {
host = {
postgres = {
extraUsers = {
${config.services.panoramax.database.user} = {
isClient = true;
};
};
extraDatabases = {
${config.services.panoramax.database.name} = {};
};
};
};
})
]);
}