services: vaultwarden: create database and user

This commit is contained in:
Antoine Martin 2023-11-15 10:56:04 +01:00
parent 183b2c4de6
commit 2825409d83

View file

@ -41,6 +41,16 @@ in {
config = mkIf cfg.enable {
services.postgresql = {
enable = true;
ensureDatabases = ["vaultwarden"];
ensureUsers = [
{
name = "vaultwarden";
ensurePermissions = {
"DATABASE vaultwarden" = "ALL PRIVILEGES";
};
}
];
};
services.postgresqlBackup = {