services: vaultwarden: create database and user
This commit is contained in:
parent
183b2c4de6
commit
2825409d83
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue