Changed vault warden to use nginx

This commit is contained in:
Snorre Ettrup Altschul 2025-03-03 12:44:28 +01:00
parent 5832a92555
commit 37bad01424

View file

@ -1,7 +1,9 @@
{...}: let
{ config, ... }:
let
host = "127.0.0.1";
port = 8222;
in {
in
{
services.vaultwarden = {
enable = true;
@ -25,10 +27,11 @@ in {
networking.firewall.allowedTCPPorts = [ port ];
networking.firewall.allowedUDPPorts = [ port ];
services.caddy = {
enable = true;
virtualHosts."bitwarden.spoodythe.one".extraConfig = ''
reverse_proxy * ${host}:${toString port}
'';
services.nginx.virtualHosts."bitwarden.spoodythe.one" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${host}:${toString port}";
};
};
}