From 5a2e86fccd949cccf99f69668dfead5a66176f19 Mon Sep 17 00:00:00 2001 From: Sapi <144389458+FBIGlowie@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:13:02 +0000 Subject: [PATCH 1/8] Update Nixpkgs to use unstable version and add apps --- flake.nix | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index d8247bb..e2b8db1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - inputs.nixpkgs.url = "github:NixOS/nixpkgs/24.05"; + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; @@ -13,6 +13,12 @@ system: let pkgs = nixpkgs.legacyPackages.${system}; + src = pkgs.fetchFromGitHub { + owner = "kholia"; + repo = "OSX-KVM"; + rev = "master"; + hash = "sha256-kxhVe3U2lFt6joSMUGWZuHOfFHdzwKXP4H3hz/cA2vE="; + }; in { devShells.default = pkgs.mkShell { @@ -22,7 +28,21 @@ qemu_kvm ]; }; + apps.default = { + type = "app"; + program = toString (pkgs.writeShellScript "build-osx" '' + name=$1 + ${pkgs.coreutils}/bin/mkdir ./OSX-KVM + ${pkgs.coreutils}/bin/cp -r --no-preserve=mode ${src}/* ./OSX-KVM + ${pkgs.coreutils}/bin/chmod -R +w ./OSX-KVM + ${pkgs.coreutils}/bin/chmod -R +x ./OSX-KVM/*.sh + cd ./OSX-KVM + ${pkgs.python3}/bin/python3 ./fetch-macOS-v2.py --shortname=$name + ${pkgs.dmg2img}/bin/dmg2img -i BaseSystem.dmg ./BaseSystem.img + ${pkgs.qemu}/bin/qemu-img create -f qcow2 ./mac_hdd_ng.img 256G + ./OpenCore-Boot.sh + ''); + }; } ); } - From 4818d7e586db7b20bd4493538df8a804313fbde5 Mon Sep 17 00:00:00 2001 From: Sapi <144389458+FBIGlowie@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:19:03 +0000 Subject: [PATCH 2/8] Disable OSX-KVM input in flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index e2b8db1..e62bff1 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.OSX-KVM.flake = false; outputs = { self From 22c485eec147f4ff10c3672a6bf3bda1570c162e Mon Sep 17 00:00:00 2001 From: Sapi <144389458+FBIGlowie@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:21:07 +0000 Subject: [PATCH 3/8] Remove OSX-KVM input from flake.nix --- flake.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/flake.nix b/flake.nix index e62bff1..e2b8db1 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,6 @@ inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.OSX-KVM.flake = false; outputs = { self From decf5d2c63e32b4aad2f13b7288550a8de4fa4e8 Mon Sep 17 00:00:00 2001 From: Sapi <144389458+FBIGlowie@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:25:34 +0000 Subject: [PATCH 4/8] Update README with Nix Builder instructions Add instructions for using Nix Builder to clone and run the OSX-KVM repository. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8189bb8..98edfda 100644 --- a/README.md +++ b/README.md @@ -142,10 +142,17 @@ processors work just fine (even for macOS Sonoma). Choose a product to download (1-9): 7 ``` - Note: Modern NVIDIA GPUs are supported on HighSierra but not on later versions of macOS. +* Or simple Nix Builder. + + ``` + nix run github:FBIGlowie/OSX-KVM/ --no-write-lock-file -- catalina + ``` + This will clone a repository at `./OSX-KVM`, give it the right permissions, + and automatically start `./OpenCore-Boot.sh`. + * Convert the downloaded `BaseSystem.dmg` file into the `BaseSystem.img` file. ``` From 119c3f512a7b0d1abc46d03dca4e0a55f2c61078 Mon Sep 17 00:00:00 2001 From: Sapi <144389458+FBIGlowie@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:26:16 +0000 Subject: [PATCH 5/8] Reorganize Nix Builder instructions in README Rearranged Nix Builder instructions in README.md for clarity. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 98edfda..153381d 100644 --- a/README.md +++ b/README.md @@ -145,14 +145,6 @@ processors work just fine (even for macOS Sonoma). Note: Modern NVIDIA GPUs are supported on HighSierra but not on later versions of macOS. -* Or simple Nix Builder. - - ``` - nix run github:FBIGlowie/OSX-KVM/ --no-write-lock-file -- catalina - ``` - This will clone a repository at `./OSX-KVM`, give it the right permissions, - and automatically start `./OpenCore-Boot.sh`. - * Convert the downloaded `BaseSystem.dmg` file into the `BaseSystem.img` file. ``` @@ -169,6 +161,14 @@ processors work just fine (even for macOS Sonoma). NOTE: Create this HDD image file on a fast SSD/NVMe disk for best results. +* Or simple Nix Builder. + + ``` + nix run github:FBIGlowie/OSX-KVM/ --no-write-lock-file -- catalina + ``` + This will clone a repository at `./OSX-KVM`, give it the right permissions, + and automatically start `./OpenCore-Boot.sh`. + * Now you are ready to install macOS 🚀 From 6da072535bda64720439d585f69b331f5f22cb9d Mon Sep 17 00:00:00 2001 From: Sapi <144389458+FBIGlowie@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:27:06 +0000 Subject: [PATCH 6/8] Enhance README with image download step Updated instructions to include downloading the image. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 153381d..6e0851f 100644 --- a/README.md +++ b/README.md @@ -166,8 +166,8 @@ processors work just fine (even for macOS Sonoma). ``` nix run github:FBIGlowie/OSX-KVM/ --no-write-lock-file -- catalina ``` - This will clone a repository at `./OSX-KVM`, give it the right permissions, - and automatically start `./OpenCore-Boot.sh`. + This will clone a repository at `./OSX-KVM`, download the image, + give everything the right permissions, and start `./OpenCore-Boot.sh`. * Now you are ready to install macOS 🚀 From 6a88f5d1f0b5cffbee02a9f51e792ea7a5b201be Mon Sep 17 00:00:00 2001 From: Sapi <144389458+FBIGlowie@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:27:55 +0000 Subject: [PATCH 7/8] Update README for clarity on Nix command usage --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e0851f..46db01a 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ processors work just fine (even for macOS Sonoma). NOTE: Create this HDD image file on a fast SSD/NVMe disk for best results. -* Or simple Nix Builder. +* Or use a simple nix command if you have it installed. ``` nix run github:FBIGlowie/OSX-KVM/ --no-write-lock-file -- catalina From 09557d6101104dd93e9c5907dfeaae036c325d73 Mon Sep 17 00:00:00 2001 From: Sapi <144389458+FBIGlowie@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:28:46 +0000 Subject: [PATCH 8/8] Changed the nix command repo name to match upstream --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 46db01a..9812378 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ processors work just fine (even for macOS Sonoma). * Or use a simple nix command if you have it installed. ``` - nix run github:FBIGlowie/OSX-KVM/ --no-write-lock-file -- catalina + nix run github:kholia/OSX-KVM/ --no-write-lock-file -- catalina ``` This will clone a repository at `./OSX-KVM`, download the image, give everything the right permissions, and start `./OpenCore-Boot.sh`.