summaryrefslogtreecommitdiff
path: root/sys/hardware/altera.nix
blob: 2fc1bb604186607ac56e2311b49ad8f8ccf58c66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ config, lib, ... }:
with lib; let
  cfg = config.local.hardware.altera;
in
{
  options.local.hardware.altera = {
    enable = mkEnableOption "Altera USB Blaster";
  };

  config = mkIf cfg.enable {
    services.udev.extraRules = ''
      # USB-Blaster
      ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="660", GROUP="users", TAG+="uaccess"
      ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="660", GROUP="users", TAG+="uaccess"
      ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="660", GROUP="users", TAG+="uaccess"

      # USB-Blaster II
      ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="660", GROUP="users", TAG+="uaccess"
      ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="660", GROUP="users", TAG+="uaccess"
    '';
  };
}