Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuxedo-drivers: 3.2.14 -> 4.5.0 #316708

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
23 changes: 23 additions & 0 deletions nixos/modules/hardware/tuxedo-drivers.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ config, lib, ... }:

with lib;

let
cfg = config.hardware.tuxedo-drivers;
tuxedo-drivers = config.boot.kernelPackages.tuxedo-drivers;
in
{
imports = [
(mkRenamedOptionModule ["hardware" "tuxedo-keyboard" ] ["hardware" "tuxedo-drivers" ])
];

options.hardware.tuxedo-drivers = {
enable = mkEnableOption "the drivers for TUXEDO Computers laptops.";
};

config = mkIf cfg.enable
{
boot.kernelModules = ["tuxedo_keyboard"];
boot.extraModulePackages = [ tuxedo-drivers ];
};
}
35 changes: 0 additions & 35 deletions nixos/modules/hardware/tuxedo-keyboard.nix

This file was deleted.

2 changes: 1 addition & 1 deletion nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
./hardware/sensor/iio.nix
./hardware/steam-hardware.nix
./hardware/system-76.nix
./hardware/tuxedo-keyboard.nix
./hardware/tuxedo-drivers.nix
./hardware/ubertooth.nix
./hardware/uinput.nix
./hardware/uni-sync.nix
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/hardware/tuxedo-rs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ in

config = mkIf cfg.enable (mkMerge [
{
hardware.tuxedo-keyboard.enable = true;
hardware.tuxedo-drivers.enable = true;

systemd = {
services.tailord = {
Expand Down
55 changes: 55 additions & 0 deletions pkgs/os-specific/linux/tuxedo-drivers/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{ lib, stdenv, fetchFromGitLab, kernel, linuxHeaders, pahole }:

stdenv.mkDerivation (finalAttrs: {
pname = "tuxedo-drivers-${kernel.version}";
version = "4.5.0";

src = fetchFromGitLab {
owner = "tuxedocomputers";
repo = "development/packages/tuxedo-drivers";
rev = "v${finalAttrs.version}";
hash = "sha256-WQy/5NB/N8JjOKEw00PisCTH0ITrQDQCXaKPl5P+6Wo=";
};

buildInputs = [
pahole
linuxHeaders
];

makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];

installPhase = ''
runHook preInstall

mkdir -p "$out/lib/modules/${kernel.modDirVersion}"

for module in clevo_acpi.ko clevo_wmi.ko \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#293017 uses INSTALL_MOD_PATH here, which I find nice

ite_829x/ite_829x.ko ite_8291/ite_8291.ko ite_8291_lb/ite_8291_lb.ko ite_8297/ite_8297.ko \
tuxedo_compatibility_check/tuxedo_compatibility_check.ko tuxedo_io/tuxedo_io.ko tuxedo_keyboard.ko \
tuxedo_nb02_nvidia_power_ctrl/tuxedo_nb02_nvidia_power_ctrl.ko \
tuxedo_nb04/tuxedo_nb04_kbd_backlight.ko tuxedo_nb04/tuxedo_nb04_keyboard.ko tuxedo_nb04/tuxedo_nb04_power_profiles.ko \
tuxedo_nb04/tuxedo_nb04_sensors.ko tuxedo_nb04/tuxedo_nb04_wmi_ab.ko tuxedo_nb04/tuxedo_nb04_wmi_bs.ko \
tuxedo_nb05/tuxedo_nb05_ec.ko tuxedo_nb05/tuxedo_nb05_fan_control.ko tuxedo_nb05/tuxedo_nb05_kbd_backlight.ko \
tuxedo_nb05/tuxedo_nb05_keyboard.ko tuxedo_nb05/tuxedo_nb05_power_profiles.ko tuxedo_nb05/tuxedo_nb05_sensors.ko \
uniwill_wmi.ko; do
install -Dm444 src/$module -t $out/lib/modules/${kernel.modDirVersion}
done

runHook postInstall
'';

meta = {
broken = stdenv.isAarch64 || (lib.versionOlder kernel.version "5.5");
description = "Keyboard and hardware I/O driver for TUXEDO Computers laptops";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "Keyboard and hardware I/O driver for TUXEDO Computers laptops";
description = "Drivers for several platform devices for TUXEDO notebooks meant for the DKMS";

homepage = "https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers";
license = lib.licenses.gpl3Plus;
longDescription = ''
This driver provides support for Fn keys, brightness/color/mode for most TUXEDO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Is this description still accurate?

The features list seems to suggest no.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the Hardware I/O driver for TUXEDO Control Center is missing, but the mentioned TUXEDO Control Center isn't even packaged here, and is used by tuxedo_rs instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I would suggest to add "Hardware IO driver" without "for Tuxedo Control Center"

keyboards (except white backlight-only models).

Can be used with the "hardware.tuxedo-drivers" NixOS module.
'';
maintainers = [ lib.maintainers.blanky0230 ];
platforms = lib.platforms.linux;
};
})
47 changes: 0 additions & 47 deletions pkgs/os-specific/linux/tuxedo-keyboard/default.nix

This file was deleted.

3 changes: 2 additions & 1 deletion pkgs/top-level/linux-kernels.nix
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ in {

rust-out-of-tree-module = if lib.versionAtLeast kernel.version "6.7" then callPackage ../os-specific/linux/rust-out-of-tree-module { } else null;

tuxedo-keyboard = if lib.versionAtLeast kernel.version "4.14" then callPackage ../os-specific/linux/tuxedo-keyboard { } else null;
tuxedo-drivers = if lib.versionAtLeast kernel.version "4.14" then callPackage ../os-specific/linux/tuxedo-drivers { } else null;

jool = callPackage ../os-specific/linux/jool { };

Expand Down Expand Up @@ -597,6 +597,7 @@ in {
ati_drivers_x11 = throw "ati drivers are no longer supported by any kernel >=4.1"; # added 2021-05-18;
hid-nintendo = throw "hid-nintendo was added in mainline kernel version 5.16"; # Added 2023-07-30
sch_cake = throw "sch_cake was added in mainline kernel version 4.19"; # Added 2023-06-14
tuxedo-keyboard = self.tuxedo-drivers; # Added 2024-06-2
rtl8723bs = throw "rtl8723bs was added in mainline kernel version 4.12"; # Added 2023-06-14
vm-tools = self.mm-tools;
xmm7360-pci = throw "Support for the XMM7360 WWAN card was added to the iosm kmod in mainline kernel version 5.18";
Expand Down