logiops: Fix filename

This commit is contained in:
PapaTutuWawa 2022-05-30 14:52:07 +02:00
parent 0e806bab3a
commit 1d630ebc57

View File

@ -5,10 +5,18 @@ let
in {
options.ptw.services.logiops = {
enable = lib.mkEnableOption "Enable logiops";
renice = lib.mkOption {
description = "Set the nice value of the process";
default = true;
};
reniceValue = lib.mkOption {
description = "Set the nice value of the process";
default = -19;
};
};
config = lib.mkIf true {
environment.etc."logid.conf".text = ''
environment.etc."logid.cfg".text = ''
devices: (
{
name: "Wireless Mouse MX Master 3";
@ -25,7 +33,9 @@ devices: (
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.logiops}/bin/logid";
ExecStart = let
renice = lib.optionalString cfg.renice "${pkgs.coreutils-full}/bin/nice -n ${builtins.toString cfg.reniceValue}";
in "${renice} ${pkgs.logiops}/bin/logid";
};
};
};