From a30535af6adf7e9a9352280fa1e2ea35d6988d77 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Tue, 15 Jul 2025 14:47:42 +0800 Subject: [PATCH] feat: apple-silicon - try to use m2's gpu --- hosts/12kingdoms-shoukei/hardware-configuration.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hosts/12kingdoms-shoukei/hardware-configuration.nix b/hosts/12kingdoms-shoukei/hardware-configuration.nix index 5947a59d..e720b85f 100644 --- a/hosts/12kingdoms-shoukei/hardware-configuration.nix +++ b/hosts/12kingdoms-shoukei/hardware-configuration.nix @@ -18,7 +18,17 @@ in { ]; # Specify path to peripheral firmware files. - hardware.asahi.peripheralFirmwareDirectory = "${my-asahi-firmware}/macbook-pro-m2-a2338"; + hardware.asahi = { + enable = true; + peripheralFirmwareDirectory = "${my-asahi-firmware}/macbook-pro-m2-a2338"; + + # build the Asahi Linux Kernel with Rust support + withRust = true; + # use apple-silicon's GPU instead of CPU + useExperimentalGPUDriver = true; + # How to install the Asahi Mesa driver + experimentalGPUInstallMode = "driver"; # driver / replace(for non-flakes) / overlay + }; networking.wireless.iwd = { enable = true;