Browse Source

modules: add hardware.cpu.amd.ryzenSMU

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

1
flake.nix

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

19
modules/ryzenSMU/default.nix

@ -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