From 10e76e51b90c445ce121db5fbaa772466bb33cde Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Tue, 26 Dec 2023 10:09:28 +0800 Subject: [PATCH] fixup! nixos: clash-meta-client: use sops templates --- .../opt-in/clash-meta-client/config.yaml | 49 +++++++++++-------- .../opt-in/clash-meta-client/default.nix | 13 ++--- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/users/guanranwang/nixos/profiles/opt-in/clash-meta-client/config.yaml b/users/guanranwang/nixos/profiles/opt-in/clash-meta-client/config.yaml index 285a087..2c0bee5 100644 --- a/users/guanranwang/nixos/profiles/opt-in/clash-meta-client/config.yaml +++ b/users/guanranwang/nixos/profiles/opt-in/clash-meta-client/config.yaml @@ -5,6 +5,13 @@ pr: &pr { type: select, proxies: [ 默认, 香港, 台湾, 日本, 新加坡, # 这里是订阅更新和延迟测试相关的 p: &p { type: http, interval: 3600, health-check: { enable: true, url: https://www.gstatic.com/generate_204, interval: 300, }, } +use: &use + type: select + use: + - efcloud + - spcloud + #- pawdroid + ######### 锚点 end ####### allow-lan: true @@ -91,25 +98,25 @@ proxy-groups: - { name: 自动选择, <<: *use, tolerance: 2, type: url-test } rules: - - GEOIP,lan,直连,no-resolve - - GEOSITE,biliintl,哔哩东南亚 - - GEOSITE,ehentai,ehentai - - GEOSITE,github,Github - - GEOSITE,twitter,Twitter - - GEOSITE,youtube,YouTube - - GEOSITE,google,Google - - GEOSITE,telegram,Telegram - - GEOSITE,netflix,NETFLIX - - GEOSITE,bilibili,哔哩哔哩 - - GEOSITE,bahamut,巴哈姆特 - - GEOSITE,spotify,Spotify - - GEOSITE,pixiv,Pixiv - - GEOSITE,geolocation-!cn,其他 + - GEOIP, lan, DIRECT, no-resolve + - GEOSITE, biliintl, 哔哩东南亚 + - GEOSITE, ehentai, ehentai + - GEOSITE, github, Github + - GEOSITE, twitter, Twitter + - GEOSITE, youtube, YouTube + - GEOSITE, google, Google + - GEOSITE, telegram, Telegram + - GEOSITE, netflix, NETFLIX + - GEOSITE, bilibili, 哔哩哔哩 + - GEOSITE, bahamut, 巴哈姆特 + - GEOSITE, spotify, Spotify + - GEOSITE, pixiv, Pixiv + - GEOSITE, geolocation-!cn, 其他 - - GEOIP,google,Google - - GEOIP,netflix,NETFLIX - - GEOIP,telegram,Telegram - - GEOIP,twitter,Twitter - - GEOSITE,CN,国内 - - GEOIP,CN,国内 - - MATCH,其他 + - GEOIP, google, Google + - GEOIP, netflix, NETFLIX + - GEOIP, telegram, Telegram + - GEOIP, twitter, Twitter + - GEOSITE, CN, 国内 + - GEOIP, CN, 国内 + - MATCH, 其他 diff --git a/users/guanranwang/nixos/profiles/opt-in/clash-meta-client/default.nix b/users/guanranwang/nixos/profiles/opt-in/clash-meta-client/default.nix index 2f04290..f4d29b9 100644 --- a/users/guanranwang/nixos/profiles/opt-in/clash-meta-client/default.nix +++ b/users/guanranwang/nixos/profiles/opt-in/clash-meta-client/default.nix @@ -25,14 +25,8 @@ owner = config.systemd.services."clash".serviceConfig.User; group = config.systemd.services."clash".serviceConfig.Group; content = - '' - use: &use - type: select - use: - - efcloud - - spcloud - #- pawdroid - + builtins.readFile ./config.yaml + + '' proxy-providers: efcloud: <<: *p @@ -43,8 +37,7 @@ #pawdroid: # <<: *p # url: "${config.sops.placeholder."clash/proxy-providers/pawdroid"}" - '' - + builtins.readFile ./config.yaml; + ''; }; ### System proxy settings