nixos/clash-verge: add cfg.package
This commit is contained in:
parent
d40e866b1f
commit
0a5801395a
1 changed files with 4 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
options.programs.clash-verge = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Clash Verge");
|
||||
package = lib.mkPackageOption pkgs "clash-verge" {};
|
||||
autoStart = lib.mkEnableOption (lib.mdDoc "Clash Verge auto launch");
|
||||
tunMode = lib.mkEnableOption (lib.mdDoc "Clash Verge TUN mode");
|
||||
};
|
||||
|
@ -14,10 +15,10 @@
|
|||
lib.mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.clash-verge
|
||||
cfg.package
|
||||
(lib.mkIf cfg.autoStart (pkgs.makeAutostartItem {
|
||||
name = "clash-verge";
|
||||
package = pkgs.clash-verge;
|
||||
package = cfg.package;
|
||||
}))
|
||||
];
|
||||
|
||||
|
@ -25,7 +26,7 @@
|
|||
owner = "root";
|
||||
group = "root";
|
||||
capabilities = "cap_net_bind_service,cap_net_admin=+ep";
|
||||
source = "${lib.getExe pkgs.clash-verge}";
|
||||
source = "${lib.getExe cfg.package}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue