2018-06-17 00:15:42 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.hardware.brightnessctl;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
hardware.brightnessctl = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
|
|
|
description = ''
|
|
|
|
Enable brightnessctl in userspace.
|
|
|
|
This will allow brightness control from users in the video group.
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.udev.packages = with pkgs; [ brightnessctl ];
|
2019-09-18 00:05:47 +02:00
|
|
|
environment.systemPackages = with pkgs; [ brightnessctl ];
|
2018-06-17 00:15:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|