helm/hosts/ao/modules/vaultwarden.nix

34 lines
817 B
Nix
Raw Normal View History

2021-01-20 00:43:03 -08:00
{ config, lib, ... }:
{
modules.services.vaultwarden.enable = true;
2021-01-20 00:43:03 -08:00
services.vaultwarden.config = {
2021-01-20 00:43:03 -08:00
signupsAllowed = false;
invitationsAllowed = true;
domain = "https://p.v0.io";
httpPort = 8002;
};
# Inject secrets at runtime
systemd.services.vaultwarden.serviceConfig = {
EnvironmentFile = [ config.age.secrets.vaultwarden-smtp-env.path ];
2021-01-20 00:43:03 -08:00
Restart = "on-failure";
RestartSec = "2s";
};
services.nginx.virtualHosts."p.v0.io" = {
forceSSL = true;
enableACME = true;
2021-01-30 14:07:52 -08:00
root = "/srv/www/p.v0.io";
2021-01-20 00:43:03 -08:00
extraConfig = ''
client_max_body_size 128M;
'';
locations = {
"/".proxyPass = "http://127.0.0.1:8000";
"/notifications/hub".proxyWebsockets = true;
"/notifications/hub/negotiate".proxyPass = "http://127.0.0.1:8001";
};
};
}