diff --git a/nixos/hosts/asxpio-services/xray.nix b/nixos/hosts/asxpio-services/xray.nix index ecc9976..78208cd 100644 --- a/nixos/hosts/asxpio-services/xray.nix +++ b/nixos/hosts/asxpio-services/xray.nix @@ -1,14 +1,16 @@ # Xray VLESS Reality on :443. The whole config is a secret (keys, UUIDs). { config, unstable, ... }: { - sops.secrets."xray/config" = { }; + # Restart on a change of this secret only: Xray may carry the admin's + # uplink, and anything else changing in the secrets file must not + # interrupt it + sops.secrets."xray/config".restartUnits = [ "xray.service" ]; services.xray = { enable = true; package = unstable.xray; # 26.05 has 26.3, production runs 26.11 settingsFile = config.sops.secrets."xray/config".path; }; - systemd.services.xray.restartTriggers = [ config.sops.secrets."xray/config".sopsFile ]; networking.firewall.allowedTCPPorts = [ 443 ]; asxpio.security.ports = [ "tcp/443/.xray-wrapped"