mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 22:51:22 +00:00
Merge pull request #79663 from primeos/brightnessctl-systemd-support
brightnessctl: Add systemd support
This commit is contained in:
commit
aaa1c7b28f
@ -1,31 +0,0 @@
|
||||
{ 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 ];
|
||||
environment.systemPackages = with pkgs; [ brightnessctl ];
|
||||
};
|
||||
|
||||
}
|
@ -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
|
||||
|
@ -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
|
||||
];
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, coreutils }:
|
||||
{ stdenv, fetchFromGitHub, pkg-config, systemd }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "brightnessctl";
|
||||
@ -11,11 +11,10 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq";
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=" "DESTDIR=$(out)" ];
|
||||
makeFlags = [ "PREFIX=" "DESTDIR=$(out)" "ENABLE_SYSTEMD=1" ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace 90-brightnessctl.rules --replace /bin/ ${coreutils}/bin/
|
||||
'';
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ systemd ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/Hummer12007/brightnessctl";
|
||||
|
Loading…
Reference in New Issue
Block a user