Use upstream nixos-m1 :D

This commit is contained in:
Natsu Kagami 2022-11-04 10:54:44 +01:00
parent b98e7ab879
commit 4bc8d6f85f
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
8 changed files with 12 additions and 36 deletions

View file

@ -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.

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
mkdir -p firmware && cp /boot/asahi/{all_firmware.tar.gz,kernelcache*} firmware

Binary file not shown.

Binary file not shown.

View file

@ -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
'';
})
];
}