9 options.programs.clash-verge = {
10 enable = lib.mkEnableOption "Clash Verge";
11 package = lib.mkOption {
12 type = lib.types.package;
14 The clash-verge package to use. Available options are
15 clash-verge-rev and clash-nyanpasu, both are forks of
16 the original clash-verge project.
18 example = "pkgs.clash-verge-rev";
20 autoStart = lib.mkEnableOption "Clash Verge auto launch";
21 tunMode = lib.mkEnableOption "Clash Verge TUN mode";
26 cfg = config.programs.clash-verge;
30 environment.systemPackages = [
32 (lib.mkIf cfg.autoStart (
33 pkgs.makeAutostartItem {
35 package = cfg.package;
40 security.wrappers.clash-verge = lib.mkIf cfg.tunMode {
43 capabilities = "cap_net_bind_service,cap_net_admin=+ep";
44 source = "${lib.getExe cfg.package}";
48 meta.maintainers = with lib.maintainers; [ zendo ];