modules: make --verbose conditional on services.ihtc.verbose

This commit is contained in:
Kreato 2026-06-01 21:59:55 +03:00
commit 9b2568baa1
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -12,7 +12,8 @@ in
config = lib.mkIf cfg.enable {
launchd.user.agents.ihtc = {
command = "${self.packages.${system}.ihtc}/bin/ihtc --listen 127.0.0.1:${toString cfg.port} --refrag ${toString cfg.refrag} --auto-proxy --verbose"
command = "${self.packages.${system}.ihtc}/bin/ihtc --listen 127.0.0.1:${toString cfg.port} --refrag ${toString cfg.refrag} --auto-proxy"
+ lib.optionalString cfg.verbose " --verbose"
+ lib.optionalString (cfg.patterns != [ ]) " --regex '${regex}'";
serviceConfig = {
RunAtLoad = true;

View file

@ -15,7 +15,8 @@ in
description = "ihtc DPI bypass proxy";
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${self.packages.${system}.ihtc}/bin/ihtc --listen 127.0.0.1:${toString cfg.port} --refrag ${toString cfg.refrag} --verbose"
ExecStart = "${self.packages.${system}.ihtc}/bin/ihtc --listen 127.0.0.1:${toString cfg.port} --refrag ${toString cfg.refrag}"
+ lib.optionalString cfg.verbose " --verbose"
+ lib.optionalString (cfg.patterns != [ ]) " --regex '${regex}'";
Restart = "always";
};