mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00

By enabling this module, the jlink system group is created and udev rules from the libjaylink package are enabled. Read-/Write access is granted to the members of the jlink group and to seat sessions. Signed-off-by: Felix Singer <felixsinger@posteo.net>
27 lines
526 B
Nix
27 lines
526 B
Nix
{
|
|
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 ];
|
|
}
|