vaultwarden and postgresql
This commit is contained in:
parent
d0c72f5d3c
commit
55eb4f5ddc
10 changed files with 228 additions and 24 deletions
25
imports/postgres.nix
Normal file
25
imports/postgres.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
|
||||
ensureDatabases = [ "vaultwarden" ];
|
||||
authentication = pkgs.lib.mkOverride 10 ''
|
||||
#type database DBuser auth-method
|
||||
local all all trust
|
||||
'';
|
||||
|
||||
# When removing users or removing permissions from users here, must also remove them manually
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "vaultwarden";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
settings = {
|
||||
port = 5432;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue