diff --git a/nixos/modules/hardware/libftdi.nix b/nixos/modules/hardware/libftdi.nix new file mode 100644 index 000000000000..b79e2ff8c257 --- /dev/null +++ b/nixos/modules/hardware/libftdi.nix @@ -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 ]; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index a09388b9058a..d8dee392d89b 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -78,6 +78,7 @@ ./hardware/keyboard/zsa.nix ./hardware/ksm.nix ./hardware/ledger.nix + ./hardware/libftdi.nix ./hardware/logitech.nix ./hardware/mcelog.nix ./hardware/network/ath-user-regd.nix