logitech (nixos): support module for logitech input devices

This commit is contained in:
Peter Hoeg 2019-03-11 13:10:31 +08:00
parent 86cff5f5d7
commit fe97297bb1
2 changed files with 29 additions and 0 deletions

View 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 ];
};
}

View File

@ -45,6 +45,7 @@
./hardware/sensor/iio.nix
./hardware/ksm.nix
./hardware/ledger.nix
./hardware/logitech.nix
./hardware/mcelog.nix
./hardware/network/b43.nix
./hardware/nitrokey.nix