nixos/mihomo: remove flyairport

This commit is contained in:
Guanran Wang 2024-08-11 00:28:50 +08:00
parent 934545de48
commit 9d5da09a3a
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
3 changed files with 8 additions and 15 deletions

View file

@ -11,7 +11,6 @@ use: &use
type: select type: select
use: use:
- efcloud - efcloud
- flyairport
- spcloud - spcloud
port: 7890 port: 7890
@ -30,9 +29,6 @@ proxy-providers:
efcloud: efcloud:
<<: *fetch <<: *fetch
url: "@clash/proxy-providers/efcloud@" url: "@clash/proxy-providers/efcloud@"
flyairport:
<<: *fetch
url: "@clash/proxy-providers/flyairport@"
spcloud: spcloud:
<<: *fetch <<: *fetch
url: "@clash/proxy-providers/spcloud@" url: "@clash/proxy-providers/spcloud@"

View file

@ -10,10 +10,10 @@
webui = pkgs.metacubexd; webui = pkgs.metacubexd;
}; };
systemd.services.mihomo.serviceConfig.ExecStartPre = [ systemd.services.mihomo.serviceConfig.preStart = ''
"${pkgs.coreutils}/bin/ln -sf ${pkgs.v2ray-geoip}/share/v2ray/geoip.dat /var/lib/private/mihomo/GeoIP.dat" ${pkgs.coreutils}/bin/ln -sf ${pkgs.v2ray-geoip}/share/v2ray/geoip.dat /var/lib/private/mihomo/GeoIP.dat
"${pkgs.coreutils}/bin/ln -sf ${pkgs.v2ray-domain-list-community}/share/v2ray/geosite.dat /var/lib/private/mihomo/GeoSite.dat" ${pkgs.coreutils}/bin/ln -sf ${pkgs.v2ray-domain-list-community}/share/v2ray/geosite.dat /var/lib/private/mihomo/GeoSite.dat
]; '';
### System proxy settings ### System proxy settings
networking.proxy.default = "http://127.0.0.1:7890/"; networking.proxy.default = "http://127.0.0.1:7890/";
@ -34,13 +34,12 @@
"clash/secret" = {}; "clash/secret" = {};
"clash/proxies/lightsail" = {}; "clash/proxies/lightsail" = {};
"clash/proxy-providers/efcloud" = {}; "clash/proxy-providers/efcloud" = {};
"clash/proxy-providers/flyairport" = {};
"clash/proxy-providers/spcloud" = {}; "clash/proxy-providers/spcloud" = {};
}; };
# why not substituteAll? see https://github.com/NixOS/nixpkgs/issues/237216 # why not substituteAll? see https://github.com/NixOS/nixpkgs/issues/237216
sops.templates."clash.yaml".file = let sops.templates."clash.yaml".file = let
substituteV2 = {src, ...} @ args: let substituteAll' = {src, ...} @ args: let
args' = lib.removeAttrs args ["src"]; args' = lib.removeAttrs args ["src"];
in in
pkgs.substitute { pkgs.substitute {
@ -48,14 +47,13 @@
substitutions = lib.flatten (lib.mapAttrsToList (n: v: ["--subst-var-by" n v]) args'); substitutions = lib.flatten (lib.mapAttrsToList (n: v: ["--subst-var-by" n v]) args');
}; };
in in
substituteV2 { substituteAll' {
src = ./config.yaml; src = ./config.yaml;
inherit inherit
(config.sops.placeholder) (config.sops.placeholder)
"clash/secret" "clash/secret"
"clash/proxies/lightsail" "clash/proxies/lightsail"
"clash/proxy-providers/efcloud" "clash/proxy-providers/efcloud"
"clash/proxy-providers/flyairport"
"clash/proxy-providers/spcloud" "clash/proxy-providers/spcloud"
; ;
}; };

View file

