2015-05-10 18:57:15 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.kbdlight;
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
2022-08-28 20:18:44 +01:00
|
|
|
options.programs.kbdlight.enable = mkEnableOption (lib.mdDoc "kbdlight");
|
2015-05-10 18:57:15 +01:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.kbdlight ];
|
2021-09-12 17:53:48 +01:00
|
|
|
security.wrappers.kbdlight =
|
|
|
|
{ setuid = true;
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
source = "${pkgs.kbdlight.out}/bin/kbdlight";
|
|
|
|
};
|
2015-05-10 18:57:15 +01:00
|
|
|
};
|
|
|
|
}
|