diff options
author | Peter Hoeg <peter@hoeg.com> | 2019-03-11 13:10:31 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2019-03-19 09:58:57 +0800 |
commit | fe97297bb1c3794e90f7acc39eb97720866fd6c4 (patch) | |
tree | 09c49e025e05cb587934e17061ed48b02d48130f /nixos/modules/hardware/logitech.nix | |
parent | 86cff5f5d7a8b172cae4d1e461a4e0d7844666d2 (diff) |
logitech (nixos): support module for logitech input devices
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 0000000000000..d6f43bdddcc8c --- /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 ]; + }; +} |