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

@ -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"
}

View file

@ -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;
# ---

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