From adc6487ae015ac319de901973571988c9aba82d1 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 29 Jan 2022 19:39:57 +0100 Subject: [PATCH] properly set up nginx for bitwarden --- nixos/configs/robi/vaultwarden.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/nixos/configs/robi/vaultwarden.nix b/nixos/configs/robi/vaultwarden.nix index a32ffa8..076242c 100644 --- a/nixos/configs/robi/vaultwarden.nix +++ b/nixos/configs/robi/vaultwarden.nix @@ -9,5 +9,24 @@ rocketLog = "critical"; }; }; - #backup.dirs = [ "/var/lib/bitwarden_rs" ]; + + backup.dirs = [ "/var/lib/bitwarden_rs" ]; + + services.nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts = { + + "bitwarden.ingolf-wagner.de" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:${ + toString config.services.vaultwarden.config.rocketPort + }"; + }; + }; + }; + }; + }