summaryrefslogtreecommitdiff
path: root/nixos/modules/system/boot
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r--nixos/modules/system/boot/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/default.nix b/nixos/modules/system/boot/default.nix
new file mode 100644
index 0000000..eedf939
--- /dev/null
+++ b/nixos/modules/system/boot/default.nix
@@ -0,0 +1,31 @@
+{ config, pkgs, lib, modulesPath, ... }:
+
+{
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-amd" ];
+ boot.extraModulePackages = [ ];
+
+ # EDID firmware loading is kept here because it's a kernel-level boot concern.
+ # Commented kernel params from the original config are preserved.
+ # boot.kernelParams = [
+ # "drm.edid_firmware=DP-1:edid/mi_edid.bin"
+ # "video=DP-1:2560x1440@180"
+ # ];
+ hardware.firmware = [
+ (pkgs.runCommand "custom-edid" {} ''
+ mkdir -p $out/lib/firmware/edid
+ cp ${../../../mi_edid.bin} $out/lib/firmware/edid/mi_edid.bin
+ '')
+ ];
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+} \ No newline at end of file