2019-02-22 19:45:16 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.hardware.acpilight;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
hardware.acpilight = {
|
2024-08-27 18:42:51 +00:00
|
|
|
enable = lib.mkOption {
|
2019-02-22 19:45:16 +00:00
|
|
|
default = false;
|
2024-08-27 18:42:51 +00:00
|
|
|
type = lib.types.bool;
|
2019-02-22 19:45:16 +00:00
|
|
|
description = ''
|
|
|
|
Enable acpilight.
|
|
|
|
This will allow brightness control via xbacklight from users in the video group
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-27 18:42:51 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2020-11-12 02:21:46 +00:00
|
|
|
environment.systemPackages = with pkgs; [ acpilight ];
|
2019-02-22 19:45:16 +00:00
|
|
|
services.udev.packages = with pkgs; [ acpilight ];
|
|
|
|
};
|
|
|
|
}
|