ma bitwarden: finish migration

This commit is contained in:
makefu 2021-12-17 21:11:21 +01:00
parent b6ed4481c8
commit 4b658aff26

View file

@ -2,7 +2,7 @@
let let
port = 8812; port = 8812;
in { in {
services.bitwarden_rs = { services.vaultwarden = {
enable = true; enable = true;
dbBackend = "postgresql"; dbBackend = "postgresql";
config.signups_allowed = false; config.signups_allowed = false;
@ -13,17 +13,15 @@ in {
config.websocket_enabled = true; config.websocket_enabled = true;
}; };
systemd.services.bitwarden_rs.after = [ "postgresql.service" ]; systemd.services.vaultwarden.after = [ "postgresql.service" ];
services.postgresql = { services.postgresql = {
enable = true; enable = true;
ensureDatabases = [ "bitwarden" ]; ensureDatabases = [ "bitwarden" ];
ensureUsers = [ { name = "bitwarden_rs"; ensurePermissions."DATABASE bitwarden" = "ALL PRIVILEGES"; } ]; ensureUsers = [
#initialScript = pkgs.writeText "postgresql-init.sql" '' { name = "bitwarden_rs"; ensurePermissions."DATABASE bitwarden" = "ALL PRIVILEGES"; }
# CREATE DATABASE bitwarden; { name = "vaultwarden"; ensurePermissions."DATABASE bitwarden" = "ALL PRIVILEGES"; }
# CREATE USER bitwardenuser WITH PASSWORD '${dbPassword}'; ];
# GRANT ALL PRIVILEGES ON DATABASE bitwarden TO bitwardenuser;
#'';
}; };
services.nginx.virtualHosts."bw.euer.krebsco.de" ={ services.nginx.virtualHosts."bw.euer.krebsco.de" ={