mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 14:28:02 +03:00
anotha test for opencore
This commit is contained in:
1 parent
15eaef3235
commit
80953bc329
2 files changed
+50
-15
No files matched your search
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./opencore.nix
|
./opencore.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.limine pkgs.efibootmgr ];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest-lto-x86_64-v2;
|
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest-lto-x86_64-v2;
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
@@ -17,16 +19,14 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
timeout = 5;
|
timeout = 2;
|
||||||
efi = {
|
efi = {
|
||||||
canTouchEfiVariables = true;
|
canTouchEfiVariables = true;
|
||||||
efiSysMountPoint = "/boot";
|
efiSysMountPoint = "/boot";
|
||||||
};
|
};
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configurationLimit = 15;
|
configurationLimit = 5;
|
||||||
consoleMode = "max";
|
|
||||||
editor = false;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
+45
-10
@@ -1,16 +1,28 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
ocPath = "/boot/EFI/OC";
|
ocPath = "/boot/EFI/OC";
|
||||||
|
liminePath = "/boot/EFI/limine";
|
||||||
|
ocDrivers = "${inputs.oceanix.packages.${pkgs.system}.opencore}/EFI/OC/Drivers";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.efibootmgr ];
|
|
||||||
|
|
||||||
system.activationScripts.opencoreConfig = {
|
system.activationScripts.opencoreConfig = {
|
||||||
text = ''
|
text = ''
|
||||||
echo "--- Copland Init ---"
|
echo "--- Copland Bootloader ---"
|
||||||
|
|
||||||
mkdir -p ${ocPath}
|
mkdir -p ${ocPath}/Drivers
|
||||||
|
mkdir -p ${liminePath}
|
||||||
|
|
||||||
|
# EKSİK SÜRÜCÜLERİ BURADA MANUEL KOPYALIYORUZ
|
||||||
|
cp -f ${ocDrivers}/OpenCanopy.efi ${ocPath}/Drivers/
|
||||||
|
cp -f ${ocDrivers}/OpenUsbKbDxe.efi ${ocPath}/Drivers/
|
||||||
|
# Bunlar sende vardı ama garanti olsun diye üzerinden geçiyoruz
|
||||||
|
cp -f ${ocDrivers}/OpenRuntime.efi ${ocPath}/Drivers/
|
||||||
|
cp -f ${ocDrivers}/OpenLinuxBoot.efi ${ocPath}/Drivers/
|
||||||
|
|
||||||
|
if [ -f ${pkgs.limine}/share/limine/BOOTX64.EFI ]; then
|
||||||
|
cp -f ${pkgs.limine}/share/limine/BOOTX64.EFI ${liminePath}/BOOTX64.EFI
|
||||||
|
fi
|
||||||
|
|
||||||
cat <<EOF > ${ocPath}/config.plist
|
cat <<EOF > ${ocPath}/config.plist
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
@@ -22,7 +34,8 @@ in
|
|||||||
<key>Quirks</key>
|
<key>Quirks</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>AvoidRuntimeDefrag</key><true/>
|
<key>AvoidRuntimeDefrag</key><true/>
|
||||||
<key>EnableSafeModeCaching</key><true/>
|
<key>EnableWriteUnprotector</key><true/>
|
||||||
|
<key>SetupVirtualMap</key><true/>
|
||||||
<key>ProvideCustomSlide</key><true/>
|
<key>ProvideCustomSlide</key><true/>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@@ -43,9 +56,18 @@ in
|
|||||||
<dict>
|
<dict>
|
||||||
<key>Boot</key>
|
<key>Boot</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>PickerMode</key><string>External</string> <key>PickerAttributes</key><integer>17</integer>
|
<key>PickerMode</key><string>External</string>
|
||||||
|
<key>PickerAttributes</key><integer>17</integer>
|
||||||
<key>Timeout</key><integer>5</integer>
|
<key>Timeout</key><integer>5</integer>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>Entries</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>Name</key><string>Limine</string>
|
||||||
|
<key>Enabled</key><true/>
|
||||||
|
<key>Path</key><string>PciRoot(0x0)/Pci(0x1f,0x2)/Sata(2,0,0)/HD(1,GPT,73ae5e9a-c31d-4787-9792-ee1843de3e9d,0x800,0x200000)/\EFI\limine\BOOTX64.EFI</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
<key>Security</key>
|
<key>Security</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>AllowSetDefault</key><true/>
|
<key>AllowSetDefault</key><true/>
|
||||||
@@ -66,21 +88,34 @@ in
|
|||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
|
<key>PlatformInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>Generic</key>
|
||||||
|
<dict>
|
||||||
|
<key>SystemProductName</key><string>MacBookPro16,1</string>
|
||||||
|
<key>AdviseFeatures</key><true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
|
||||||
<key>UEFI</key>
|
<key>UEFI</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Input</key>
|
<key>Input</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>KeySupport</key><true/> <key>KeySupportMode</key><string>Auto</string>
|
<key>KeySupport</key><true/>
|
||||||
<key>ReleaseUsbOwnership</key><true/> </dict>
|
<key>KeySupportMode</key><string>Auto</string>
|
||||||
|
<key>ReleaseUsbOwnership</key><true/>
|
||||||
|
</dict>
|
||||||
<key>Drivers</key>
|
<key>Drivers</key>
|
||||||
<array>
|
<array>
|
||||||
<string>OpenRuntime.efi</string>
|
<string>OpenRuntime.efi</string>
|
||||||
<string>OpenCanopy.efi</string> <string>OpenLinuxBoot.efi</string>
|
<string>OpenCanopy.efi</string>
|
||||||
|
<string>OpenLinuxBoot.efi</string>
|
||||||
<string>OpenUsbKbDxe.efi</string>
|
<string>OpenUsbKbDxe.efi</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
EOF
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user