From 15eaef3235e0ec6b86d41f6caed04cdeb6c2bccd Mon Sep 17 00:00:00 2001 From: elwrcl Date: Tue, 14 Apr 2026 23:05:06 +0300 Subject: [PATCH] not ready! --- nixos/boot/default.nix | 4 ++ nixos/boot/opencore.nix | 86 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 nixos/boot/opencore.nix diff --git a/nixos/boot/default.nix b/nixos/boot/default.nix index 65ecf31..4945d38 100644 --- a/nixos/boot/default.nix +++ b/nixos/boot/default.nix @@ -1,6 +1,10 @@ { config, pkgs, ... }: { + imports = [ + ./opencore.nix + ]; + boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest-lto-x86_64-v2; boot.kernelParams = [ diff --git a/nixos/boot/opencore.nix b/nixos/boot/opencore.nix new file mode 100644 index 0000000..e2383d5 --- /dev/null +++ b/nixos/boot/opencore.nix @@ -0,0 +1,86 @@ +{ config, pkgs, lib, ... }: + +let + ocPath = "/boot/EFI/OC"; +in +{ + environment.systemPackages = [ pkgs.efibootmgr ]; + + system.activationScripts.opencoreConfig = { + text = '' + echo "--- Copland Init ---" + + mkdir -p ${ocPath} + + cat < ${ocPath}/config.plist + + + + + Booter + + Quirks + + AvoidRuntimeDefrag + EnableSafeModeCaching + ProvideCustomSlide + + + + DeviceProperties + + Add + + PciRoot(0x0)/Pci(0x2,0x0) + + AAPL,ig-platform-idAwBmAQ== + framebuffer-patch-enableAQAAAA== + + + + + Misc + + Boot + + PickerModeExternal PickerAttributes17 + Timeout5 + + Security + + AllowSetDefault + ScanPolicy0 + VaultOptional + + + + NVRAM + + Add + + 7C436110-AB2A-4BBB-A880-FE41995C9F82 + + boot-args + -v amfi_get_out_of_my_way=1 -no_compat_check ipc_control_port_options=0 + + + + + UEFI + + Input + + KeySupport KeySupportModeAuto + ReleaseUsbOwnership + Drivers + + OpenRuntime.efi + OpenCanopy.efi OpenLinuxBoot.efi + OpenUsbKbDxe.efi + + + + + ''; + }; +}