summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorSergey Makarov <setser200018@gmail.com>2019-02-22 22:45:16 +0300
committerSergey Makarov <setser200018@gmail.com>2019-02-24 00:09:11 +0300
commit4cae259fceeb2728925ed01eab76302d1f68a0e2 (patch)
treed4286b543380b012d1f18182c0d03f4b65d3b3e1 /nixos/modules/hardware
parentb4d914c7bc17d4a378e51f4ea2cbde08dfe5e024 (diff)
acpilight: init at 1.1
Use pname instead of manual adding version to package name
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/acpilight.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/nixos/modules/hardware/acpilight.nix b/nixos/modules/hardware/acpilight.nix
new file mode 100644
index 000000000000..34e8a2220965
--- /dev/null
+++ b/nixos/modules/hardware/acpilight.nix
@@ -0,0 +1,24 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.hardware.acpilight;
+in
+{
+ options = {
+ hardware.acpilight = {
+ enable = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Enable acpilight.
+ This will allow brightness control via xbacklight from users in the video group
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ services.udev.packages = with pkgs; [ acpilight ];
+ };
+}