@ -3,7 +3,6 @@ clash:
proxies: proxies:
lightsail: ENC[AES256_GCM,data:YfyZsBi3yMIAMIjotAk4g4M+yYYozSSbKE77oz3lwbRHCMVJqxeo5nR04HrG8Hy2mQvVV09et1MbgnDMhEaSERZvsfaBojFUoRE6Du18n1ET8P1/ez5aKgC6ZnHy90a99mktqD4QDGNE8VDX2xBtNcVLF6i9dJ9di9tJEtnOdw+Q,iv:/uqtX6E2I0sqSWt2FmKwzG9zQb2TjdQqfDBZQXLh8cs=,tag:ofvc5GKEPrizajUaevI1jA==,type:str] lightsail: ENC[AES256_GCM,data:YfyZsBi3yMIAMIjotAk4g4M+yYYozSSbKE77oz3lwbRHCMVJqxeo5nR04HrG8Hy2mQvVV09et1MbgnDMhEaSERZvsfaBojFUoRE6Du18n1ET8P1/ez5aKgC6ZnHy90a99mktqD4QDGNE8VDX2xBtNcVLF6i9dJ9di9tJEtnOdw+Q,iv:/uqtX6E2I0sqSWt2FmKwzG9zQb2TjdQqfDBZQXLh8cs=,tag:ofvc5GKEPrizajUaevI1jA==,type:str]
proxy-providers: proxy-providers:
flyairport: ENC[AES256_GCM,data:x6li/5tWuAX9ZvLVUETLaBDqjB8pb8vSD9jD8HDMXNiiilq03RVHx7eXTiWMVJMlRUBOxvhTXH1fQxzye34aZQMx4BftMOQzvG5soF/P+K5hGapC9wbFnoH8znHkAdIgRLIeDBHRix3ll2OqGhqCENkWF4jjs/Pxqfz5bJlhcA==,iv:lO59riu5seloBRIy8QG02afNciEKvElzovLyaX90iSA=,tag:/L+elOLB2agQdRvg9tR0WQ==,type:str]
efcloud: ENC[AES256_GCM,data:36mToXGiHVAgM4vVQFOYvNPaHHuVf4mtvnNOgMBTyzbZ/mKpT1Exx7rWZ7i9EVBy5eX7SJtKmnHs0CqD48hr7R708W2oW3YNPEfkK7aGDqfQFyS1TVjT+MM=,iv:+qiFyM10fcAjcdyVZCC+0hb83GYENooM52+1GPXpamQ=,tag:wZupiFJMQq8A5ZwJtjXiOg==,type:str] efcloud: ENC[AES256_GCM,data:36mToXGiHVAgM4vVQFOYvNPaHHuVf4mtvnNOgMBTyzbZ/mKpT1Exx7rWZ7i9EVBy5eX7SJtKmnHs0CqD48hr7R708W2oW3YNPEfkK7aGDqfQFyS1TVjT+MM=,iv:+qiFyM10fcAjcdyVZCC+0hb83GYENooM52+1GPXpamQ=,tag:wZupiFJMQq8A5ZwJtjXiOg==,type:str]
spcloud: ENC[AES256_GCM,data:gmJM+sTTaUrIxQXRBlDtE+K1gEfseMPUC2AQLq1LeY6iQmgq3wK7oJlz+buLbm/LUDitvls9d517905hz/Mpp2F7ohBeW9m1Jkcvdh/Zfgnfqg==,iv:FPe//+/ZMDZloZg2AnQ7JXRzqZdKDjLYs3wqMxqNA/Y=,tag:JPEU/WnUfy8bNlhAgPQwJw==,type:str] spcloud: ENC[AES256_GCM,data:gmJM+sTTaUrIxQXRBlDtE+K1gEfseMPUC2AQLq1LeY6iQmgq3wK7oJlz+buLbm/LUDitvls9d517905hz/Mpp2F7ohBeW9m1Jkcvdh/Zfgnfqg==,iv:FPe//+/ZMDZloZg2AnQ7JXRzqZdKDjLYs3wqMxqNA/Y=,tag:JPEU/WnUfy8bNlhAgPQwJw==,type:str]
sops: sops:
@ -48,8 +47,8 @@ sops:
UG9TTEV5R0R2bm5lUTAwSWlaelJFcW8KfBuQEVhkYJ74wYUjEcFYXFf9oWSSdkGR UG9TTEV5R0R2bm5lUTAwSWlaelJFcW8KfBuQEVhkYJ74wYUjEcFYXFf9oWSSdkGR
Yu5lpV9UsjaiJxaD1Qp4xtNgMzzLW7q6surQGEReTDBbN1ZCx+S3Aw== Yu5lpV9UsjaiJxaD1Qp4xtNgMzzLW7q6surQGEReTDBbN1ZCx+S3Aw==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-07-09T22:04:17Z" lastmodified: "2024-08-10T15:24:00Z"
mac: ENC[AES256_GCM,data:iKwYqxBllI8SydCUjyK2cJkcUKVj4CqjmfDSMNJtLwM6IWUoOScV4Pu0YJz0aui5F8nbyC92vdDwsE599GZMTWdCH20MeWEMo7pbkPFxxL1bY5BMCNNE3Tm354nz4ihmBXMB9aI1JRiSareV5yQ1v6lOxzDargDigMrPI/6DRfo=,iv:JRvJQ3YdFZsBstT55xKcCMGJODy42FImugHbwEbpV2I=,tag:go33lpTdouZoFk53g9FXTw==,type:str] mac: ENC[AES256_GCM,data:BGF/DAfOhdw0YZ6PGipXu0sL9+8E1s509bg89dMnAtf1WfreFCQMuHe7uqfkC3Be99proNgJ1O5fWTENaynXyMKto1YF+7z9ZZ3CCOceFLNqbBucaxRFAO+tkMlVixLoqIvEHdyoZD+iM45wOO6mn+/o6wR/z3Ze36wmZCJ1+4c=,iv:s9N2lNx1SwPm0qNyqgGm2Qp5zS4xIhxwp2kj7sQmcQc=,tag:o1/WS7b7FR//IZK1iNQkCg==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.9.0 version: 3.9.0