mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
Merge pull request #78307 from blanky0230/nixos-tuxedo-keyboard
Nixos tuxedo keyboard
This commit is contained in:
commit
34f020053d
@ -957,6 +957,12 @@
|
||||
githubId = 5718007;
|
||||
name = "Bastian Köcher";
|
||||
};
|
||||
blanky0230 = {
|
||||
email = "blanky0230@gmail.com";
|
||||
github = "blanky0230";
|
||||
githubId = 5700358;
|
||||
name = "Thomas Blank";
|
||||
};
|
||||
blitz = {
|
||||
email = "js@alien8.de";
|
||||
github = "blitz";
|
||||
|
35
nixos/modules/hardware/tuxedo-keyboard.nix
Normal file
35
nixos/modules/hardware/tuxedo-keyboard.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.hardware.tuxedo-keyboard;
|
||||
tuxedo-keyboard = config.boot.kernelPackages.tuxedo-keyboard;
|
||||
in
|
||||
{
|
||||
options.hardware.tuxedo-keyboard = {
|
||||
enable = mkEnableOption ''
|
||||
Enables the tuxedo-keyboard driver.
|
||||
|
||||
To configure the driver, pass the options to the <option>boot.kernelParams</option> configuration.
|
||||
There are several parameters you can change. It's best to check at the source code description which options are supported.
|
||||
You can find all the supported parameters at: <link xlink:href="https://github.com/tuxedocomputers/tuxedo-keyboard#kernelparam" />
|
||||
|
||||
In order to use the <literal>custom</literal> lighting with the maximumg brightness and a color of <literal>0xff0a0a</literal> one would put pass <option>boot.kernelParams</option> like this:
|
||||
|
||||
<programlisting>
|
||||
boot.kernelParams = [
|
||||
"tuxedo_keyboard.mode=0"
|
||||
"tuxedo_keyboard.brightness=255"
|
||||
"tuxedo_keyboard.color_left=0xff0a0a"
|
||||
];
|
||||
</programlisting>
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
boot.kernelModules = ["tuxedo_keyboard"];
|
||||
boot.extraModulePackages = [ tuxedo-keyboard ];
|
||||
};
|
||||
}
|
@ -62,6 +62,7 @@
|
||||
./hardware/printers.nix
|
||||
./hardware/raid/hpsa.nix
|
||||
./hardware/steam-hardware.nix
|
||||
./hardware/tuxedo-keyboard.nix
|
||||
./hardware/usb-wwan.nix
|
||||
./hardware/onlykey.nix
|
||||
./hardware/video/amdgpu.nix
|
||||
|
28
pkgs/os-specific/linux/tuxedo-keyboard/default.nix
Normal file
28
pkgs/os-specific/linux/tuxedo-keyboard/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ stdenv, fetchFromGitHub, kernel, kmod }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tuxedo-keyboard-${kernel.version}";
|
||||
version = "2019-08-26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tuxedocomputers";
|
||||
repo = "tuxedo-keyboard";
|
||||
rev = "d65e76e84cfd8169591fc2a0a7c9219fa19da1b5";
|
||||
sha256 = "1s48qpwybwh5pwqas2d1v2a7x4r97sm4hr9i4902r1d7h384bv17";
|
||||
};
|
||||
|
||||
makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/lib/modules/${kernel.modDirVersion}"
|
||||
mv src/tuxedo_keyboard.ko $out/lib/modules/${kernel.modDirVersion}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Full color keyboard driver for tuxedo computers laptops";
|
||||
homepage = "https://github.com/tuxedocomputers/tuxedo-keyboard/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.blanky0230 ];
|
||||
};
|
||||
}
|
@ -16601,6 +16601,8 @@ in
|
||||
|
||||
facetimehd = callPackage ../os-specific/linux/facetimehd { };
|
||||
|
||||
tuxedo-keyboard = callPackage ../os-specific/linux/tuxedo-keyboard { };
|
||||
|
||||
jool = callPackage ../os-specific/linux/jool { };
|
||||
|
||||
mba6x_bl = callPackage ../os-specific/linux/mba6x_bl { };
|
||||
|
Loading…
Reference in New Issue
Block a user