Skip to content

Commit

Permalink
add option to enable/disable error correction
Browse files Browse the repository at this point in the history
  • Loading branch information
marenz2569 committed Nov 6, 2023
1 parent 32759b4 commit b1ab10c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nixos-module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ in
default = "info";
description = "under which logLevel the service should run";
};
errorCorrection = mkOption {
type = types.bool;
default = true;
description = "enable or disable error correction";
};
};


Expand All @@ -57,7 +62,7 @@ in
script = let
servers = map (x: "--server " + x) cfg.server;
in
"exec ${pkgs.telegram-decoder}/bin/telegram-decoder --config ${cfg.configFile} ${builtins.concatStringsSep " " servers} ${if cfg.offline then "--offline" else ""}&";
"exec ${pkgs.telegram-decoder}/bin/telegram-decoder --config ${cfg.configFile} ${builtins.concatStringsSep " " servers} ${if cfg.offline then "--offline" else ""} ${if cfg.errorCorrection then "" else "--disable-error-correction"}&";

environment = {
"RUST_LOG" = "${cfg.logLevel}";
Expand Down

0 comments on commit b1ab10c

Please sign in to comment.