From 8458e0645d77cce5c4a4eb82edba12995ef71fd9 Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Tue, 14 Jul 2026 12:24:33 +0400 Subject: [PATCH] xray: config via sops, private routes spliced into sing-box at runtime --- modules/hostel-wifi.nix | 6 ++--- modules/private/xray-routes.nix | 6 ----- modules/xray.nix | 48 ++++++++++++++++++++++++++++----- 3 files changed, 44 insertions(+), 16 deletions(-) delete mode 100644 modules/private/xray-routes.nix diff --git a/modules/hostel-wifi.nix b/modules/hostel-wifi.nix index d332716..88f0fd1 100644 --- a/modules/hostel-wifi.nix +++ b/modules/hostel-wifi.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, ... }: let - xrayServer = (import ./private/xray-routes.nix).xrayServer; wifiIf = "wlp194s0"; in { @@ -87,7 +86,8 @@ in Type = "oneshot"; RemainAfterExit = true; ExecStart = pkgs.writeShellScript "killswitch-up" '' - ${pkgs.nftables}/bin/nft -f - <<'EOF' + XRAY_SERVER=$(cat ${config.sops.secrets."xray-endpoint".path}) + ${pkgs.nftables}/bin/nft -f - <