diff options
Diffstat (limited to 'nixos/modules/hardware/logitech.nix')
-rw-r--r-- | nixos/modules/hardware/logitech.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nixos/modules/hardware/logitech.nix b/nixos/modules/hardware/logitech.nix new file mode 100644 index 000000000000..d6f43bdddcc8 --- /dev/null +++ b/nixos/modules/hardware/logitech.nix @@ -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 ]; + }; +} |