Personal Nix setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update vaultwarden caddy settings

+5 -20
+2 -9
modules/server/caddy.nix
··· 16 16 port = toString cfg.vaultwarden.port; 17 17 wsPort = toString cfg.vaultwarden.websocketPort; 18 18 in if vaultwardenEnabled then '' 19 - handle_path /vault { 20 - redir * /vault/ 21 - } 22 - 23 - handle_path /vault/* { 24 - reverse_proxy /notifications/hub/negotiate 127.0.0.1:${port} 25 - reverse_proxy /notifications/hub 127.0.0.1:${wsPort} 26 - reverse_proxy 127.0.0.1:${port} { 19 + route /vault* { 20 + reverse_proxy /vault/* 127.0.0.1:${port} { 27 21 header_up X-Real-IP {remote_host} 28 22 } 29 23 } ··· 47 41 48 42 tailscaleConfig = if tailscaleEnabled then '' 49 43 ${hostname}.${domain} { 50 - bind tailscale0 51 44 tls { 52 45 protocols tls1.3 53 46 }
+3 -11
modules/server/vaultwarden.nix
··· 18 18 description = "Vaultwarden HTTP port."; 19 19 type = types.port; 20 20 }; 21 - 22 - websocketPort = mkOption { 23 - default = 8001; 24 - description = "Vaultwarden WebSocket port."; 25 - type = types.port; 26 - }; 27 21 }; 28 22 29 23 config = mkIf (cfg.enable && cfg.vaultwarden.enable) { ··· 40 34 41 35 services.vaultwarden = let 42 36 baseURL = if (cfg.caddy.enable && cfg.tailscale.enable) 43 - then "https://${hostname}.${cfg.tailscale.domain}/vault/" 44 - else if cfg.caddy.enable then "http://${address}/vault/" 45 - else "http://${address}:${toString cfg.vaultwarden.port}/vault/"; 37 + then "https://${hostname}.${cfg.tailscale.domain}/vault" 38 + else if cfg.caddy.enable then "http://${address}/vault" 39 + else "http://${address}:${toString cfg.vaultwarden.port}/vault"; 46 40 in { 47 41 enable = true; 48 42 dbBackend = "sqlite"; ··· 50 44 config = { 51 45 IP_HEADER = "X-Real-IP"; 52 46 DOMAIN = baseURL; 53 - WEBSOCKET_ADDRESS = "127.0.0.1"; 54 47 ROCKET_ADDRESS = "127.0.0.1"; 55 - WEBSOCKET_PORT = toString cfg.vaultwarden.websocketPort; 56 48 ROCKET_PORT = toString cfg.vaultwarden.port; 57 49 ROCKET_LIMITS = "{json=10485760}"; 58 50