2024-10-21 12:17:54 +02:00
|
|
|
#
|
|
|
|
# System notifications
|
|
|
|
#
|
|
|
|
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.vaultwarden = {
|
|
|
|
enable = true;
|
|
|
|
dbBackend = "postgresql";
|
|
|
|
environmentFile = config.age.secrets."services/vaultwarden/environment".path;
|
|
|
|
config = {
|
|
|
|
DOMAIN = "https://vault.kabtop.de";
|
|
|
|
SIGNUPS_ALLOWED = false;
|
|
|
|
ROCKET_ADDRESS = "127.0.0.1";
|
|
|
|
ROCKET_PORT = 8222;
|
|
|
|
|
|
|
|
ROCKET_LOG = "critical";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
virtualHosts = {
|
2024-10-21 14:28:12 +02:00
|
|
|
"vault.kabtop.de" = {
|
2024-10-21 12:17:54 +02:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-10-21 14:07:47 +02:00
|
|
|
|
|
|
|
systemd.services = {
|
|
|
|
vaultwarden = {
|
|
|
|
requires = [ "postgresql.service" ];
|
|
|
|
};
|
|
|
|
};
|
2024-10-21 12:17:54 +02:00
|
|
|
age.secrets."services/vaultwarden/environment" = {
|
|
|
|
file = ../../../secrets/services/vaultwarden/environment.age;
|
|
|
|
owner = "vaultwarden";
|
|
|
|
};
|
|
|
|
}
|