logitech (nixos): support module for logitech input devices
This commit is contained in:
parent
86cff5f5d7
commit
fe97297bb1
28
nixos/modules/hardware/logitech.nix
Normal file
28
nixos/modules/hardware/logitech.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.hardware.logitech;
|
||||||
|
|
||||||
|
in {
|
||||||
|
options.hardware.logitech = {
|
||||||
|
enable = mkEnableOption "Logitech Devices";
|
||||||
|
|
||||||
|
enableGraphical = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable graphical support applications.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.ltunify
|
||||||
|
] ++ lib.optional cfg.enableGraphical pkgs.solaar;
|
||||||
|
|
||||||
|
# ltunifi and solaar both provide udev rules but the most up-to-date have been split
|
||||||
|
# out into a dedicated derivation
|
||||||
|
services.udev.packages = with pkgs; [ logitech-udev-rules ];
|
||||||
|
};
|
||||||
|
}
|
@ -45,6 +45,7 @@
|
|||||||
./hardware/sensor/iio.nix
|
./hardware/sensor/iio.nix
|
||||||
./hardware/ksm.nix
|
./hardware/ksm.nix
|
||||||
./hardware/ledger.nix
|
./hardware/ledger.nix
|
||||||
|
./hardware/logitech.nix
|
||||||
./hardware/mcelog.nix
|
./hardware/mcelog.nix
|
||||||
./hardware/network/b43.nix
|
./hardware/network/b43.nix
|
||||||
./hardware/nitrokey.nix
|
./hardware/nitrokey.nix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user