flake/users/guanranwang/nixos/profiles/opt-in/clash-meta-client.nix

35 lines
911 B
Nix
Raw Normal View History

2023-09-19 00:17:43 +00:00
{
pkgs,
config,
inputs,
...
2023-11-23 06:23:03 +00:00
}: {
2023-12-21 03:59:19 +00:00
services.clash = {
enable = true;
package = pkgs.clash-meta;
2023-12-25 02:58:41 +00:00
configFile = config.sops.secrets."clash-config".path;
webui = inputs.self.packages.${pkgs.system}.metacubexd;
2023-12-21 03:59:19 +00:00
};
2023-11-04 10:02:11 +00:00
### sops-nix
sops.secrets."clash-config" = {
2023-12-21 03:59:19 +00:00
owner = config.users.users."clash".name;
group = config.users.groups."clash".name;
restartUnits = ["clash.service"];
2023-11-04 10:02:11 +00:00
};
2023-10-14 09:40:12 +00:00
### System proxy settings
networking.proxy.default = "http://127.0.0.1:7890/";
2023-09-19 00:17:43 +00:00
2023-10-14 07:53:25 +00:00
### Local Clash WebUI
# You can also use the following website, just in case:
# - metacubexd:
# - GH Pages Custom Domain: http://d.metacubex.one
# - GH Pages: https://metacubex.github.io/metacubexd
# - Cloudflare Pages: https://metacubexd.pages.dev
# - yacd (Yet Another Clash Dashboard):
# - https://yacd.haishan.me
# - clash-dashboard (buggy):
# - https://clash.razord.top
}