Add "light" package and setuid wrapper

This commit is contained in:
Brian McKenna
2014-11-09 19:45:43 -07:00
parent e69dc2be2d
commit a6bacd4d81
5 changed files with 50 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.light;
in
{
options = {
programs.light = {
enable = mkOption {
default = false;
type = types.bool;
description = ''
Whether to install Light backlight control with setuid wrapper.
'';
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.light ];
security.setuidPrograms = [ "light" ];
};
}