Skip to content

Commit 9eac410

Browse files
felixsingerbjornfor
authored andcommitted
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 <[email protected]>
1 parent 31d026d commit 9eac410

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

nixos/modules/hardware/libftdi.nix

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
config,
3+
lib,
4+
pkgs,
5+
...
6+
}:
7+
8+
let
9+
cfg = config.hardware.libftdi;
10+
in
11+
{
12+
options.hardware.libftdi = {
13+
enable = lib.mkEnableOption "udev rules for devices supported by libftdi";
14+
package = lib.mkPackageOption pkgs "libftdi1" { };
15+
};
16+
17+
config = lib.mkIf cfg.enable {
18+
users.groups.ftdi = { };
19+
services.udev.packages = [ cfg.package ];
20+
};
21+
22+
meta.maintainers = with lib.maintainers; [ felixsinger ];
23+
}

nixos/modules/module-list.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
./hardware/keyboard/zsa.nix
7979
./hardware/ksm.nix
8080
./hardware/ledger.nix
81+
./hardware/libftdi.nix
8182
./hardware/logitech.nix
8283
./hardware/mcelog.nix
8384
./hardware/network/ath-user-regd.nix

0 commit comments

Comments
 (0)