Make acpid actions configurable.

svn path=/nixos/trunk/; revision=20986
This commit is contained in:
Andres Löh 2010-04-08 15:27:20 +00:00
parent e3afda0a88
commit 289dcec9db

View File

@ -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.";
};
};
};