packages/modules/ryzenSMU/default.nix

20 lines
455 B
Nix

{ config, lib, pkgs, ... }:
let
inherit (config.boot.kernelPackages) kernel;
inherit (lib) mkEnableOption mkIf;
self = pkgs.callPackage ../.. { inherit pkgs; };
cfg = config.hardware.cpu.amd.ryzenSMU;
in {
options.hardware.cpu.amd.ryzenSMU.enable = mkEnableOption ''
access to SMU of AMD Ryzen Mobile processors
'';
config = mkIf cfg.enable {
boot.extraModulePackages = [ (self.ryzen_smu.override { inherit kernel; }) ];
};
}