diff --git a/flake.lock b/flake.lock index 8c86c97..ea42019 100755 --- a/flake.lock +++ b/flake.lock @@ -426,11 +426,11 @@ }, "zeroq-credentials": { "locked": { - "lastModified": 1767531779, - "narHash": "sha256-VsWgM6Smejb8DN2FCHpPiyxi+suNuqs8wa32zkwCPpc=", + "lastModified": 1767546811, + "narHash": "sha256-Dlt+ejZ4WQy9DiGB/Sb4M/HyJCSROCrdCsiWMT/QxXg=", "ref": "refs/heads/master", - "rev": "2df427f5ee6378a690fe0e792e19d74b08b96d4c", - "revCount": 64, + "rev": "bd86b0347cedd43a28db75ed6a40d559945e5b2d", + "revCount": 65, "type": "git", "url": "ssh://git@github.com/oqyude/zeroq-credentials.git" }, diff --git a/modules/vds/nginx.nix b/modules/vds/nginx.nix index 2f59110..2e10ea6 100644 --- a/modules/vds/nginx.nix +++ b/modules/vds/nginx.nix @@ -7,10 +7,7 @@ let server = "100.64.0.0"; in { - environment.etc."nginx/.htpasswd".text = '' - test:$apr1$3m7iYgVv$31i.S8LP3i8dKuOIBhoeE1 - oqyude:$apr1$SOZTZPw9$33dfsailwRjmgbpeohYtQ. - ''; + environment.etc."nginx/pubray".text = inputs.zeroq-credentials.services.xray.auth; users.users.nginx.extraGroups = [ "acme" ]; services = { nginx = { @@ -23,11 +20,11 @@ in "sub.zeroq.ru" = { enableACME = true; forceSSL = true; - root = "/var/www/sub"; + root = "${inputs.zeroq-credentials.services.xray.subs}"; locations."/" = { extraConfig = '' auth_basic "Restricted"; - auth_basic_user_file /etc/nginx/.htpasswd; + auth_basic_user_file /etc/nginx/pubray; autoindex off; satisfy all; diff --git a/modules/vds/xray.nix b/modules/vds/xray.nix index d82445b..7fc3ffe 100644 --- a/modules/vds/xray.nix +++ b/modules/vds/xray.nix @@ -7,7 +7,7 @@ { services.xray = { enable = true; - settings = inputs.zeroq-credentials.services.xray; + settings = inputs.zeroq-credentials.services.xray.config; }; networking.firewall = {