cleanining up coral tpu location

This commit is contained in:
ari committed 2024-12-26 15:55:42 -05:00
1 parent bf62802ffd
commit 71efa635fc
6 files changed
+57 -18

No files matched your search

@@ -0,0 +1,22 @@
{ config, lib, ... }:
with lib;
let cfg = config.skyg.nixos.common.hardware.udevrules.coraltpu;
in {
options = {
skyg.nixos.common.hardware.udevrules.coraltpu = {
enable = mkEnableOption
"Enable Coral TPU Udev rules";
symlinkName = mkOption {
description = "The special symlink to give to the coral tpu";
type = types.str;
default = "coral1";
};
};
};
config = mkIf cfg.enable {
services.udev.extraRules = ''
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a6e", ATTRS{idProduct}=="089a", MODE="0664", TAG+="uaccess", SYMLINK+="${cfg.symlinkName}"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="9302", MODE="0664", TAG+="uaccess", SYMLINK+="${cfg.symlinkName}"
'';
};
}
@@ -7,6 +7,7 @@
./laptop-power.nix
./nvidia.nix
./amdgpu.nix
./coral-tpu-udev.nix
];
# Firmware Updater
services.fwupd.enable = true;