diff --git a/flake.lock b/flake.lock index 8ed3eb9..7011e19 100644 --- a/flake.lock +++ b/flake.lock @@ -885,11 +885,29 @@ "nixpkgs": "nixpkgs_5", "nixpkgs-pinned": "nixpkgs-pinned", "nixpkgs-stable": "nixpkgs-stable", + "russia-blocked-geoip": "russia-blocked-geoip", "sops-nix": "sops-nix", "stylix": "stylix", "yazi": "yazi" } }, + "russia-blocked-geoip": { + "flake": false, + "locked": { + "lastModified": 1773222740, + "narHash": "sha256-x2We3wwRUjfatG5je8P9ip1snK3NvtTHv9tKlPsqOwI=", + "owner": "runetfreedom", + "repo": "russia-blocked-geoip", + "rev": "6138773989321235eac52193a889197c38efd942", + "type": "github" + }, + "original": { + "owner": "runetfreedom", + "ref": "release", + "repo": "russia-blocked-geoip", + "type": "github" + } + }, "rust-overlay": { "inputs": { "nixpkgs": "nixpkgs_2" @@ -1170,4 +1188,3 @@ "root": "root", "version": 7 } - diff --git a/flake.nix b/flake.nix index 0c44acc..9682008 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,11 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + + russia-blocked-geoip = { + url = "github:runetfreedom/russia-blocked-geoip/release"; + flake = false; + }; }; outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-pinned, home-manager, ... }@inputs: let diff --git a/modules/host/vpn.nix b/modules/host/vpn.nix index 5c0b88b..113d41c 100644 --- a/modules/host/vpn.nix +++ b/modules/host/vpn.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: { +{ inputs, pkgs, config, ... }: { systemd.services.v2raya = { enable = true; description = "v2rayA gui client"; @@ -17,12 +17,7 @@ }; environment.etc = { - "v2raya/ru_geoip.dat".source = pkgs.fetchurl { - name = "geoip.dat"; - url = "https://github.com/runetfreedom/russia-blocked-geoip/releases/download/202603040949/geoip.dat"; - hash = "sha256-TmWQqoC26+vrJ2xaRrIiPM2kp9xhrw9h9H8yjq4CA7U="; - }; - + "v2raya/ru_geoip.dat".source = "${inputs.russia-blocked-geoip}/geoip.dat"; "v2raya/bolt.db".source = config.sops.secrets.vpn_bolt.path; }; }