about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/hardware/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/hardware/cpu')
-rw-r--r--nixpkgs/nixos/modules/hardware/cpu/amd-microcode.nix2
-rw-r--r--nixpkgs/nixos/modules/hardware/cpu/amd-ryzen-smu.nix26
-rw-r--r--nixpkgs/nixos/modules/hardware/cpu/amd-sev.nix8
-rw-r--r--nixpkgs/nixos/modules/hardware/cpu/intel-microcode.nix2
-rw-r--r--nixpkgs/nixos/modules/hardware/cpu/intel-sgx.nix10
-rw-r--r--nixpkgs/nixos/modules/hardware/cpu/x86-msr.nix10
6 files changed, 42 insertions, 16 deletions
diff --git a/nixpkgs/nixos/modules/hardware/cpu/amd-microcode.nix b/nixpkgs/nixos/modules/hardware/cpu/amd-microcode.nix
index 3f52cb1fca3e..621c7066bfe1 100644
--- a/nixpkgs/nixos/modules/hardware/cpu/amd-microcode.nix
+++ b/nixpkgs/nixos/modules/hardware/cpu/amd-microcode.nix
@@ -11,7 +11,7 @@ with lib;
     hardware.cpu.amd.updateMicrocode = mkOption {
       default = false;
       type = types.bool;
-      description = lib.mdDoc ''
+      description = ''
         Update the CPU microcode for AMD processors.
       '';
     };
