diff --git a/nixos/modules/hardware/libjaylink.nix b/nixos/modules/hardware/libjaylink.nix new file mode 100644 index 000000000000..0eb531e97926 --- /dev/null +++ b/nixos/modules/hardware/libjaylink.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hardware.libjaylink; +in +{ + options.hardware.libjaylink = { + enable = lib.mkEnableOption '' + udev rules for devices supported by libjaylink. + Add users to the `jlink` group in order to grant + them access + ''; + package = lib.mkPackageOption pkgs "libjaylink" { }; + }; + + config = lib.mkIf cfg.enable { + users.groups.jlink = { }; + services.udev.packages = [ cfg.package ]; + }; + + meta.maintainers = with lib.maintainers; [ felixsinger ]; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 8b0f482e197c..719fce2f4e6c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -80,6 +80,7 @@ ./hardware/ksm.nix ./hardware/ledger.nix ./hardware/libftdi.nix + ./hardware/libjaylink.nix ./hardware/logitech.nix ./hardware/mcelog.nix ./hardware/network/ath-user-regd.nix