From 289dcec9db00e2086a45c37065e6556d4e3fd8e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andres=20L=C3=B6h?= Date: Thu, 8 Apr 2010 15:27:20 +0000 Subject: [PATCH] Make acpid actions configurable. svn path=/nixos/trunk/; revision=20986 --- modules/services/hardware/acpid.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/services/hardware/acpid.nix b/modules/services/hardware/acpid.nix index e9fd8e46dc92..a846f3b71170 100644 --- a/modules/services/hardware/acpid.nix +++ b/modules/services/hardware/acpid.nix @@ -29,6 +29,7 @@ let action = '' #! ${pkgs.bash}/bin/sh + ${config.services.acpid.powerEventCommands} ''; }; @@ -39,6 +40,7 @@ let action = '' #! ${pkgs.bash}/bin/sh + ${config.services.acpid.lidEventCommands} ''; }; @@ -49,6 +51,7 @@ let action = '' #! ${pkgs.bash}/bin/sh + ${config.services.acpid.acEventCommands} ''; }; @@ -66,7 +69,22 @@ in default = false; description = "Whether to enable the ACPI daemon."; }; - + + powerEventCommands = mkOption { + default = ""; + description = "Shell commands to execute on a button/power.* event."; + }; + + lidEventCommands = mkOption { + default = ""; + description = "Shell commands to execute on a button/lid.* event."; + }; + + acEventCommands = mkOption { + default = ""; + description = "Shell commands to execute on a ac_adapter.* event."; + }; + }; };