summary refs log blame commit diff
path: root/nixos/modules/programs/light.nix
blob: 57cc925be4655853b065364dfe02c9952e160aa1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                              
                                  

                                                                         






                                                
                                            

    
{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.programs.light;

in
{
  options = {
    programs.light = {
      enable = mkOption {
        default = false;
        type = types.bool;
        description = lib.mdDoc ''
          Whether to install Light backlight control command
          and udev rules granting access to members of the "video" group.
        '';
      };
    };
  };

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