mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
brightnessctl: init at 0.3.2 (#42102)
* brightnessctl: init at 0.3.2 * Revised PR
This commit is contained in:
parent
abdbb38d03
commit
1b7ce4c6d5
@ -78,6 +78,11 @@
|
||||
github = "DmitryTsygankov";
|
||||
name = "Dmitry Tsygankov";
|
||||
};
|
||||
Dje4321 = {
|
||||
email = "dje4321@gmail.com";
|
||||
github = "dje4321";
|
||||
name = "Dje4321";
|
||||
};
|
||||
Esteth = {
|
||||
email = "adam.copp@gmail.com";
|
||||
name = "Adam Copp";
|
||||
|
30
nixos/modules/hardware/brightnessctl.nix
Normal file
30
nixos/modules/hardware/brightnessctl.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.hardware.brightnessctl;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
hardware.brightnessctl = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Enable brightnessctl in userspace.
|
||||
This will allow brightness control from users in the video group.
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.udev.packages = with pkgs; [ brightnessctl ];
|
||||
};
|
||||
|
||||
}
|
@ -29,6 +29,7 @@
|
||||
./config/vpnc.nix
|
||||
./config/zram.nix
|
||||
./hardware/all-firmware.nix
|
||||
./hardware/brightnessctl.nix
|
||||
./hardware/ckb.nix
|
||||
./hardware/cpu/amd-microcode.nix
|
||||
./hardware/cpu/intel-microcode.nix
|
||||
|
29
pkgs/misc/brightnessctl/default.nix
Normal file
29
pkgs/misc/brightnessctl/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ stdenv, fetchFromGitHub, coreutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "brightnessctl-${version}";
|
||||
version = "0.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Hummer12007";
|
||||
repo = "brightnessctl";
|
||||
rev = "${version}";
|
||||
sha256 = "0amxhcikcgj04z81272kz35m5h5q4jx9x7v71h8yl1rv4b2lzh7z";
|
||||
};
|
||||
|
||||
makeFlags = "MODE=0 PREFIX=/ DESTDIR=$(out)";
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace 90-brightnessctl.rules --replace /bin/ ${coreutils}/bin/
|
||||
substituteInPlace 90-brightnessctl.rules --replace %k '*'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/Hummer12007/brightnessctl";
|
||||
maintainers = [ stdenv.lib.maintainers.Dje4321 ];
|
||||
license = stdenv.lib.licenses.mit;
|
||||
description = "This program allows you read and control device brightness";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
|
||||
}
|
@ -20729,6 +20729,8 @@ with pkgs;
|
||||
|
||||
brgenml1cupswrapper = callPackage ../misc/cups/drivers/brgenml1cupswrapper {};
|
||||
|
||||
brightnessctl = callPackage ../misc/brightnessctl { };
|
||||
|
||||
calaos_installer = libsForQt5.callPackage ../misc/calaos/installer {};
|
||||
|
||||
click = callPackage ../applications/networking/cluster/click { };
|
||||
|
Loading…
Reference in New Issue
Block a user