mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
25 lines
436 B
Nix
25 lines
436 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; {
|
|
config = let
|
|
cfg = config.elss.server.sql;
|
|
in
|
|
mkIf cfg.enable {
|
|
services.postgresql = {
|
|
enable = true;
|
|
package = pkgs.postgresql_14;
|
|
ensureDatabases = ["nextcloud"];
|
|
ensureUsers = [
|
|
{
|
|
name = "nextcloud";
|
|
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|