nixos: clash-meta-client: use geodata from nixpkgs

This commit is contained in:
Guanran Wang 2024-01-27 03:46:06 +08:00
parent e6d7a787a1
commit fc231ebf75
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
2 changed files with 12 additions and 21 deletions

View file

@ -20,29 +20,15 @@ use-backup: &use-backup
- ermaozi
#- jsnzkpg
allow-lan: true
port: 7890
unified-delay: true
tcp-concurrent: true
external-controller: 127.0.0.1:9090
log-level: warning
unified-delay: true
tcp-concurrent: true
geodata-mode: true
geox-url:
geoip: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat"
geosite: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat"
mmdb: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country-lite.mmdb"
find-process-mode: strict
global-client-fingerprint: chrome
profile:
store-selected: true
store-fake-ip: true
proxy-groups:
- { name: PROXY, type: select, proxies: [自动选择, 备用自动选择, DIRECT, lon0] }
- { name: 自动选择, <<: *use, tolerance: 2, type: url-test }
- { name: 备用自动选择, <<: *use-backup, tolerance: 2, type: url-test }
@ -54,11 +40,11 @@ proxy-groups:
#- { name: 新加坡, <<: *use, type: url-test, filter: "(?i)(新|sg|singapore)" }
rules:
- GEOIP, lan, DIRECT, no-resolve
- GEOSITE, bilibili, DIRECT
- GEOSITE, spotify, 台湾
- GEOSITE, CN, DIRECT
- GEOIP, CN, DIRECT
- GEOIP, lan, DIRECT, no-resolve
- GEOSITE, category-ads, REJECT
- GEOSITE, spotify, 台湾
- GEOIP, cn, DIRECT
- GEOSITE, cn, DIRECT
# 未匹配到任何规则
- MATCH, PROXY

View file

@ -11,6 +11,11 @@
webui = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.metacubexd;
};
systemd.services.clash.serviceConfig.ExecStartPre = [
"${pkgs.coreutils}/bin/ln -sf ${pkgs.v2ray-geoip}/share/v2ray/geoip.dat /var/lib/private/clash/GeoIP.dat"
"${pkgs.coreutils}/bin/ln -sf ${pkgs.v2ray-domain-list-community}/share/v2ray/geosite.dat /var/lib/private/clash/GeoSite.dat"
];
### System proxy settings
networking.proxy.default = "http://127.0.0.1:7890/";