summary refs log tree commit diff
path: root/nixos/modules/hardware/acpilight.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/hardware/acpilight.nix')
-rw-r--r--nixos/modules/hardware/acpilight.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixos/modules/hardware/acpilight.nix b/nixos/modules/hardware/acpilight.nix
new file mode 100644
index 00000000000..2de448a265c
--- /dev/null
+++ b/nixos/modules/hardware/acpilight.nix
@@ -0,0 +1,25 @@
+{ 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 {
+    environment.systemPackages = with pkgs; [ acpilight ];
+    services.udev.packages = with pkgs; [ acpilight ];
+  };
+}