summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware/brillo.nix
blob: afc31981a36482f148649fb28faa001483514036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.hardware.brillo;
in
{
  options = {
    hardware.brillo = {
      enable = lib.mkEnableOption ''
        brillo in userspace.
        This will allow brightness control from users in the video group
      '';
    };
  };

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