From 73ddb338cd7542f9569a9ab5cb0481b4f0636710 Mon Sep 17 00:00:00 2001 From: seraphim <18ycm9tx@anonaddy.me> Date: Wed, 29 Jul 2026 22:09:05 +0700 Subject: . --- nixos/modules/system/boot/default.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 nixos/modules/system/boot/default.nix (limited to 'nixos/modules/system/boot') 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 -- cgit v1.2.3