2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.hardware.acpilight;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
hardware.acpilight = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc ''
|
2020-04-24 23:36:52 +00:00
|
|
|
Enable acpilight.
|
|
|
|
This will allow brightness control via xbacklight from users in the video group
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2020-11-12 09:05:59 +00:00
|
|
|
environment.systemPackages = with pkgs; [ acpilight ];
|
2020-04-24 23:36:52 +00:00
|
|
|
services.udev.packages = with pkgs; [ acpilight ];
|
|
|
|
};
|
|
|
|
}
|