asahi: switch to fairydust kernel, alien: switch to vanilla kernel

This commit is contained in:
Sean Kovacs 2026-01-14 11:50:02 -05:00
commit 390f164d4a
Signed by: sckova
GPG key ID: 00F325187C68651A
5 changed files with 79 additions and 8 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
system/hosts/peach/firmware/* system/hosts/peach/firmware/*
result result
*.qcow2

View file

@ -0,0 +1,68 @@
{
lib,
callPackage,
linuxPackagesFor,
_kernelPatches ? [],
}: let
linux-asahi-pkg = {
stdenv,
lib,
fetchFromGitHub,
buildLinux,
...
}:
buildLinux rec {
inherit stdenv lib;
pname = "linux-asahi-fairydust";
version = "6.18.2";
modDirVersion = version;
extraMeta.branch = "6.18";
src = fetchFromGitHub {
owner = "AsahiLinux";
repo = "linux";
rev = "21a493172ce13c95df12b42faddfca515388d80c";
hash = "sha256-UCQs+VYIWZMYiizkLWdPjSipBuOB1ahZx2oy5VuEjPI=";
};
kernelPatches =
[
{
name = "Asahi config";
patch = null;
structuredExtraConfig = with lib.kernel; {
# Needed for GPU
ARM64_16K_PAGES = yes;
ARM64_MEMORY_MODEL_CONTROL = yes;
ARM64_ACTLR_STATE = yes;
# Might lead to the machine rebooting if not loaded soon enough
APPLE_WATCHDOG = yes;
APPLE_MAILBOX = yes;
APPLE_RTKIT = yes;
APPLE_RTKIT_HELPER = yes;
RUST_APPLE_RTKIT = yes;
RUST_FW_LOADER_ABSTRACTIONS = yes;
# Can not be built as a module, defaults to no
APPLE_M1_CPU_PMU = yes;
# Defaults to 'y', but we want to allow the user to set options in modprobe.d
HID_APPLE = module;
APPLE_PMGR_MISC = yes;
APPLE_PMGR_PWRSTATE = yes;
};
features.rust = true;
}
]
++ _kernelPatches;
};
linux-asahi = callPackage linux-asahi-pkg {};
in
lib.recurseIntoAttrs (linuxPackagesFor linux-asahi)

View file

@ -1,3 +1,4 @@
final: prev: { final: prev: {
spotify-webapp = prev.callPackage (builtins.path {path = ./spotify/package.nix;}) {}; spotify-webapp = prev.callPackage (builtins.path {path = ./spotify/package.nix;}) {};
linux-asahi = prev.callPackage (builtins.path {path = ./linux-fairydust/package.nix;}) {};
} }

View file

@ -82,11 +82,12 @@
services = { services = {
desktopManager.plasma6.enable = true; desktopManager.plasma6.enable = true;
displayManager = { displayManager = {
sddm = { # sddm = {
enable = true; # enable = true;
wayland.enable = true; # wayland.enable = true;
enableHidpi = true; # enableHidpi = true;
}; # };
gdm.enable = true;
defaultSession = "niri"; defaultSession = "niri";
}; };

View file

@ -26,10 +26,11 @@
catppuccin.accent = "blue"; catppuccin.accent = "blue";
boot.loader.systemd-boot.consoleMode = "max"; boot.loader.systemd-boot.consoleMode = "max";
# boot.kernelPackages = pkgs.linuxPackages; boot.kernelPackages = pkgs.linuxPackages;
# let's use the CachyOS kernel instead! # let's use the CachyOS kernel instead!
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-lts; # boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-lts;
# hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
programs = { programs = {
gamescope = { gamescope = {
@ -68,7 +69,6 @@
powerManagement.enable = false; powerManagement.enable = false;
nvidiaSettings = false; nvidiaSettings = false;
open = false; open = false;
package = config.boot.kernelPackages.nvidiaPackages.stable;
}; };
services.sunshine = { services.sunshine = {