feat(nixos): scaffold macbook host for apple silicon (aarch64-linux)

This commit is contained in:
kenji
2026-01-05 12:59:33 -06:00
parent 425c429297
commit b8df78e935
6 changed files with 164 additions and 53 deletions
+1
View File
@@ -8,5 +8,6 @@
../../modules/nixos/default.nix
../../modules/nixos/hyprland.nix
../../modules/nixos/gaming.nix
../../modules/nixos/amd.nix
];
}
+24
View File
@@ -0,0 +1,24 @@
{
pkgs,
myConfig,
...
}: {
imports = [
./hardware-configuration.nix
../../modules/nixos/default.nix
../../modules/nixos/hyprland.nix
# No gaming.nix (Steam is x86 only)
# No amd.nix
];
# Apple Silicon specific hardware tweaks
hardware.asahi = {
# peripheralFirmwareDirectory = ./firmware; # If you have extracted firmware
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "replace";
};
# Bootloader for Asahi is usually systemd-boot or grub, but asahi-module handles m1n1
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false; # Asahi often prefers this false to avoid bricking nvram
}
+30
View File
@@ -0,0 +1,30 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "usb_storage" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0000-0000";
fsType = "vfat";
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}