diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 12336a30f31e..0554d2c3e90f 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -194,6 +194,9 @@ - `python3packages.pillow-avif-plugin` has been removed as the functionality is included in `python3packages.pillow` directly since version 11.3. +- `light` has been removed because it was unmaintained. + `brightnessctl` and `acpilight` provide similar functionality. + - `services.openssh.settings.AcceptEnv` now explicitly defined as an option that takes a list of strings, to facilitate option merging. Setting it to a string value is no longer supported. - `nodejs-slim` has a `npm` and a `corepack` outputs, and `nodejs` no longer has a `libv8` output. diff --git a/nixos/doc/manual/release-notes/rl-2605.section.md b/nixos/doc/manual/release-notes/rl-2605.section.md index a708c285091b..e26e1026acaa 100644 --- a/nixos/doc/manual/release-notes/rl-2605.section.md +++ b/nixos/doc/manual/release-notes/rl-2605.section.md @@ -141,6 +141,8 @@ See . - support for `ecryptfs` in nixpkgs has been removed. +- `programs.light` was removed from nixpkgs due to the corresponding package being unmaintained upstream. `brightnessctl` and `programs.acpilight` offer replacements. + - The `networking.wireless` module has been security hardened by default: the `wpa_supplicant` daemon now runs under an unprivileged user with restricted access to the system. As part of these changes, `/etc/wpa_supplicant.conf` has been deprecated: the NixOS-generated configuration file is now linked to `/etc/wpa_supplicant/nixos.conf` and `/etc/wpa_supplicant/imperative.conf` has been added for imperatively configuring `wpa_supplicant` or when using [allowAuxiliaryImperativeNetworks](#opt-networking.wireless.allowAuxiliaryImperativeNetworks). diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 2db1636f824e..bef9b910c4db 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -256,7 +256,6 @@ ./programs/lazygit.nix ./programs/less.nix ./programs/liboping.nix - ./programs/light.nix ./programs/lix.nix ./programs/localsend.nix ./programs/mdevctl.nix diff --git a/nixos/modules/programs/light.nix b/nixos/modules/programs/light.nix deleted file mode 100644 index 7c859aa1bbfc..000000000000 --- a/nixos/modules/programs/light.nix +++ /dev/null @@ -1,92 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -let - cfg = config.programs.light; - -in -{ - options = { - programs.light = { - - enable = lib.mkOption { - default = false; - type = lib.types.bool; - description = '' - Whether to install Light backlight control command - and udev rules granting access to members of the "video" group. - ''; - }; - - brightnessKeys = { - enable = lib.mkOption { - type = lib.types.bool; - default = false; - description = '' - Whether to enable brightness control with keyboard keys. - - This is mainly useful for minimalistic (desktop) environments. You - may want to leave this disabled if you run a feature-rich desktop - environment such as KDE, GNOME or Xfce as those handle the - brightness keys themselves. However, enabling brightness control - with this setting makes the control independent of X, so the keys - work in non-graphical ttys, so you might want to consider using this - instead of the default offered by the desktop environment. - - Enabling this will turn on {option}`services.actkbd`. - ''; - }; - - step = lib.mkOption { - type = lib.types.int; - default = 10; - description = '' - The percentage value by which to increase/decrease brightness. - ''; - }; - - minBrightness = lib.mkOption { - type = lib.types.numbers.between 0 100; - default = 0.1; - description = '' - The minimum authorized brightness value, e.g. to avoid the - display going dark. - ''; - }; - - }; - - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = [ pkgs.light ]; - services.udev.packages = [ pkgs.light ]; - services.actkbd = lib.mkIf cfg.brightnessKeys.enable { - enable = true; - bindings = - let - light = "${pkgs.light}/bin/light"; - step = toString cfg.brightnessKeys.step; - minBrightness = toString cfg.brightnessKeys.minBrightness; - in - [ - { - keys = [ 224 ]; - events = [ "key" ]; - # -N is used to ensure that value >= minBrightness - command = "${light} -N ${minBrightness} && ${light} -U ${step}"; - } - { - keys = [ 225 ]; - events = [ "key" ]; - command = "${light} -A ${step}"; - } - ]; - }; - }; -} diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index b3225443abc1..68f89cf0c27b 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -235,6 +235,9 @@ in "Atlassian software has been removed, as support for the Atlassian Server products ended in February 2024 and there was insufficient interest in maintaining the Atlassian Data Center replacements" ) (mkRemovedOptionModule [ "services" "kippo" ] "The corresponding package was removed from nixpkgs.") + (mkRemovedOptionModule [ "programs" "light" ] + "The corresponding package was removed from nixpkgs due to being unmaintained upstream. `brightnessctl` and `hardware.acpilight` offer replacements." + ) (mkRemovedOptionModule [ "services" "lshd" ] "The corresponding package was removed from nixpkgs as it had no maintainer in Nixpkgs and hasn't seen an upstream release in over a decades." ) diff --git a/pkgs/by-name/li/light/0001-define-light-loglevel-as-extern.patch b/pkgs/by-name/li/light/0001-define-light-loglevel-as-extern.patch deleted file mode 100644 index 082f8f3f10e1..000000000000 --- a/pkgs/by-name/li/light/0001-define-light-loglevel-as-extern.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 47f163f6bcd1d66bebc49d96abcf46853a0708fb Mon Sep 17 00:00:00 2001 -From: wxt <3264117476@qq.com> -Date: Tue, 22 Oct 2024 07:48:34 +0800 -Subject: [PATCH] fix build - ---- - src/helpers.c | 1 + - src/helpers.h | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/helpers.c b/src/helpers.c -index c7bc4de..00e6098 100644 ---- a/src/helpers.c -+++ b/src/helpers.c -@@ -9,6 +9,7 @@ - #include // errno - #include // dirname - -+light_loglevel_t light_loglevel; - - bool light_file_read_uint64(char const *filename, uint64_t *val) - { -diff --git a/src/helpers.h b/src/helpers.h -index f73714b..4a92753 100644 ---- a/src/helpers.h -+++ b/src/helpers.h -@@ -21,7 +21,7 @@ typedef enum { - LIGHT_NOTE_LEVEL - } light_loglevel_t; - --light_loglevel_t light_loglevel; -+extern light_loglevel_t light_loglevel; - - #define LIGHT_LOG(lvl, fp, fmt, args...)\ - if(light_loglevel >= lvl)\ --- -2.46.1 - diff --git a/pkgs/by-name/li/light/package.nix b/pkgs/by-name/li/light/package.nix deleted file mode 100644 index 25d82ddb9425..000000000000 --- a/pkgs/by-name/li/light/package.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitLab, - autoreconfHook, - coreutils, - udevCheckHook, -}: - -stdenv.mkDerivation { - version = "1.2.2"; - pname = "light"; - - src = fetchFromGitLab { - owner = "dpeukert"; - repo = "light"; - rev = "2a54078cbe3814105ee4f565f451b1b5947fbde0"; - hash = "sha256-OmHdVJvBcBjJiPs45JqOHxFoJYvKIEIpt9pFhBz74Kg="; - }; - - configureFlags = [ "--with-udev" ]; - - nativeBuildInputs = [ - autoreconfHook - udevCheckHook - ]; - - patches = [ - ./0001-define-light-loglevel-as-extern.patch - ]; - - # ensure udev rules can find the commands used - postPatch = '' - substituteInPlace 90-backlight.rules \ - --replace-fail '/bin/chgrp' '${coreutils}/bin/chgrp' \ - --replace-fail '/bin/chmod' '${coreutils}/bin/chmod' - ''; - - doInstallCheck = true; - - meta = { - description = "GNU/Linux application to control backlights"; - homepage = "https://gitlab.com/dpeukert/light"; - license = lib.licenses.gpl3Only; - mainProgram = "light"; - maintainers = with lib.maintainers; [ - puffnfresh - ]; - platforms = lib.platforms.linux; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 610d3c109ba9..ef8ada8c888c 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1110,6 +1110,7 @@ mapAliases { libXxf86dga = libxxf86dga; # Added 2026-02-06 libXxf86misc = libxxf86misc; # Added 2026-02-06 libXxf86vm = libxxf86vm; # Added 2026-02-06 + light = throw "'light' has been removed because it was unmaintained. 'brightnessctl' and 'acpilight' provide similar functionality."; # Added 2026-02-24 lightdm_gtk_greeter = throw "'lightdm_gtk_greeter' has been renamed to/replaced by 'lightdm-gtk-greeter'"; # Converted to throw 2025-10-27 lightly-boehs = throw "'lightly-boehs' has been removed, as it is only compatible with Plasma 5, which is EOL"; # Added 2025-08-20 lightly-qt = throw "'lightly-qt' has been removed, as it is only compatible with Plasma 5, which is EOL"; # Added 2025-08-20