1{ config, lib, pkgs, ... }:
2
3let
4 cfg = config.hardware.saleae-logic;
5in
6{
7 options.hardware.saleae-logic = {
8 enable = lib.mkEnableOption "udev rules for Saleae Logic devices";
9
10 package = lib.mkOption {
11 type = lib.types.package;
12 default = pkgs.saleae-logic-2;
13 defaultText = lib.literalExpression "pkgs.saleae-logic-2";
14 description = ''
15 Saleae Logic package to use.
16 '';
17 };
18 };
19
20 config = lib.mkIf cfg.enable {
21 services.udev.packages = [ cfg.package ];
22 };
23
24 meta.maintainers = with lib.maintainers; [ chivay ];
25}