diff options
author | blanky0230 <blanky0230@gmail.com> | 2019-11-21 23:10:41 +0100 |
---|---|---|
committer | blanky0230 <blanky0230@gmail.com> | 2020-01-26 09:24:09 +0100 |
commit | f2fea8894dae30ae1cc46c70302a9cc7d54a6ea4 (patch) | |
tree | b2d01434e5d53f1306ae835b2de3bca227cb5352 | |
parent | 4cf316f5bd952507e6a7159e4a7b245618aedb5e (diff) | |
download | nixlib-f2fea8894dae30ae1cc46c70302a9cc7d54a6ea4.tar nixlib-f2fea8894dae30ae1cc46c70302a9cc7d54a6ea4.tar.gz nixlib-f2fea8894dae30ae1cc46c70302a9cc7d54a6ea4.tar.bz2 nixlib-f2fea8894dae30ae1cc46c70302a9cc7d54a6ea4.tar.lz nixlib-f2fea8894dae30ae1cc46c70302a9cc7d54a6ea4.tar.xz nixlib-f2fea8894dae30ae1cc46c70302a9cc7d54a6ea4.tar.zst nixlib-f2fea8894dae30ae1cc46c70302a9cc7d54a6ea4.zip |
nixos/tuxedo-keyboard: init module.
-rw-r--r-- | maintainers/maintainer-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/hardware/tuxedo-keyboard.nix | 35 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | pkgs/os-specific/linux/tuxedo-keyboard/default.nix (renamed from pkgs/os-specific/linux/firmware/tuxedo-keyboard/default.nix) | 18 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
5 files changed, 43 insertions, 14 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 7e8042292ee4..2798a6c0f8ed 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -960,6 +960,7 @@ blanky0230 = { email = "blanky0230@gmail.com"; github = "blanky0230"; + githubId = 5700358; name = "Thomas Blank"; }; blitz = { diff --git a/nixos/modules/hardware/tuxedo-keyboard.nix b/nixos/modules/hardware/tuxedo-keyboard.nix new file mode 100644 index 000000000000..898eed244935 --- /dev/null +++ b/nixos/modules/hardware/tuxedo-keyboard.nix @@ -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 ]; + }; + } diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index eadf1d2d89b3..8953ec03948b 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -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 diff --git a/pkgs/os-specific/linux/firmware/tuxedo-keyboard/default.nix b/pkgs/os-specific/linux/tuxedo-keyboard/default.nix index 79586bbe1229..b67bf2d3dab6 100644 --- a/pkgs/os-specific/linux/firmware/tuxedo-keyboard/default.nix +++ b/pkgs/os-specific/linux/tuxedo-keyboard/default.nix @@ -1,7 +1,5 @@ { stdenv, fetchFromGitHub, kernel, kmod }: -# TODO: look at the other kernel modules packages and see if you find improvements to do - stdenv.mkDerivation rec { pname = "tuxedo-keyboard-${kernel.version}"; version = "2019-08-26"; @@ -12,25 +10,19 @@ stdenv.mkDerivation rec { rev = "d65e76e84cfd8169591fc2a0a7c9219fa19da1b5"; sha256 = "1s48qpwybwh5pwqas2d1v2a7x4r97sm4hr9i4902r1d7h384bv17"; }; - - - unpackPhase = '' - mkdir -p $out/build/src - cp -r $src/* $out/build - ''; makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; installPhase = '' mkdir -p "$out/lib/modules/${kernel.modDirVersion}" - cp $out/build/src/tuxedo_keyboard.ko $out/lib/modules/${kernel.modDirVersion} - rm -rf $out/build + mv src/tuxedo_keyboard.ko $out/lib/modules/${kernel.modDirVersion} ''; - meta = { + meta = with stdenv.lib; { description = "Full color keyboard driver for tuxedo computers laptops"; homepage = "https://github.com/tuxedocomputers/tuxedo-keyboard/"; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.blanky0230 ]; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.blanky0230 ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2faf957dc9a7..397612f7a538 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16570,7 +16570,7 @@ in facetimehd = callPackage ../os-specific/linux/facetimehd { }; - tuxedo-keyboard = callPackage ../os-specific/linux/firmware/tuxedo-keyboard { }; + tuxedo-keyboard = callPackage ../os-specific/linux/tuxedo-keyboard { }; jool = callPackage ../os-specific/linux/jool { }; |