summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2019-02-24 08:28:51 +0100
committerGitHub <noreply@github.com>2019-02-24 08:28:51 +0100
commitd4f487a78b92ebb6a9ffa3b8a8214dbd09b1a721 (patch)
treedcf84289fdf39a60c0c08d9c5021180baf8faa12 /nixos/modules/hardware
parentad2585e35015c097a61ee30c7109613249dbff76 (diff)
parent4cae259fceeb2728925ed01eab76302d1f68a0e2 (diff)
Merge pull request #56220 from SeTSeR/master
acpilight: init at 1.1
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 ];
+ };
+}