devices.pc: add advanced uefi settings

This commit is contained in:
陈浩南 2024-07-25 22:47:49 +08:00
parent 247c1d945a
commit 5ca6cc05f3
6 changed files with 40 additions and 5 deletions

1
.gitattributes vendored
View File

@ -2,3 +2,4 @@
*.icm filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text
*.efi filter=lfs diff=lfs merge=lfs -text

BIN
devices/pc/bios/Bootx64.efi (Stored with Git LFS) Normal file

Binary file not shown.

BIN
devices/pc/bios/DisplayEngine.efi (Stored with Git LFS) Normal file

Binary file not shown.

BIN
devices/pc/bios/SetupBrowser.efi (Stored with Git LFS) Normal file

Binary file not shown.

BIN
devices/pc/bios/UiApp.efi (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -149,11 +149,33 @@ inputs:
};
bugs = [ "xmunet" "backlight" "amdpstate" ];
};
boot.kernelParams =
boot =
{
kernelParams =
[
"acpi_osi=!" ''acpi_osi="Windows 2015"''
"amdgpu.sg_display=0" # 混合模式下避免外接屏幕闪烁,和内置外接屏幕延迟
];
loader.grub =
{
extraFiles =
{
"shell.efi" = "${inputs.pkgs.edk2-uefi-shell}/shell.efi";
"efi/DisplayEngine.efi" = ./bios/DisplayEngine.efi;
"efi/SetupBrowser.efi" = ./bios/SetupBrowser.efi;
"efi/UiApp.efi" = ./bios/UiApp.efi;
"efi/Bootx64.efi" = ./bios/Bootx64.efi;
};
extraEntries =
''
menuentry 'Advanced UEFI Firmware Settings' {
insmod fat
insmod chain
chainloader @bootRoot@/Bootx64.efi
}
'';
};
};
# 禁止鼠标等在睡眠时唤醒
services.udev.extraRules = ''ACTION=="add", ATTR{power/wakeup}="disabled"'';
networking.extraHosts = "74.211.99.69 mirism.one beta.mirism.one ng01.mirism.one";