modules: add hardware.cpu.amd.ryzenSMU

master
Andreas Wiese 2 years ago
parent ff2b70c8a1
commit 77af60d5c7
  1. 1
      flake.nix
  2. 19
      modules/ryzenSMU/default.nix

@ -18,6 +18,7 @@
in {
nixosModules = {
ryzenSMU = import ./modules/ryzenSMU;
};
packages = forAllSystems (system: import ./. {

@ -0,0 +1,19 @@
{ 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; }) ];
};
}
Loading…
Cancel
Save