1
0
Fork 0

modules: add hardware.cpu.amd.ryzenSMU

master
Andreas Wiese 2021-03-19 02:01:55 +01:00
parent ff2b70c8a1
commit 77af60d5c7
2 changed files with 20 additions and 0 deletions

View File

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

View File

@ -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; }) ];
};
}