Personal Nix setup
0
fork

Configure Feed

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

Add configs for vaultwarden ports

+22 -7
+7 -4
modules/server/caddy.nix
··· 12 12 jellyfinEnabled = cfg.jellyfin.enable; 13 13 hassEnabled = cfg.home-assistant.enable; 14 14 15 - vaultwardenHandlerConfig = if vaultwardenEnabled then '' 15 + vaultwardenHandlerConfig = let 16 + port = toString cfg.vaultwarden.port; 17 + wsPort = toString cfg.vaultwarden.websocketPort; 18 + in if vaultwardenEnabled then '' 16 19 handle_path /vault { 17 20 redir * /vault/ 18 21 } 19 22 20 23 handle_path /vault/* { 21 - reverse_proxy /notifications/hub/negotiate 127.0.0.1:8000 22 - reverse_proxy /notifications/hub 127.0.0.1:8001 23 - reverse_proxy 127.0.0.1:8000 { 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} { 24 27 header_up X-Real-IP {remote_host} 25 28 } 26 29 }
+15 -3
modules/server/vaultwarden.nix
··· 12 12 description = "Whether to enable Vaultwarden."; 13 13 type = types.bool; 14 14 }; 15 + 16 + port = mkOption { 17 + default = 8000; 18 + description = "Vaultwarden HTTP port."; 19 + type = types.port; 20 + }; 21 + 22 + websocketPort = mkOption { 23 + default = 8001; 24 + description = "Vaultwarden WebSocket port."; 25 + type = types.port; 26 + }; 15 27 }; 16 28 17 29 config = mkIf (cfg.enable && cfg.vaultwarden.enable) { ··· 19 31 baseURL = if (cfg.caddy.enable && cfg.tailscale.enable) 20 32 then "https://${hostname}.${cfg.tailscale.domain}/vault/" 21 33 else if cfg.caddy.enable then "http://${address}/vault/" 22 - else "http://${address}:8000/vault/"; 34 + else "http://${address}:${toString cfg.vaultwarden.port}/vault/"; 23 35 in { 24 36 enable = true; 25 37 dbBackend = "sqlite"; ··· 31 43 DOMAIN = baseURL; 32 44 WEBSOCKET_ADDRESS = "127.0.0.1"; 33 45 ROCKET_ADDRESS = "127.0.0.1"; 34 - WEBSOCKET_PORT = "8001"; 35 - ROCKET_PORT = "8000"; 46 + WEBSOCKET_PORT = toString cfg.vaultwarden.websocketPort; 47 + ROCKET_PORT = toString cfg.vaultwarden.port; 36 48 ROCKET_LIMITS = "{json=10485760}"; 37 49 }; 38 50 };