mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
nixos/libjaylink: init module
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>
This commit is contained in:
parent
dae9d1fa3a
commit
4d8d5f5782
2 changed files with 28 additions and 0 deletions
27
nixos/modules/hardware/libjaylink.nix
Normal file
27
nixos/modules/hardware/libjaylink.nix
Normal file
|
@ -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 ];
|
||||||
|
}
|
|
@ -80,6 +80,7 @@
|
||||||
./hardware/ksm.nix
|
./hardware/ksm.nix
|
||||||
./hardware/ledger.nix
|
./hardware/ledger.nix
|
||||||
./hardware/libftdi.nix
|
./hardware/libftdi.nix
|
||||||
|
./hardware/libjaylink.nix
|
||||||
./hardware/logitech.nix
|
./hardware/logitech.nix
|
||||||
./hardware/mcelog.nix
|
./hardware/mcelog.nix
|
||||||
./hardware/network/ath-user-regd.nix
|
./hardware/network/ath-user-regd.nix
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue