From 2d703a0498baec7afbfba61fbaaf9b478d4b62ab Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Fri, 14 Mar 2025 19:47:32 -0400 Subject: [PATCH] Mac VM, needs work to be useful but it "works" when installed. --- flake.nix | 1 + hosts/common/optional/ventura.nix | 22 ++++++++++++++++++++++ hosts/nixos/rune/default.nix | 1 + 3 files changed, 24 insertions(+) create mode 100644 hosts/common/optional/ventura.nix diff --git a/flake.nix b/flake.nix index 441b485..5236da2 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; # VM tools + # nixtheplanet.url = "github:matthewcroughan/nixtheplanet"; nixvirt = { url = "https://flakehub.com/f/AshleyYakeley/NixVirt/*.tar.gz"; inputs.nixpkgs.follows = "nixpkgs-stable"; diff --git a/hosts/common/optional/ventura.nix b/hosts/common/optional/ventura.nix new file mode 100644 index 0000000..56e57b5 --- /dev/null +++ b/hosts/common/optional/ventura.nix @@ -0,0 +1,22 @@ +{ + inputs, + pkgs, + ... +}: +{ + imports = [ + inputs.nixtheplanet.nixosModules.macos-ventura + ]; + + services.macos-ventura = { + enable = true; + package = pkgs.makeDarwinImage { diskSizeBytes = 80000000000; }; + openFirewall = true; + vncListenAddr = "0.0.0.0"; + autoStart = false; + extraQemuFlags = [ + "-spice" + "port=5930,addr=127.0.0.1,disable-ticketing" + ]; + }; +} diff --git a/hosts/nixos/rune/default.nix b/hosts/nixos/rune/default.nix index 18221dc..ba96d12 100644 --- a/hosts/nixos/rune/default.nix +++ b/hosts/nixos/rune/default.nix @@ -37,6 +37,7 @@ in "hosts/common/optional/nvtop.nix" # GPU monitor (not available in home-manager) "hosts/common/optional/plymouth.nix" # fancy boot screen "hosts/common/optional/vial.nix" # KB setup + # "hosts/common/optional/ventura.nix" # macos vm ## Misc Inputs ##