mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
29 lines
663 B
Nix
29 lines
663 B
Nix
{ 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 ];
|
|
};
|
|
}
|