Skip to content

Commit

Permalink
nixos/brightnessctl: Remove the module
Browse files Browse the repository at this point in the history
Due to the support of the systemd-logind API the udev rules aren't
required anymore which renders this module useless [0].
Note: brightnessctl should now require a working D-Bus setup and a valid
local logind session for this to work.

[0]: NixOS#79663
  • Loading branch information
primeos committed Feb 10, 2020
1 parent cf5dd26 commit 5282bc9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 39 deletions.
31 changes: 0 additions & 31 deletions nixos/modules/hardware/brightnessctl.nix

This file was deleted.

1 change: 0 additions & 1 deletion nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
./hardware/acpilight.nix
./hardware/all-firmware.nix
./hardware/bladeRF.nix
./hardware/brightnessctl.nix
./hardware/brillo.nix
./hardware/ckb-next.nix
./hardware/cpu/amd-microcode.nix
Expand Down
6 changes: 6 additions & 0 deletions nixos/modules/rename.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ with lib;
instead, or any other display manager in NixOS as they all support auto-login.
'')
(mkRemovedOptionModule [ "services" "dnscrypt-proxy" ] "Use services.dnscrypt-proxy2 instead")
(mkRemovedOptionModule ["hardware" "brightnessctl" ] ''
The brightnessctl module was removed because newer versions of
brightnessctl don't require the udev rules anymore (they can use the
systemd-logind API). Instead of using the module you can now
simply add the brightnessctl package to environment.systemPackages.
'')

# Do NOT add any option renames here, see top of the file
];
Expand Down
8 changes: 1 addition & 7 deletions pkgs/misc/brightnessctl/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, coreutils, pkg-config, systemd }:
{ stdenv, fetchFromGitHub, pkg-config, systemd }:

stdenv.mkDerivation rec {
pname = "brightnessctl";
Expand All @@ -13,12 +13,6 @@ stdenv.mkDerivation rec {

makeFlags = [ "PREFIX=" "DESTDIR=$(out)" "ENABLE_SYSTEMD=1" ];

postPatch = ''
substituteInPlace 90-brightnessctl.rules --replace /bin/ ${coreutils}/bin/
# For backward compatibility with the NixOS module / udev approach:
substituteInPlace Makefile --replace "INSTALL_UDEV_RULES=0" "INSTALL_UDEV_RULES=1"
'';

nativeBuildInputs = [ pkg-config ];
buildInputs = [ systemd ];

Expand Down

0 comments on commit 5282bc9

Please sign in to comment.