mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-08 14:40:07 +03:00
Make acpid actions configurable.
svn path=/nixos/trunk/; revision=20986
This commit is contained in:
parent
e3afda0a88
commit
289dcec9db
@ -29,6 +29,7 @@ let
|
|||||||
action =
|
action =
|
||||||
''
|
''
|
||||||
#! ${pkgs.bash}/bin/sh
|
#! ${pkgs.bash}/bin/sh
|
||||||
|
${config.services.acpid.powerEventCommands}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -39,6 +40,7 @@ let
|
|||||||
action =
|
action =
|
||||||
''
|
''
|
||||||
#! ${pkgs.bash}/bin/sh
|
#! ${pkgs.bash}/bin/sh
|
||||||
|
${config.services.acpid.lidEventCommands}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -49,6 +51,7 @@ let
|
|||||||
action =
|
action =
|
||||||
''
|
''
|
||||||
#! ${pkgs.bash}/bin/sh
|
#! ${pkgs.bash}/bin/sh
|
||||||
|
${config.services.acpid.acEventCommands}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -66,7 +69,22 @@ in
|
|||||||
default = false;
|
default = false;
|
||||||
description = "Whether to enable the ACPI daemon.";
|
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.";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user