VEGAS: add Bitwarden service

This commit is contained in:
Max Headroom 2021-10-16 19:34:42 +02:00
parent e149b8e16f
commit bddf3bfcf8
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,20 @@
{ config, lib, tools, ... }:
with tools.nginx;
{
services.nginx.virtualHosts = mappers.mapSubdomains {
keychain = vhosts.proxy "http://127.0.0.1:${builtins.toString config.services.bitwarden_rs.config.rocketPort}";
};
services.bitwarden_rs = {
enable = true;
backupDir = "/srv/storage/private/bitwarden/backups";
config = {
dataFolder = "/srv/storage/private/bitwarden/data";
rocketPort = 32002;
};
#environmentFile = ""; # TODO: agenix
};
systemd.services.bitwarden_rs.serviceConfig = {
ReadWriteDirectories = "/srv/storage/private/bitwarden";
};
systemd.services.backup-bitwarden_rs.environment.DATA_FOLDER = lib.mkForce config.services.bitwarden_rs.config.dataFolder;
}

View file

@ -15,6 +15,7 @@
# Services
./services/backbone-routing
./services/bitwarden
./services/dns
./services/fbi
]