summary refs log tree commit diff
path: root/nixos/modules/hardware/brightnessctl.nix
blob: 341e4b791c237a96625902acfe6eb1498e34f98f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ config, lib, pkgs, ... }:

with lib;
let
  cfg = config.hardware.brightnessctl;
in
{

  options = {

    hardware.brightnessctl = {

      enable = mkOption {
        default = false;
        type = types.bool;
        description = ''
          Enable brightnessctl in userspace.
          This will allow brightness control from users in the video group.
        '';

      };
    };
  };


  config = mkIf cfg.enable {
    services.udev.packages = with pkgs; [ brightnessctl ];
  };

}