Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
30 changes: 30 additions & 0 deletions nixos/modules/hardware/brightnessctl.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};

}
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions pkgs/misc/brightnessctl/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};

}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20732,6 +20732,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 { };
Expand Down