Add "light" package and setuid wrapper
This commit is contained in:
parent
e69dc2be2d
commit
a6bacd4d81
|
@ -116,6 +116,7 @@
|
||||||
pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
|
pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
|
||||||
plcplc = "Philip Lykke Carlsen <plcplc@gmail.com>";
|
plcplc = "Philip Lykke Carlsen <plcplc@gmail.com>";
|
||||||
pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
|
pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
|
||||||
|
puffnfresh = "Brian McKenna <brian@brianmckenna.org>";
|
||||||
qknight = "Joachim Schiele <js@lastlog.de>";
|
qknight = "Joachim Schiele <js@lastlog.de>";
|
||||||
raskin = "Michael Raskin <7c6f434c@mail.ru>";
|
raskin = "Michael Raskin <7c6f434c@mail.ru>";
|
||||||
redbaron = "Maxim Ivanov <ivanov.maxim@gmail.com>";
|
redbaron = "Maxim Ivanov <ivanov.maxim@gmail.com>";
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
./programs/dconf.nix
|
./programs/dconf.nix
|
||||||
./programs/environment.nix
|
./programs/environment.nix
|
||||||
./programs/info.nix
|
./programs/info.nix
|
||||||
|
./programs/light.nix
|
||||||
./programs/nano.nix
|
./programs/nano.nix
|
||||||
./programs/screen.nix
|
./programs/screen.nix
|
||||||
./programs/shadow.nix
|
./programs/shadow.nix
|
||||||
|
|
26
nixos/modules/programs/light.nix
Normal file
26
nixos/modules/programs/light.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
}
|
20
pkgs/os-specific/linux/light/default.nix
Normal file
20
pkgs/os-specific/linux/light/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
version = "0.9";
|
||||||
|
name = "light-${version}";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/haikarainen/light/archive/v${version}.tar.gz";
|
||||||
|
sha256 = "1dnzkkg307izvw76gvzsl2vpxd2a1grxg5h82ix505rb9nnmn0d6";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = "mkdir -p $out/bin; cp light $out/bin/";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "GNU/Linux application to control backlights";
|
||||||
|
homepage = https://haikarainen.github.io/light/;
|
||||||
|
license = stdenv.lib.licenses.gpl3;
|
||||||
|
maintainers = with stdenv.lib.maintainers; [ puffnfresh ];
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -7997,6 +7997,8 @@ let
|
||||||
then utillinux
|
then utillinux
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
|
light = callPackage ../os-specific/linux/light { };
|
||||||
|
|
||||||
e3cfsprogs = callPackage ../os-specific/linux/e3cfsprogs { };
|
e3cfsprogs = callPackage ../os-specific/linux/e3cfsprogs { };
|
||||||
|
|
||||||
ebtables = callPackage ../os-specific/linux/ebtables { };
|
ebtables = callPackage ../os-specific/linux/ebtables { };
|
||||||
|
|
Loading…
Reference in a new issue