2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.kbdlight;
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
2022-09-09 14:08:57 +00:00
|
|
|
options.programs.kbdlight.enable = mkEnableOption (lib.mdDoc "kbdlight");
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.kbdlight ];
|
2021-09-22 15:38:15 +00:00
|
|
|
security.wrappers.kbdlight =
|
|
|
|
{ setuid = true;
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
source = "${pkgs.kbdlight.out}/bin/kbdlight";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|