mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
24 lines
457 B
Nix
24 lines
457 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.programs.kbdlight;
|
|
|
|
in
|
|
{
|
|
options.programs.kbdlight.enable = mkEnableOption "kbdlight";
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ pkgs.kbdlight ];
|
|
|
|
security.permissionsWrappers.setuid =
|
|
[ { program = "kbdlight";
|
|
source = "${pkgs.kbdlight.out}/bin/kbdlight";
|
|
user = "root";
|
|
group = "root";
|
|
setuid = true;
|
|
}];
|
|
};
|
|
}
|