about summary refs log tree commit diff
path: root/hardware/pc/hardware.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hardware/pc/hardware.nix')
-rw-r--r--hardware/pc/hardware.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/hardware/pc/hardware.nix b/hardware/pc/hardware.nix
new file mode 100644
index 0000000..b8c7fa1
--- /dev/null
+++ b/hardware/pc/hardware.nix
@@ -0,0 +1,40 @@
+{ config, lib, inputs, pkgs, modulesPath, ... }:
+let
+  powerMode = "performance";
+in
+{
+  imports = [
+    ./disks.nix
+    "${modulesPath}/profiles/all-hardware.nix"
+  ];
+
+  boot = {
+    initrd = {
+      availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" "aesni_intel" "cryptd" ];
+      kernelModules = [ ];
+    };
+    kernelPackages = pkgs.linuxPackages_latest;
+    kernelModules = [ "kvm_intel" "amdgpu" ];
+    extraModulePackages = [ ];
+    kernelParams = [ "boot.shell_on_fail" "net.ifnames=0" "biosdevname=0" "iomem=relaxed" "mitigations=off" ];
+  };
+
+  powerManagement.cpuFreqGovernor = powerMode;
+
+  services = {
+    xserver = {
+      videoDrivers = [ "amdgpu" ];
+    };
+    fstrim.enable = true;
+  };
+
+  hardware = {
+    cpu.intel.updateMicrocode = true;
+
+    opengl = {
+      enable = true;
+      driSupport = true;
+    };
+  };
+
+}