Add kbdlight package and setuid wrapper

update nixos/modules/programs/kbdlight.nix to use mkEnableOption
This commit is contained in:
Kranium Gikos Mendoza
2015-05-11 13:23:01 +08:00
parent e3696ed37f
commit 6f634e3c3a
5 changed files with 46 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
{ 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.setuidPrograms = [ "kbdlight" ];
};
}