mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
nixos/libftdi: Init module
By enabling this module, the ftdi system group is created and udev rules from the libftdi package are enabled. Read-/Write access is granted to the members of the ftdi group and to seat sessions. Signed-off-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
parent
31d026d97b
commit
9eac410097
2 changed files with 24 additions and 0 deletions
23
nixos/modules/hardware/libftdi.nix
Normal file
23
nixos/modules/hardware/libftdi.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.hardware.libftdi;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.hardware.libftdi = {
|
||||||
|
enable = lib.mkEnableOption "udev rules for devices supported by libftdi";
|
||||||
|
package = lib.mkPackageOption pkgs "libftdi1" { };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
users.groups.ftdi = { };
|
||||||
|
services.udev.packages = [ cfg.package ];
|
||||||
|
};
|
||||||
|
|
||||||
|
meta.maintainers = with lib.maintainers; [ felixsinger ];
|
||||||
|
}
|
|
@ -78,6 +78,7 @@
|
||||||
./hardware/keyboard/zsa.nix
|
./hardware/keyboard/zsa.nix
|
||||||
./hardware/ksm.nix
|
./hardware/ksm.nix
|
||||||
./hardware/ledger.nix
|
./hardware/ledger.nix
|
||||||
|
./hardware/libftdi.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