mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
nixos/tuxedo-drivers: init
This commit is contained in:
parent
1790f7b4c3
commit
4391c3883b
35
nixos/modules/hardware/tuxedo-drivers.nix
Normal file
35
nixos/modules/hardware/tuxedo-drivers.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.hardware.tuxedo-drivers;
|
||||||
|
tuxedo-drivers = config.boot.kernelPackages.tuxedo-drivers;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(lib.mkRenamedOptionModule
|
||||||
|
[
|
||||||
|
"hardware"
|
||||||
|
"tuxedo-keyboard"
|
||||||
|
]
|
||||||
|
[
|
||||||
|
"hardware"
|
||||||
|
"tuxedo-drivers"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
];
|
||||||
|
|
||||||
|
options.hardware.tuxedo-drivers = {
|
||||||
|
enable = lib.mkEnableOption ''
|
||||||
|
The tuxedo-drivers driver enables access to the following on TUXEDO notebooks:
|
||||||
|
- Driver for Fn-keys
|
||||||
|
- SysFS control of brightness/color/mode for most TUXEDO keyboards
|
||||||
|
- Hardware I/O driver for TUXEDO Control Center
|
||||||
|
|
||||||
|
For more inforation it is best to check at the source code description: <https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
boot.kernelModules = [ "tuxedo_keyboard" ];
|
||||||
|
boot.extraModulePackages = [ tuxedo-drivers ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,32 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.hardware.tuxedo-keyboard;
|
|
||||||
tuxedo-keyboard = config.boot.kernelPackages.tuxedo-keyboard;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.hardware.tuxedo-keyboard = {
|
|
||||||
enable = lib.mkEnableOption ''
|
|
||||||
the tuxedo-keyboard driver.
|
|
||||||
|
|
||||||
To configure the driver, pass the options to the {option}`boot.kernelParams` 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: <https://github.com/tuxedocomputers/tuxedo-keyboard#kernelparam>
|
|
||||||
|
|
||||||
In order to use the `custom` lighting with the maximumg brightness and a color of `0xff0a0a` one would put pass {option}`boot.kernelParams` like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
boot.kernelParams = [
|
|
||||||
"tuxedo_keyboard.mode=0"
|
|
||||||
"tuxedo_keyboard.brightness=255"
|
|
||||||
"tuxedo_keyboard.color_left=0xff0a0a"
|
|
||||||
];
|
|
||||||
```
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable
|
|
||||||
{
|
|
||||||
boot.kernelModules = ["tuxedo_keyboard"];
|
|
||||||
boot.extraModulePackages = [ tuxedo-keyboard ];
|
|
||||||
};
|
|
||||||
}
|
|
@ -97,7 +97,7 @@
|
|||||||
./hardware/sensor/iio.nix
|
./hardware/sensor/iio.nix
|
||||||
./hardware/steam-hardware.nix
|
./hardware/steam-hardware.nix
|
||||||
./hardware/system-76.nix
|
./hardware/system-76.nix
|
||||||
./hardware/tuxedo-keyboard.nix
|
./hardware/tuxedo-drivers.nix
|
||||||
./hardware/ubertooth.nix
|
./hardware/ubertooth.nix
|
||||||
./hardware/uinput.nix
|
./hardware/uinput.nix
|
||||||
./hardware/uni-sync.nix
|
./hardware/uni-sync.nix
|
||||||
|
@ -14,7 +14,7 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||||
{
|
{
|
||||||
hardware.tuxedo-keyboard.enable = true;
|
hardware.tuxedo-drivers.enable = true;
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
services.tailord = {
|
services.tailord = {
|
||||||
|
Loading…
Reference in New Issue
Block a user