Merge pull request #7794 from womfoo/kbdlight
Add kbdlight package and setuid wrapper
This commit is contained in:
commit
1103392dd9
5 changed files with 46 additions and 0 deletions
|
@ -222,6 +222,7 @@
|
|||
winden = "Antonio Vargas Gonzalez <windenntw@gmail.com>";
|
||||
wizeman = "Ricardo M. Correia <rcorreia@wizy.org>";
|
||||
wjlroe = "William Roe <willroe@gmail.com>";
|
||||
womfoo = "Kranium Gikos Mendoza <kranium@gikos.net>";
|
||||
wkennington = "William A. Kennington III <william@wkennington.com>";
|
||||
wmertens = "Wout Mertens <Wout.Mertens@gmail.com>";
|
||||
wscott = "Wayne Scott <wsc9tt@gmail.com>";
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
./programs/environment.nix
|
||||
./programs/info.nix
|
||||
./programs/ibus.nix
|
||||
./programs/kbdlight.nix
|
||||
./programs/light.nix
|
||||
./programs/nano.nix
|
||||
./programs/screen.nix
|
||||
|
|
16
nixos/modules/programs/kbdlight.nix
Normal file
16
nixos/modules/programs/kbdlight.nix
Normal 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" ];
|
||||
};
|
||||
}
|
26
pkgs/os-specific/linux/kbdlight/default.nix
Normal file
26
pkgs/os-specific/linux/kbdlight/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "kbdlight-${version}";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hobarrera";
|
||||
repo = "kbdlight";
|
||||
rev = "v${version}";
|
||||
sha256 = "1f08aid1xrbl4sb5447gkip9lnvkia1c4ap0v8zih5s9w8v72bny";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/local $out
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/hobarrera/kbdlight;
|
||||
description = "A very simple application that changes MacBooks' keyboard backlight level";
|
||||
license = licenses.isc;
|
||||
maintainers = [ maintainers.womfoo ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -9230,6 +9230,8 @@ let
|
|||
|
||||
kbd = callPackage ../os-specific/linux/kbd { };
|
||||
|
||||
kbdlight = callPackage ../os-specific/linux/kbdlight { };
|
||||
|
||||
kmscon = callPackage ../os-specific/linux/kmscon { };
|
||||
|
||||
latencytop = callPackage ../os-specific/linux/latencytop { };
|
||||
|
|
Loading…
Reference in a new issue