nixos/acpid: add option to log events

Changed files
+7 -1
nixos
modules
services
hardware
+7 -1
nixos/modules/services/hardware/acpid.nix
···
description = "Whether to enable the ACPI daemon.";
};
+
logEvents = mkOption {
+
type = types.bool;
+
default = false;
+
description = "Log all event activity.";
+
};
+
handlers = mkOption {
type = types.attrsOf (types.submodule {
options = {
···
ConditionPathExists = [ "/proc/acpi" ];
};
-
script = "acpid --confdir ${acpiConfDir}";
+
script = "acpid ${optionalString config.services.acpid.logEvents "--logevents"} --confdir ${acpiConfDir}";
};
};