about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/hardware/brillo.nix
blob: 612061718fad08519db3bde23d1da6d5c4064960 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ config, lib, pkgs, ... }:

with lib;
let
  cfg = config.hardware.brillo;
in
{
  options = {
    hardware.brillo = {
      enable = mkEnableOption (lib.mdDoc ''
        brillo in userspace.
        This will allow brightness control from users in the video group
      '');
    };
  };

  config = mkIf cfg.enable {
    services.udev.packages = [ pkgs.brillo ];
    environment.systemPackages = [ pkgs.brillo ];
  };
}