diff --git a/nixpkgs/nixos/modules/hardware/cpu/amd-ryzen-smu.nix b/nixpkgs/nixos/modules/hardware/cpu/amd-ryzen-smu.nix
new file mode 100644
index 000000000000..b1a5895aaa24
--- /dev/null
+++ b/nixpkgs/nixos/modules/hardware/cpu/amd-ryzen-smu.nix
@@ -0,0 +1,26 @@
+{ config
+, lib
+, ...
+}:
+let
+  inherit (lib) mkEnableOption mkIf;
+  cfg = config.hardware.cpu.amd.ryzen-smu;
+  ryzen-smu = config.boot.kernelPackages.ryzen-smu;
+in
+{
+  options.hardware.cpu.amd.ryzen-smu = {
+    enable = mkEnableOption ''
+        ryzen_smu, a linux kernel driver that exposes access to the SMU (System Management Unit) for certain AMD Ryzen Processors.
+
+        WARNING: Damage cause by use of your AMD processor outside of official AMD specifications or outside of factory settings are not covered under any AMD product warranty and may not be covered by your board or system manufacturer's warranty
+      '';
+  };
+
+  config = mkIf cfg.enable {
+    boot.kernelModules = [ "ryzen-smu" ];
+    boot.extraModulePackages = [ ryzen-smu ];
+    environment.systemPackages = [ ryzen-smu ];
+  };
+
+  meta.maintainers = with lib.maintainers; [ Cryolitia phdyellow ];
+}
diff --git a/nixpkgs/nixos/modules/hardware/cpu/amd-sev.nix b/nixpkgs/nixos/modules/hardware/cpu/amd-sev.nix
index 08e1de496383..d6225bc35a1e 100644
--- a/nixpkgs/nixos/modules/hardware/cpu/amd-sev.nix
+++ b/nixpkgs/nixos/modules/hardware/cpu/amd-sev.nix
@@ -5,19 +5,19 @@ let
   cfgSevGuest = config.hardware.cpu.amd.sevGuest;
 
   optionsFor = device: group: {
-    enable = mkEnableOption (lib.mdDoc "access to the AMD ${device} device");
+    enable = mkEnableOption "access to the AMD ${device} device";
     user = mkOption {
-      description = lib.mdDoc "Owner to assign to the ${device} device.";
+      description = "Owner to assign to the ${device} device.";
       type = types.str;
       default = "root";
     };
     group = mkOption {
-      description = lib.mdDoc "Group to assign to the ${device} device.";
+      description = "Group to assign to the ${device} device.";
       type = types.str;
       default = group;
     };
     mode = mkOption {
-      description = lib.mdDoc "Mode to set for the ${device} device.";
+      description = "Mode to set for the ${device} device.";
       type = types.str;
       default = "0660";
     };
diff --git a/nixpkgs/nixos/modules/hardware/cpu/intel-microcode.nix b/nixpkgs/nixos/modules/hardware/cpu/intel-microcode.nix
index d30ebfefeeac..acce565fd808 100644
--- a/nixpkgs/nixos/modules/hardware/cpu/intel-microcode.nix
+++ b/nixpkgs/nixos/modules/hardware/cpu/intel-microcode.nix
@@ -11,7 +11,7 @@ with lib;
     hardware.cpu.intel.updateMicrocode = mkOption {
       default = false;
       type = types.bool;
-      description = lib.mdDoc ''
+      description = ''
         Update the CPU microcode for Intel processors.
       '';
     };
diff --git a/nixpkgs/nixos/modules/hardware/cpu/intel-sgx.nix b/nixpkgs/nixos/modules/hardware/cpu/intel-sgx.nix
index 38a484cb126e..c66b43a2ec27 100644
--- a/nixpkgs/nixos/modules/hardware/cpu/intel-sgx.nix
+++ b/nixpkgs/nixos/modules/hardware/cpu/intel-sgx.nix
@@ -6,7 +6,7 @@ let
 in
 {
   options.hardware.cpu.intel.sgx.enableDcapCompat = mkOption {
-    description = lib.mdDoc ''
+    description = ''
       Whether to enable backward compatibility for SGX software build for the
       out-of-tree Intel SGX DCAP driver.
 
@@ -20,19 +20,19 @@ in
   };
 
   options.hardware.cpu.intel.sgx.provision = {
-    enable = mkEnableOption (lib.mdDoc "access to the Intel SGX provisioning device");
+    enable = mkEnableOption "access to the Intel SGX provisioning device";
     user = mkOption {
-      description = lib.mdDoc "Owner to assign to the SGX provisioning device.";
+      description = "Owner to assign to the SGX provisioning device.";
       type = types.str;
       default = "root";
     };
     group = mkOption {
-      description = lib.mdDoc "Group to assign to the SGX provisioning device.";
+      description = "Group to assign to the SGX provisioning device.";
       type = types.str;
       default = defaultPrvGroup;
     };
     mode = mkOption {
-      description = lib.mdDoc "Mode to set for the SGX provisioning device.";
+      description = "Mode to set for the SGX provisioning device.";
       type = types.str;
       default = "0660";
     };
diff --git a/nixpkgs/nixos/modules/hardware/cpu/x86-msr.nix b/nixpkgs/nixos/modules/hardware/cpu/x86-msr.nix
index 554bec1b7db1..95e1be23cd95 100644
--- a/nixpkgs/nixos/modules/hardware/cpu/x86-msr.nix
+++ b/nixpkgs/nixos/modules/hardware/cpu/x86-msr.nix
@@ -5,7 +5,7 @@
 }:
 let
   inherit (builtins) hasAttr;
-  inherit (lib) mkIf mdDoc;
+  inherit (lib) mkIf;
   cfg = config.hardware.cpu.x86.msr;
   opt = options.hardware.cpu.x86.msr;
   defaultGroup = "msr";
@@ -28,24 +28,24 @@ let
 in
 {
   options.hardware.cpu.x86.msr = with lib.options; with lib.types; {
-    enable = mkEnableOption (mdDoc "the `msr` (Model-Specific Registers) kernel module and configure `udev` rules for its devices (usually `/dev/cpu/*/msr`)");
+    enable = mkEnableOption "the `msr` (Model-Specific Registers) kernel module and configure `udev` rules for its devices (usually `/dev/cpu/*/msr`)";
     owner = mkOption {
       type = str;
       default = "root";
       example = "nobody";
-      description = mdDoc "Owner ${set}";
+      description = "Owner ${set}";
     };
     group = mkOption {
       type = str;
       default = defaultGroup;
       example = "nobody";
-      description = mdDoc "Group ${set}";
+      description = "Group ${set}";
     };
     mode = mkOption {
       type = str;
       default = "0640";
       example = "0660";
-      description = mdDoc "Mode ${set}";
+      description = "Mode ${set}";
     };
     settings = mkOption {
       type = submodule {