summaryrefslogtreecommitdiffstats
path: root/nixos/modules/programs/flashprog.nix
blob: 89671fba08f3ff369baa8e9f11256f39b6f05de3 (plain)
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,
  lib,
  pkgs,
  ...
}:

let
  cfg = config.programs.flashprog;
in
{
  options.programs.flashprog = {
    enable = lib.mkEnableOption ''
      configuring flashprog udev rules and
      installing flashprog as system package
    '';
    package = lib.mkPackageOption pkgs "flashprog" { };
  };

  config = lib.mkIf cfg.enable {
    services.udev.packages = [ cfg.package ];
    environment.systemPackages = [ cfg.package ];
    hardware.libjaylink.enable = true;
    hardware.libftdi.enable = true;
  };

  meta.maintainers = with lib.maintainers; [ felixsinger ];
}