mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 09:43:30 +01:00
34 lines
600 B
Nix
34 lines
600 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) mkEnableOption mkIf;
|
|
inherit (config.boot.kernelPackages) tt-kmd;
|
|
|
|
cfg = config.hardware.tenstorrent;
|
|
in
|
|
{
|
|
options.hardware.tenstorrent.enable = mkEnableOption "Tenstorrent driver & utilities";
|
|
|
|
config = mkIf cfg.enable {
|
|
boot = {
|
|
extraModulePackages = [ tt-kmd ];
|
|
kernelModules = [ "tenstorrent" ];
|
|
};
|
|
|
|
services.udev.packages = [
|
|
tt-kmd
|
|
];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
tt-smi
|
|
tt-system-tools
|
|
];
|
|
};
|
|
|
|
meta.maintainers = with lib.maintainers; [ RossComputerGuy ];
|
|
}
|