diff --git a/flake.lock b/flake.lock index 91bb6b3..06235fc 100644 --- a/flake.lock +++ b/flake.lock @@ -273,15 +273,15 @@ "nixos-m1": { "flake": false, "locked": { - "lastModified": 1665997276, - "narHash": "sha256-vkhyCTxRC7yEW7iNfGjbJCtiakPzz9+bCgB3QOXdsPA=", - "owner": "natsukagami", + "lastModified": 1667100472, + "narHash": "sha256-wDeb4UY7Ba5KzebGpL4OK0rkp4GLOhTM+z1RbNyDIXU=", + "owner": "tpwrules", "repo": "nixos-m1", - "rev": "8d3b6911f2957537bf148e3953684391b6f55336", + "rev": "263cbee781a254e9161acc319e28808d1a4063cf", "type": "github" }, "original": { - "owner": "natsukagami", + "owner": "tpwrules", "repo": "nixos-m1", "type": "github" } diff --git a/flake.nix b/flake.nix index 9ffee73..6e92bbc 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,7 @@ kakoune.flake = false; kak-lsp.url = github:kak-lsp/kak-lsp; kak-lsp.flake = false; - nixos-m1.url = github:natsukagami/nixos-m1; + nixos-m1.url = github:tpwrules/nixos-m1; nixos-m1.flake = false; # --- diff --git a/kagami-air-m1/configuration.nix b/kagami-air-m1/configuration.nix index a6c8104..d349ef9 100644 --- a/kagami-air-m1/configuration.nix +++ b/kagami-air-m1/configuration.nix @@ -9,8 +9,6 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix - # Firmware extracted manually - ./m1-support/firmware # Fonts ../modules/personal/fonts ../modules/services/swaylock.nix @@ -22,16 +20,9 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = false; - # boot.kernelBuildIsCross = true; - boot.kernelBuildIs16K = false; - - boot.kernelPatches = [{ - name = "enable_uinput"; - patch = null; - extraConfig = '' - CONFIG_INPUT_UINPUT m - ''; - }]; + # Asahi kernel configuration + hardware.asahi.peripheralFirmwareDirectory = ./firmware; + hardware.asahi.use4KPages = true; networking.hostName = "kagami-air-m1"; # Define your hostname. diff --git a/kagami-air-m1/extract_firmware.sh b/kagami-air-m1/extract_firmware.sh new file mode 100755 index 0000000..3149301 --- /dev/null +++ b/kagami-air-m1/extract_firmware.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +mkdir -p firmware && cp /boot/asahi/{all_firmware.tar.gz,kernelcache*} firmware diff --git a/kagami-air-m1/firmware/all_firmware.tar.gz b/kagami-air-m1/firmware/all_firmware.tar.gz new file mode 100755 index 0000000..1c09e00 Binary files /dev/null and b/kagami-air-m1/firmware/all_firmware.tar.gz differ diff --git a/kagami-air-m1/firmware/kernelcache.release.mac13g b/kagami-air-m1/firmware/kernelcache.release.mac13g new file mode 100755 index 0000000..db5e091 Binary files /dev/null and b/kagami-air-m1/firmware/kernelcache.release.mac13g differ diff --git a/kagami-air-m1/m1-support/firmware/default.nix b/kagami-air-m1/m1-support/firmware/default.nix deleted file mode 100644 index d28c6d3..0000000 --- a/kagami-air-m1/m1-support/firmware/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - hardware.firmware = [ - (pkgs.stdenvNoCC.mkDerivation { - name = "firmware"; - buildCommand = '' - mkdir -p $out/lib/firmware - FIRMWARE='${./firmware.tar}' - if [ -e "$FIRMWARE" ]; then - tar xf "$FIRMWARE" -C $out/lib/firmware - else - # stop nixos infra from breaking when it doesn't have any firmware - touch $out/lib/firmware/.dummy - fi - ''; - }) - ]; -} diff --git a/kagami-air-m1/m1-support/firmware/firmware.tar b/kagami-air-m1/m1-support/firmware/firmware.tar deleted file mode 100755 index c271d82..0000000 Binary files a/kagami-air-m1/m1-support/firmware/firmware.tar and /dev/null differ