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

with lib;
let
  cfg = config.hardware.brillo;
in
{
  options = {
    hardware.brillo = {
      enable = mkEnableOption (lib.mdDoc ''
        Enable 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 ];
  };
}