1{ config, pkgs, lib, ... }:
2
3with lib;
4
5let
6 cfg = config.programs.tilp2;
7
8in {
9 options.programs.tilp2 = {
10 enable = mkOption {
11 type = types.bool;
12 default = false;
13 description = ''
14 Enable tilp2 and udev rules for supported calculators.
15 '';
16 };
17 };
18
19 config = mkIf cfg.enable {
20 services.udev.packages = [
21 pkgs.libticables2
22 ];
23
24 environment.systemPackages = [
25 pkgs.tilp2
26 ];
27 };
28}