summary refs log blame commit diff
path: root/nixos/modules/programs/light.nix
blob: 09cd1113d9c7d8ce730de9a1bad061e471565c30 (plain) (tree)

























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

with lib;

let
  cfg = config.programs.light;

in
{
  options = {
    programs.light = {
      enable = mkOption {
        default = false;
        type = types.bool;
        description = ''
          Whether to install Light backlight control with setuid wrapper.
        '';
      };
    };
  };

  config = mkIf cfg.enable {
    environment.systemPackages = [ pkgs.light ];
    security.setuidPrograms = [ "light" ];
  };
}