forked from meterriblecrew/packages
modules: add hardware.cpu.amd.ryzenSMU
parent
ff2b70c8a1
commit
77af60d5c7
|
@ -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…
Reference in New Issue