about summary refs log tree commit diff
path: root/nixos/modules/programs/tilp2.nix
blob: da9e32e3e6c6d6680d7fb1bc8061bc9a454513eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ config, pkgs, lib, ... }:

with lib;

let
  cfg = config.programs.tilp2;

in {
  options.programs.tilp2 = {
    enable = mkOption {
      type = types.bool;
      default = false;
      description = ''
        Enable tilp2 and udev rules for supported calculators.
      '';
    };
  };

  config = mkIf cfg.enable {
    services.udev.packages = [
      pkgs.libticables2
    ];

    environment.systemPackages = [
      pkgs.tilp2
    ];
  };
}