From 1f4aa4a96ffc50c0fd6d25f4025bdc493aa27c71 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Thu, 12 May 2022 18:59:30 -0400 Subject: [PATCH] Add domain configuration to vaultwarden --- modules/cloud/bitwarden/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/cloud/bitwarden/default.nix b/modules/cloud/bitwarden/default.nix index 49e5103..e3b7e8d 100644 --- a/modules/cloud/bitwarden/default.nix +++ b/modules/cloud/bitwarden/default.nix @@ -11,6 +11,8 @@ let port = 8001; notificationsPort = 8002; + + host = "bw.nkagami.me"; in { options.cloud.bitwarden = { }; @@ -26,12 +28,11 @@ in cloud.postgresql.databases = [ databaseUser ]; # traefik cloud.traefik.hosts.bitwarden = { - inherit port; - host = "bw.nkagami.me"; + inherit port host; }; cloud.traefik.hosts.bitwarden-notifications = { + inherit host; port = notificationsPort; - host = "bw.nkagami.me"; path = "/notifications/hub"; }; # systemd unit @@ -50,6 +51,8 @@ in WEBSOCKET_ENABLED = "true"; WEBSOCKET_PORT = toString notificationsPort; + + DOMAIN = "https://${host}"; }; serviceConfig = { User = user;