about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/nixos-apple-silicon/README.md2
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/modules/kernel/default.nix22
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/modules/kernel/edge.nix45
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/modules/mesa/default.nix16
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/modules/sound/default.nix30
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/packages/asahi-audio/default.nix14
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/packages/bankstown-lv2/default.nix6
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/0001-fs-fcntl-accept-more-values-as-F_DUPFD_CLOEXEC-args.patch40
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/config10
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/default-pagesize-16k.patch13
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/default.nix30
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/sven-iommu-4k.patch449
-rw-r--r--modules/nixos-apple-silicon/apple-silicon-support/packages/mesa-asahi-edge/default.nix6
-rw-r--r--modules/nixos-apple-silicon/docs/release-notes.md19
-rw-r--r--modules/nixos-apple-silicon/docs/uefi-standalone.md26
-rw-r--r--modules/nixos-apple-silicon/flake.lock8
-rw-r--r--modules/nixos-apple-silicon/flake.nix2
-rw-r--r--modules/nixos-apple-silicon/iso-configuration/installer-configuration.nix2
18 files changed, 131 insertions, 609 deletions
diff --git a/modules/nixos-apple-silicon/README.md b/modules/nixos-apple-silicon/README.md
index 171d24cc7f68..1ef3dd39caea 100644
--- a/modules/nixos-apple-silicon/README.md
+++ b/modules/nixos-apple-silicon/README.md
@@ -9,7 +9,7 @@ Please see the documentation and guide below to get started.
 ## Documentation
 
 * [Release Notes](docs/release-notes.md)
-* [Setup, Installation, and Maintenance Guide (2024-01-17)](docs/uefi-standalone.md)
+* [Setup, Installation, and Maintenance Guide (2024-02-26)](docs/uefi-standalone.md)
 
 ## Credits
 
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/modules/kernel/default.nix b/modules/nixos-apple-silicon/apple-silicon-support/modules/kernel/default.nix
index 8e615479c20b..a7b0ea574713 100644
--- a/modules/nixos-apple-silicon/apple-silicon-support/modules/kernel/default.nix
+++ b/modules/nixos-apple-silicon/apple-silicon-support/modules/kernel/default.nix
@@ -8,7 +8,6 @@
     in
       pkgs'.linux-asahi.override {
         _kernelPatches = config.boot.kernelPatches;
-        _4KBuild = config.hardware.asahi.use4KPages;
         withRust = config.hardware.asahi.withRust;
       };
 
@@ -82,21 +81,22 @@
       efiInstallAsRemovable = true;
       device = "nodev";
     };
+
+    # autosuspend was enabled as safe for the PCI SD card reader
+    # "Genesys Logic, Inc GL9755 SD Host Controller [17a0:9755] (rev 01)"
+    # by recent systemd versions, but this has a "negative interaction"
+    # with our kernel/SoC and causes random boot hangs. disable it!
+    services.udev.extraHwdb = ''
+      pci:v000017A0d00009755*
+        ID_AUTOSUSPEND=0
+    '';
   };
 
   imports = [
-    ./edge.nix
+    (lib.mkRemovedOptionModule [ "hardware" "asahi" "addEdgeKernelConfig" ]
+      "All edge kernel config options are now the default.")
   ];
 
-  options.hardware.asahi.use4KPages = lib.mkOption {
-    type = lib.types.bool;
-    default = false;
-    description = ''
-      Build the Asahi Linux kernel with 4K pages to improve compatibility in
-      some cases at the cost of performance in others.
-    '';
-  };
-
   options.hardware.asahi.withRust = lib.mkOption {
     type = lib.types.bool;
     default = false;
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/modules/kernel/edge.nix b/modules/nixos-apple-silicon/apple-silicon-support/modules/kernel/edge.nix
deleted file mode 100644
index 83abda6335fe..000000000000
--- a/modules/nixos-apple-silicon/apple-silicon-support/modules/kernel/edge.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-# the Asahi Linux edge config and options that must go along with it
-
-{ config, pkgs, lib, ... }:
-{
-  config = lib.mkIf config.hardware.asahi.addEdgeKernelConfig {
-    boot.kernelPatches = [
-      {
-        name = "edge-config";
-        patch = null;
-        # derived from
-        # https://github.com/AsahiLinux/PKGBUILDs/blob/main/linux-asahi/config.edge
-        extraConfig = ''
-          DRM_APPLE m
-          DRM_VGEM n
-          DRM_SCHED y
-          DRM_GEM_SHMEM_HELPER y
-          DRM_ASAHI m
-          SUSPEND y
-        '';
-      }
-    ];
-
-    # required for proper DRM setup even without GPU driver
-    services.xserver.config = ''
-      Section "OutputClass"
-          Identifier "appledrm"
-          MatchDriver "apple"
-          Driver "modesetting"
-          Option "PrimaryGPU" "true"
-      EndSection
-    '';
-
-    # required for edge drivers
-    hardware.asahi.withRust = true;
-  };
-
-  options.hardware.asahi.addEdgeKernelConfig = lib.mkOption {
-    type = lib.types.bool;
-    default = false;
-    description = ''
-      Build the Asahi Linux kernel with additional experimental "edge"
-      configuration options.
-    '';
-  };
-}
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/modules/mesa/default.nix b/modules/nixos-apple-silicon/apple-silicon-support/modules/mesa/default.nix
index 5c53ba33b694..34966d05d7ad 100644
--- a/modules/nixos-apple-silicon/apple-silicon-support/modules/mesa/default.nix
+++ b/modules/nixos-apple-silicon/apple-silicon-support/modules/mesa/default.nix
@@ -4,13 +4,23 @@
     isMode = mode: (config.hardware.asahi.useExperimentalGPUDriver
         && config.hardware.asahi.experimentalGPUInstallMode == mode);
   in lib.mkMerge [
+    {
+      # required for proper DRM setup even without GPU driver
+      services.xserver.config = ''
+        Section "OutputClass"
+            Identifier "appledrm"
+            MatchDriver "apple"
+            Driver "modesetting"
+            Option "PrimaryGPU" "true"
+        EndSection
+      '';
+    }
     (lib.mkIf config.hardware.asahi.useExperimentalGPUDriver {
-
       # install the drivers
       hardware.opengl.package = config.hardware.asahi.pkgs.mesa-asahi-edge.drivers;
 
-      # required for GPU kernel driver
-      hardware.asahi.addEdgeKernelConfig = true;
+      # required for in-kernel GPU driver
+      hardware.asahi.withRust = true;
     })
     (lib.mkIf (isMode "replace") {
       # replace the Mesa linked into system packages with the Asahi version
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/modules/sound/default.nix b/modules/nixos-apple-silicon/apple-silicon-support/modules/sound/default.nix
index e1b45a8dcbcf..98b111237d61 100644
--- a/modules/nixos-apple-silicon/apple-silicon-support/modules/sound/default.nix
+++ b/modules/nixos-apple-silicon/apple-silicon-support/modules/sound/default.nix
@@ -36,34 +36,30 @@
     # enable pipewire to run real-time and avoid audible glitches
     security.rtkit.enable = true;
     # set up pipewire with the supported capabilities (instead of pulseaudio)
+    # and asahi-audio configs and plugins
     services.pipewire = {
       enable = true;
+      configPackages = [ asahi-audio ];
+      extraLv2Packages = [ lsp-plugins pkgs.bankstown-lv2 ];
 
       alsa.enable = true;
-      wireplumber.enable = true;
       pulse.enable = true;
+      wireplumber = {
+        enable = true;
+        configPackages = [ asahi-audio ];
+        extraLv2Packages = [ lsp-plugins pkgs.bankstown-lv2 ];
+      };
     };
 
+    # set up enivronment so that UCM configs are used as well
+    environment.variables.ALSA_CONFIG_UCM2 = "${pkgs.alsa-ucm-conf-asahi}/share/alsa/ucm2";
+    systemd.user.services.pipewire.environment.ALSA_CONFIG_UCM2 = config.environment.variables.ALSA_CONFIG_UCM2;
+    systemd.user.services.wireplumber.environment.ALSA_CONFIG_UCM2 = config.environment.variables.ALSA_CONFIG_UCM2;
+
     # enable speakersafetyd to protect speakers
     systemd.packages = lib.mkAssert lsp-plugins-is-safe
       "lsp-plugins is unpatched/outdated and speakers cannot be safely enabled"
       [ pkgs.speakersafetyd ];
     services.udev.packages = [ pkgs.speakersafetyd ];
-
-    # set up enivronment so that asahi-audio and UCM configs are used
-    environment.etc = builtins.listToAttrs (builtins.map
-      (f: { name = f; value = { source = "${asahi-audio}/share/${f}"; }; })
-      asahi-audio.providedConfigFiles);
-    environment.variables.ALSA_CONFIG_UCM2 = "${pkgs.alsa-ucm-conf-asahi}/share/alsa/ucm2";
-
-    # set up pipewire and wireplumber to use asahi-audio configs and plugins
-    systemd.user.services.pipewire.environment.ALSA_CONFIG_UCM2 = config.environment.variables.ALSA_CONFIG_UCM2;
-    systemd.user.services.wireplumber.environment.ALSA_CONFIG_UCM2 = config.environment.variables.ALSA_CONFIG_UCM2;
-    systemd.user.services.pipewire.environment.LV2_PATH = let
-      lv2Plugins = [ lsp-plugins pkgs.bankstown-lv2 ];
-    in lib.makeSearchPath "lib/lv2" lv2Plugins;
-    systemd.user.services.wireplumber.environment.LV2_PATH = let
-      lv2Plugins = [ lsp-plugins pkgs.bankstown-lv2 ];
-    in lib.makeSearchPath "lib/lv2" lv2Plugins;
   };
 }
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/packages/asahi-audio/default.nix b/modules/nixos-apple-silicon/apple-silicon-support/packages/asahi-audio/default.nix
index 4ccbcc5d066c..d54c26cb299f 100644
--- a/modules/nixos-apple-silicon/apple-silicon-support/packages/asahi-audio/default.nix
+++ b/modules/nixos-apple-silicon/apple-silicon-support/packages/asahi-audio/default.nix
@@ -6,7 +6,6 @@
 stdenv.mkDerivation rec {
   pname = "asahi-audio";
   # tracking: https://src.fedoraproject.org/rpms/asahi-audio
-  # note: ensure that the providedConfigFiles list below is current!
   version = "1.6";
 
   src = fetchFromGitHub {
@@ -35,17 +34,4 @@ stdenv.mkDerivation rec {
     # no need to link the asahi-audio dir globally
     mv $out/share/asahi-audio $out
   '';
-
-  # list of config files installed in $out/share/ and destined for
-  # /etc/, from the `install -pm0644 conf/` lines in the Makefile. note
-  # that the contents of asahi-audio/ stay in $out/ and the config files
-  # are modified to point to them.
-  passthru.providedConfigFiles = [
-    "wireplumber/wireplumber.conf.d/99-asahi.conf"
-    "wireplumber/policy.lua.d/85-asahi-policy.lua"
-    "wireplumber/main.lua.d/85-asahi.lua"
-    "wireplumber/scripts/policy-asahi.lua"
-    "pipewire/pipewire.conf.d/99-asahi.conf"
-    "pipewire/pipewire-pulse.conf.d/99-asahi.conf"
-  ];
 }
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/packages/bankstown-lv2/default.nix b/modules/nixos-apple-silicon/apple-silicon-support/packages/bankstown-lv2/default.nix
index 275019bf1acb..58c7bf91d078 100644
--- a/modules/nixos-apple-silicon/apple-silicon-support/packages/bankstown-lv2/default.nix
+++ b/modules/nixos-apple-silicon/apple-silicon-support/packages/bankstown-lv2/default.nix
@@ -9,16 +9,16 @@
 rustPlatform.buildRustPackage rec {
   pname = "bankstown-lv2";
   # tracking: https://src.fedoraproject.org/rpms/rust-bankstown-lv2
-  version = "1.0.3";
+  version = "1.1.0";
 
   src = fetchFromGitHub {
     owner = "chadmed";
     repo = "bankstown";
     rev = version;
-    hash = "sha256-dPgQuwwY1FEsH65vYClTtV/c+0cB5uq8QYszeHPdIQA=";
+    hash = "sha256-IThXEY+mvT2MCw0PSWU/182xbUafd6dtm6hNjieLlKg=";
   };
 
-  cargoSha256 = "sha256-HIW4mJ1VQSzOIksmJ2d4FQjTfU2Zk6xva1mYUk6MQCI=";
+  cargoSha256 = "sha256-yRzM4tcYc6mweTpLnnlCeKgP00L2wRgHamtUzK9Kstc=";
 
   installPhase = ''
     export LIBDIR=$out/lib
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/0001-fs-fcntl-accept-more-values-as-F_DUPFD_CLOEXEC-args.patch b/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/0001-fs-fcntl-accept-more-values-as-F_DUPFD_CLOEXEC-args.patch
new file mode 100644
index 000000000000..647fdb6c5340
--- /dev/null
+++ b/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/0001-fs-fcntl-accept-more-values-as-F_DUPFD_CLOEXEC-args.patch
@@ -0,0 +1,40 @@
+From 0fcdbacd8b06c24f5761a0cf9cb0c43cad05c19b Mon Sep 17 00:00:00 2001
+From: Thomas Watson <twatson52@icloud.com>
+Date: Mon, 26 Feb 2024 19:51:12 -0600
+Subject: [PATCH] fs/fcntl: accept more values as F_DUPFD_CLOEXEC args
+
+libwebrtc doesn't pass anything as the arg to this function so the
+minimum fd ends up as random garbage. If it's bigger than the maximum
+fd, which is likely, then the duplication fails, and libwebrtc breaks.
+
+The previous patch (081abc5fa701738699705a6c0a41c824df77cb37) rejects
+args >= 1024 (the default soft max fd) and instead subtitutes a minimum
+fd of 0 to allow such requests to succeed.
+
+However, gnulib's test suite can pass the following values and expects
+them to fail; this patch prevents those from succeeding:
+* -1 (hard-coded)
+* 1024 (`ulimit -n` value by default)
+* 1048576 (`ulimit -n` value in Nix build sandbox)
+
+Hopefully the garbage values libwebrtc passes do not match very often.
+---
+ fs/fcntl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/fcntl.c b/fs/fcntl.c
+index f18f87419445..65a6861476ec 100644
+--- a/fs/fcntl.c
++++ b/fs/fcntl.c
+@@ -326,7 +326,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
+ 		err = f_dupfd(argi, filp, 0);
+ 		break;
+ 	case F_DUPFD_CLOEXEC:
+-		if (arg >= 1024)
++		if ((arg > 1024) && (argi != 1048576) && (argi != -1))
+ 			argi = 0; /* Lol libwebrtc */
+ 		err = f_dupfd(argi, filp, O_CLOEXEC);
+ 		break;
+-- 
+2.43.0
+
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/config b/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/config
index 6fd5630b89cb..18639f02111b 100644
--- a/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/config
+++ b/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/config
@@ -3119,7 +3119,7 @@ CONFIG_TABLET_USB_HANWANG=m
 CONFIG_TABLET_USB_KBTAB=m
 CONFIG_TABLET_USB_PEGASUS=m
 # CONFIG_TABLET_SERIAL_WACOM4 is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_TOUCHSCREEN=y
 CONFIG_INPUT_MISC=y
 # CONFIG_INPUT_AD714X is not set
 # CONFIG_INPUT_ATMEL_CAPTOUCH is not set
@@ -4881,7 +4881,7 @@ CONFIG_DRM_TTM_HELPER=y
 # CONFIG_DRM_RADEON is not set
 # CONFIG_DRM_AMDGPU is not set
 # CONFIG_DRM_NOUVEAU is not set
-CONFIG_DRM_VGEM=y
+CONFIG_DRM_VGEM=m
 # CONFIG_DRM_VKMS is not set
 # CONFIG_DRM_VMWGFX is not set
 # CONFIG_DRM_UDL is not set
@@ -7783,11 +7783,17 @@ CONFIG_TCG_TPM=y
 CONFIG_TCG_TIS=m
 CONFIG_TCG_CRB=m
 
+# for better efficiency with sound
+CONFIG_UCLAMP_TASK=y
+CONFIG_UCLAMP_TASK_GROUP=y
+CONFIG_UCLAMP_BUCKETS_COUNT=5
+
 # Fedora Asahi Remix-specific options
 # generated with something like
 # git diff --name-only fedora-6.6 fedora-asahi-6.6 redhat/configs/ | xargs cat >> config
 # in a checkout of https://gitlab.com/fedora-asahi/kernel-asahi/-/tree/fedora-asahi-6.6
 
+CONFIG_SUSPEND=y
 # CONFIG_APPLE_PLATFORMS is not set
 # CONFIG_DRM_SIMPLEDRM_BACKLIGHT is not set
 CONFIG_RUST=y
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/default-pagesize-16k.patch b/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/default-pagesize-16k.patch
deleted file mode 100644
index c6fb651fb686..000000000000
--- a/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/default-pagesize-16k.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
-index a1eb6572ecd2..b94fbd9b3d70 100644
---- a/arch/arm64/Kconfig
-+++ b/arch/arm64/Kconfig
-@@ -1036,7 +1036,7 @@ endmenu
- 
- choice
- 	prompt "Page size"
--	default ARM64_4K_PAGES
-+	default ARM64_16K_PAGES
- 	help
- 	  Page size (translation granule) configuration.
- 
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/default.nix b/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/default.nix
index debccc6bcce4..36e7c0758a85 100644
--- a/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/default.nix
+++ b/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/default.nix
@@ -5,7 +5,6 @@
 , writeText
 , removeReferencesTo
 , linuxPackagesFor
-, _4KBuild ? false
 , withRust ? false
 , _kernelPatches ? [ ]
 }:
@@ -72,7 +71,7 @@ let
           ${lib.strings.concatStringsSep "\n" extraConfigText}
         '';
       # final config as an attrset
-      config = let
+      configAttrs = let
         makePair = t: lib.nameValuePair (i t 0) (i t 1);
         configList = (parseConfig origConfigText) ++ extraConfig;
       in builtins.listToAttrs (map makePair (lib.lists.reverseList configList));
@@ -96,11 +95,14 @@ let
         # tracking: https://github.com/AsahiLinux/linux/tree/asahi-wip (w/ fedora verification)
         owner = "AsahiLinux";
         repo = "linux";
-        rev = "asahi-6.6-14";
-        hash = "sha256-+ydX2XXIbcVfq27WC68EPP8n3bf+WD5fDG7FBq3QJi4=";
+        rev = "asahi-6.6-15";
+        hash = "sha256-Jm7wTKWuwd/6ZN0g5F4CNNETiOyGQL31hfSyTDYH85k=";
       };
 
       kernelPatches = [
+        { name = "coreutils-fix";
+          patch = ./0001-fs-fcntl-accept-more-values-as-F_DUPFD_CLOEXEC-args.patch;
+        }
         # speaker enablement; we assert on the relevant lsp-plugins patch
         # before installing speakersafetyd to let the speakers work
         { name = "speakers-1";
@@ -119,24 +121,12 @@ let
         { name = "rustc-1.75.0";
           patch = ./0001-check-in-new-alloc-for-1.75.0.patch;
         }
-      ] ++ lib.optionals _4KBuild [
-        # thanks to Sven Peter
-        # https://lore.kernel.org/linux-iommu/20211019163737.46269-1-sven@svenpeter.dev/
-        { name = "sven-iommu-4k";
-          patch = ./sven-iommu-4k.patch;
-        }
-        (builtins.throw "The Asahi 4K kernel patch is currently broken. Contributions to fix are welcome.")
-      ] ++ lib.optionals (!_4KBuild) [
-        # patch the kernel to set the default size to 16k instead of modifying
-        # the config so we don't need to convert our config to the nixos
-        # infrastructure or patch it and thus introduce a dependency on the host
-        # system architecture
-        { name = "default-pagesize-16k";
-          patch = ./default-pagesize-16k.patch;
-        }
       ] ++ _kernelPatches;
 
-      inherit configfile config;
+      inherit configfile;
+      # hide Rust support from the nixpkgs infra to avoid it re-adding the rust packages.
+      # we can't use it until it's in stable and until we've evaluated the cross-compilation impact.
+      config = configAttrs // { "CONFIG_RUST" = "n"; };
     } // (args.argsOverride or {})).overrideAttrs (old: if withRust then {
       nativeBuildInputs = (old.nativeBuildInputs or []) ++ [
         rust-bindgen
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/sven-iommu-4k.patch b/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/sven-iommu-4k.patch
deleted file mode 100644
index 25eb54140025..000000000000
--- a/modules/nixos-apple-silicon/apple-silicon-support/packages/linux-asahi/sven-iommu-4k.patch
+++ /dev/null
@@ -1,449 +0,0 @@
-diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
-index 4f1a37bdd42d..c8c3ea81d818 100644
---- a/drivers/iommu/apple-dart.c
-+++ b/drivers/iommu/apple-dart.c
-@@ -97,7 +97,6 @@ struct apple_dart_hw {
-  * @lock: lock for hardware operations involving this dart
-  * @pgsize: pagesize supported by this DART
-  * @supports_bypass: indicates if this DART supports bypass mode
-- * @force_bypass: force bypass mode due to pagesize mismatch?
-  * @sid2group: maps stream ids to iommu_groups
-  * @iommu: iommu core device
-  */
-@@ -115,7 +114,6 @@ struct apple_dart {
-
- 	u32 pgsize;
- 	u32 supports_bypass : 1;
--	u32 force_bypass : 1;
-
- 	struct iommu_group *sid2group[DART_MAX_STREAMS];
- 	struct iommu_device iommu;
-@@ -499,9 +497,6 @@ static int apple_dart_attach_dev(struct iommu_domain *domain,
- 	struct apple_dart_master_cfg *cfg = dev_iommu_priv_get(dev);
- 	struct apple_dart_domain *dart_domain = to_dart_domain(domain);
-
--	if (cfg->stream_maps[0].dart->force_bypass &&
--	    domain->type != IOMMU_DOMAIN_IDENTITY)
--		return -EINVAL;
- 	if (!cfg->stream_maps[0].dart->supports_bypass &&
- 	    domain->type == IOMMU_DOMAIN_IDENTITY)
- 		return -EINVAL;
-@@ -630,8 +625,6 @@ static int apple_dart_of_xlate(struct device *dev, struct of_phandle_args *args)
- 	if (cfg_dart) {
- 		if (cfg_dart->supports_bypass != dart->supports_bypass)
- 			return -EINVAL;
--		if (cfg_dart->force_bypass != dart->force_bypass)
--			return -EINVAL;
- 		if (cfg_dart->pgsize != dart->pgsize)
- 			return -EINVAL;
- 	}
-@@ -736,8 +729,6 @@ static int apple_dart_def_domain_type(struct device *dev)
- {
- 	struct apple_dart_master_cfg *cfg = dev_iommu_priv_get(dev);
-
--	if (cfg->stream_maps[0].dart->force_bypass)
--		return IOMMU_DOMAIN_IDENTITY;
- 	if (!cfg->stream_maps[0].dart->supports_bypass)
- 		return IOMMU_DOMAIN_DMA;
-
-@@ -1121,8 +1121,6 @@ static int apple_dart_probe(struct platform_device *pdev)
- 		goto err_clk_disable;
- 	}
-
--	dart->force_bypass = dart->pgsize > PAGE_SIZE;
--
- 	ret = apple_dart_hw_reset(dart);
- 	if (ret)
- 		goto err_clk_disable;
-@@ -1149,8 +1147,8 @@ static int apple_dart_probe(struct platform_device *pdev)
-
- 	dev_info(
- 		&pdev->dev,
--		"DART [pagesize %x, %d streams, bypass support: %d, bypass forced: %d] initialized\n",
--		dart->pgsize, dart->num_streams, dart->supports_bypass, dart->force_bypass);
-+		"DART [pagesize %x, %d streams, bypass support: %d] initialized\n",
-+		dart->pgsize, dart->num_streams, dart->supports_bypass);
- 	return 0;
-
- err_sysfs_remove:
-
-diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
-index 09f6e1c0f9c0..094592751cfa 100644
---- a/drivers/iommu/dma-iommu.c
-+++ b/drivers/iommu/dma-iommu.c
-@@ -20,9 +20,11 @@
- #include <linux/iommu.h>
- #include <linux/iova.h>
- #include <linux/irq.h>
-+#include <linux/kernel.h>
- #include <linux/list_sort.h>
- #include <linux/mm.h>
- #include <linux/mutex.h>
-+#include <linux/pfn.h>
- #include <linux/pci.h>
- #include <linux/scatterlist.h>
- #include <linux/spinlock.h>
-@@ -710,6 +712,9 @@ static struct page **__iommu_dma_alloc_pages(struct device *dev,
- {
- 	struct page **pages;
- 	unsigned int i = 0, nid = dev_to_node(dev);
-+	unsigned int j;
-+	unsigned long min_order = __fls(order_mask);
-+	unsigned int min_order_size = 1U << min_order;
-
- 	order_mask &= (2U << MAX_ORDER) - 1;
- 	if (!order_mask)
-@@ -749,15 +754,37 @@ static struct page **__iommu_dma_alloc_pages(struct device *dev,
- 				split_page(page, order);
- 			break;
- 		}
--		if (!page) {
--			__iommu_dma_free_pages(pages, i);
--			return NULL;
-+
-+		/*
-+		 * If we have no valid page here we might be trying to allocate
-+		 * the last block consisting of 1<<order pages (to guarantee
-+		 * alignment) but actually need less pages than that.
-+		 * In that case we just try to allocate the entire block and
-+		 * directly free the spillover pages again.
-+		 */
-+		if (!page && !order_mask && count < min_order_size) {
-+			page = alloc_pages_node(nid, gfp, min_order);
-+			if (!page)
-+				goto free_pages;
-+			split_page(page, min_order);
-+
-+			for (j = count; j < min_order_size; ++j)
-+				__free_page(page + j);
-+
-+			order_size = count;
- 		}
-+
-+		if (!page)
-+			goto free_pages;
- 		count -= order_size;
- 		while (order_size--)
- 			pages[i++] = page++;
- 	}
- 	return pages;
-+
-+free_pages:
-+	__iommu_dma_free_pages(pages, i);
-+	return NULL;
- }
-
- /*
-@@ -785,16 +787,28 @@ static struct page **__iommu_dma_alloc_noncontiguous(struct device *dev,
- 	bool coherent = dev_is_dma_coherent(dev);
- 	int ioprot = dma_info_to_prot(DMA_BIDIRECTIONAL, coherent, attrs);
- 	unsigned int count, min_size, alloc_sizes = domain->pgsize_bitmap;
-+	struct sg_append_table sgt_append = {};
-+	struct scatterlist *last_sg;
- 	struct page **pages;
- 	dma_addr_t iova;
- 	ssize_t ret;
-+	phys_addr_t orig_s_phys;
-+	size_t orig_s_len, orig_s_off, s_iova_off, iova_size;
-
- 	if (static_branch_unlikely(&iommu_deferred_attach_enabled) &&
- 	    iommu_deferred_attach(dev, domain))
- 		return NULL;
-
- 	min_size = alloc_sizes & -alloc_sizes;
--	if (min_size < PAGE_SIZE) {
-+	if (iovad->granule > PAGE_SIZE) {
-+		if (size < iovad->granule) {
-+			/* ensure a single contiguous allocation */
-+			min_size = ALIGN(size, PAGE_SIZE*(1U<<get_order(size)));
-+			alloc_sizes = min_size;
-+		}
-+
-+		size = PAGE_ALIGN(size);
-+	} else if (min_size < PAGE_SIZE) {
- 		min_size = PAGE_SIZE;
- 		alloc_sizes |= PAGE_SIZE;
- 	} else {
-@@ -797,13 +836,17 @@ static struct page **__iommu_dma_alloc_noncontiguous(struct device *dev,
- 	if (!pages)
- 		return NULL;
-
--	size = iova_align(iovad, size);
--	iova = iommu_dma_alloc_iova(domain, size, dev->coherent_dma_mask, dev);
-+	iova_size = iova_align(iovad, size);
-+	iova = iommu_dma_alloc_iova(domain, iova_size, dev->coherent_dma_mask, dev);
- 	if (!iova)
- 		goto out_free_pages;
-
--	if (sg_alloc_table_from_pages(sgt, pages, count, 0, size, GFP_KERNEL))
-+	/* append_table is only used to get a pointer to the last entry */
-+	if (sg_alloc_append_table_from_pages(&sgt_append, pages, count, 0,
-+					iova_size, UINT_MAX, 0, GFP_KERNEL))
- 		goto out_free_iova;
-+	memcpy(sgt, &sgt_append.sgt, sizeof(*sgt));
-+	last_sg = sgt_append.prv;
-
- 	if (!(ioprot & IOMMU_CACHE)) {
- 		struct scatterlist *sg;
-@@ -825,18 +839,59 @@ static struct page **__iommu_dma_alloc_noncontiguous(struct device *dev,
- 			arch_dma_prep_coherent(sg_page(sg), sg->length);
- 	}
-
-+	if (iovad->granule > PAGE_SIZE) {
-+		if (size < iovad->granule) {
-+			/*
-+			 * we only have a single sg list entry here that is
-+			 * likely not aligned to iovad->granule. adjust the
-+			 * entry to represent the encapsulating IOMMU page
-+			 * and then later restore everything to its original
-+			 * values, similar to the impedance matching done in
-+			 * iommu_dma_map_sg.
-+			 */
-+			orig_s_phys = sg_phys(sgt->sgl);
-+			orig_s_len = sgt->sgl->length;
-+			orig_s_off = sgt->sgl->offset;
-+			s_iova_off = iova_offset(iovad, orig_s_phys);
-+
-+			sg_set_page(sgt->sgl,
-+				pfn_to_page(PHYS_PFN(orig_s_phys - s_iova_off)),
-+				iova_align(iovad, orig_s_len + s_iova_off),
-+				sgt->sgl->offset & ~s_iova_off);
-+		} else {
-+			/*
-+			 * convince iommu_map_sg_atomic to map the last block
-+			 * even though it may be too small.
-+			 */
-+			orig_s_len = last_sg->length;
-+			last_sg->length = iova_align(iovad, last_sg->length);
-+		}
-+	}
-+
- 	ret = iommu_map_sg_atomic(domain, iova, sgt->sgl, sgt->orig_nents, ioprot);
--	if (ret < 0 || ret < size)
-+	if (ret < 0 || ret < iova_size)
- 		goto out_free_sg;
-
-+	if (iovad->granule > PAGE_SIZE) {
-+		if (size < iovad->granule) {
-+			sg_set_page(sgt->sgl,
-+				pfn_to_page(PHYS_PFN(orig_s_phys)),
-+				orig_s_len, orig_s_off);
-+
-+			iova += s_iova_off;
-+		} else {
-+			last_sg->length = orig_s_len;
-+		}
-+	}
-+
- 	sgt->sgl->dma_address = iova;
--	sgt->sgl->dma_length = size;
-+	sgt->sgl->dma_length = iova_size;
- 	return pages;
-
- out_free_sg:
- 	sg_free_table(sgt);
- out_free_iova:
--	iommu_dma_free_iova(cookie, iova, size, NULL);
-+	iommu_dma_free_iova(cookie, iova, iova_size, NULL);
- out_free_pages:
- 	__iommu_dma_free_pages(pages, count);
- 	return NULL;
-@@ -1040,8 +1124,9 @@ static int __finalise_sg(struct device *dev, struct scatterlist *sg, int nents,
- 		unsigned int s_length = sg_dma_len(s);
- 		unsigned int s_iova_len = s->length;
-
--		s->offset += s_iova_off;
--		s->length = s_length;
-+		sg_set_page(s,
-+			    pfn_to_page(PHYS_PFN(sg_phys(s) + s_iova_off)),
-+			    s_length, s_iova_off & ~PAGE_MASK);
- 		sg_dma_address(s) = DMA_MAPPING_ERROR;
- 		sg_dma_len(s) = 0;
-
-@@ -1082,13 +1167,17 @@ static int __finalise_sg(struct device *dev, struct scatterlist *sg, int nents,
- static void __invalidate_sg(struct scatterlist *sg, int nents)
- {
- 	struct scatterlist *s;
-+	phys_addr_t orig_paddr;
- 	int i;
-
- 	for_each_sg(sg, s, nents, i) {
--		if (sg_dma_address(s) != DMA_MAPPING_ERROR)
--			s->offset += sg_dma_address(s);
--		if (sg_dma_len(s))
--			s->length = sg_dma_len(s);
-+		if (sg_dma_len(s)) {
-+			orig_paddr = sg_phys(s) + sg_dma_address(s);
-+			sg_set_page(s,
-+				    pfn_to_page(PHYS_PFN(orig_paddr)),
-+				    sg_dma_len(s),
-+				    sg_dma_address(s) & ~PAGE_MASK);
-+		}
- 		sg_dma_address(s) = DMA_MAPPING_ERROR;
- 		sg_dma_len(s) = 0;
- 	}
-@@ -1166,15 +1255,16 @@ static int iommu_dma_map_sg(struct device *dev, struct scatterlist *sg,
- 	 * stashing the unaligned parts in the as-yet-unused DMA fields.
- 	 */
- 	for_each_sg(sg, s, nents, i) {
--		size_t s_iova_off = iova_offset(iovad, s->offset);
-+		phys_addr_t s_phys = sg_phys(s);
-+		size_t s_iova_off = iova_offset(iovad, s_phys);
- 		size_t s_length = s->length;
- 		size_t pad_len = (mask - iova_len + 1) & mask;
-
- 		sg_dma_address(s) = s_iova_off;
- 		sg_dma_len(s) = s_length;
--		s->offset -= s_iova_off;
- 		s_length = iova_align(iovad, s_length + s_iova_off);
--		s->length = s_length;
-+		sg_set_page(s, pfn_to_page(PHYS_PFN(s_phys - s_iova_off)),
-+			    s_length, s->offset & ~s_iova_off);
-
- 		/*
- 		 * Due to the alignment of our single IOVA allocation, we can
-@@ -1412,9 +1502,15 @@ static int iommu_dma_get_sgtable(struct device *dev, struct sg_table *sgt,
- 		void *cpu_addr, dma_addr_t dma_addr, size_t size,
- 		unsigned long attrs)
- {
-+	struct iommu_domain *domain = iommu_get_dma_domain(dev);
-+	struct iommu_dma_cookie *cookie = domain->iova_cookie;
-+	struct iova_domain *iovad = &cookie->iovad;
- 	struct page *page;
- 	int ret;
-
-+	if (iovad->granule > PAGE_SIZE)
-+		return -ENXIO;
-+
- 	if (is_vmalloc_addr(cpu_addr)) {
- 		struct page **pages = dma_common_find_pages(cpu_addr);
-
-diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
-index f2c45b85b9fc..0c370e486d6e 100644
---- a/drivers/iommu/iommu.c
-+++ b/drivers/iommu/iommu.c
-@@ -80,6 +80,8 @@ static struct iommu_domain *__iommu_domain_alloc(struct bus_type *bus,
- 						 unsigned type);
- static int __iommu_attach_device(struct iommu_domain *domain,
- 				 struct device *dev);
-+static void __iommu_detach_device(struct iommu_domain *domain,
-+				  struct device *dev);
- static int __iommu_attach_group(struct iommu_domain *domain,
- 				struct iommu_group *group);
- static void __iommu_detach_group(struct iommu_domain *domain,
-@@ -1976,6 +1978,24 @@ void iommu_domain_free(struct iommu_domain *domain)
- }
- EXPORT_SYMBOL_GPL(iommu_domain_free);
-
-+static int iommu_check_page_size(struct iommu_domain *domain,
-+				struct device *dev)
-+{
-+	bool trusted = !(dev_is_pci(dev) && to_pci_dev(dev)->untrusted);
-+
-+	if (!iommu_is_paging_domain(domain))
-+		return 0;
-+	if (iommu_is_large_pages_domain(domain) && trusted)
-+		return 0;
-+
-+	if (!(domain->pgsize_bitmap & (PAGE_SIZE | (PAGE_SIZE - 1)))) {
-+		pr_warn("IOMMU pages cannot exactly represent CPU pages.\n");
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+}
-+
- static int __iommu_attach_device(struct iommu_domain *domain,
- 				 struct device *dev)
- {
-@@ -1985,9 +2005,23 @@ static int __iommu_attach_device(struct iommu_domain *domain,
- 		return -ENODEV;
-
- 	ret = domain->ops->attach_dev(domain, dev);
--	if (!ret)
--		trace_attach_device_to_domain(dev);
--	return ret;
-+	if (ret)
-+		return ret;
-+
-+	/*
-+	 * Check that CPU pages can be represented by the IOVA granularity.
-+	 * This has to be done after ops->attach_dev since many IOMMU drivers
-+	 * only limit domain->pgsize_bitmap after having attached the first
-+	 * device.
-+	 */
-+	ret = iommu_check_page_size(domain, dev);
-+	if (ret) {
-+		__iommu_detach_device(domain, dev);
-+		return ret;
-+	}
-+
-+	trace_attach_device_to_domain(dev);
-+	return 0;
- }
-
- int iommu_attach_device(struct iommu_domain *domain, struct device *dev)
-diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
-index db77aa675145..180ce65a6789 100644
---- a/drivers/iommu/iova.c
-+++ b/drivers/iommu/iova.c
-@@ -49,10 +49,11 @@ init_iova_domain(struct iova_domain *iovad, unsigned long granule,
- {
- 	/*
- 	 * IOVA granularity will normally be equal to the smallest
--	 * supported IOMMU page size; both *must* be capable of
--	 * representing individual CPU pages exactly.
-+	 * supported IOMMU page size; while both usually are capable of
-+	 * representing individual CPU pages exactly the IOVA allocator
-+	 * supports any granularities that are an exact power of two.
- 	 */
--	BUG_ON((granule > PAGE_SIZE) || !is_power_of_2(granule));
-+	BUG_ON(!is_power_of_2(granule));
-
- 	spin_lock_init(&iovad->iova_rbtree_lock);
- 	iovad->rbroot = RB_ROOT;
-diff --git a/include/linux/iommu.h b/include/linux/iommu.h
-index 9208eca4b0d1..dec2dd70a876 100644
---- a/include/linux/iommu.h
-+++ b/include/linux/iommu.h
-@@ -63,6 +63,8 @@ struct iommu_domain_geometry {
- 					      implementation              */
- #define __IOMMU_DOMAIN_PT	(1U << 2)  /* Domain is identity mapped   */
- #define __IOMMU_DOMAIN_DMA_FQ	(1U << 3)  /* DMA-API uses flush queue    */
-+#define __IOMMU_DOMAIN_LP	(1U << 4)  /* Support for PAGE_SIZE smaller
-+					      than IOMMU page size        */
-
- /*
-  * This are the possible domain-types
-@@ -82,10 +84,12 @@ struct iommu_domain_geometry {
- #define IOMMU_DOMAIN_IDENTITY	(__IOMMU_DOMAIN_PT)
- #define IOMMU_DOMAIN_UNMANAGED	(__IOMMU_DOMAIN_PAGING)
- #define IOMMU_DOMAIN_DMA	(__IOMMU_DOMAIN_PAGING |	\
--				 __IOMMU_DOMAIN_DMA_API)
-+				 __IOMMU_DOMAIN_DMA_API |       \
-+				 __IOMMU_DOMAIN_LP)
- #define IOMMU_DOMAIN_DMA_FQ	(__IOMMU_DOMAIN_PAGING |	\
- 				 __IOMMU_DOMAIN_DMA_API |	\
--				 __IOMMU_DOMAIN_DMA_FQ)
-+				 __IOMMU_DOMAIN_DMA_FQ |        \
-+				 __IOMMU_DOMAIN_LP)
-
- struct iommu_domain {
- 	unsigned type;
-@@ -102,6 +106,16 @@ static inline bool iommu_is_dma_domain(struct iommu_domain *domain)
- 	return domain->type & __IOMMU_DOMAIN_DMA_API;
- }
-
-+static inline bool iommu_is_paging_domain(struct iommu_domain *domain)
-+{
-+	return domain->type & __IOMMU_DOMAIN_PAGING;
-+}
-+
-+static inline bool iommu_is_large_pages_domain(struct iommu_domain *domain)
-+{
-+	return domain->type & __IOMMU_DOMAIN_LP;
-+}
-+
- enum iommu_cap {
- 	IOMMU_CAP_CACHE_COHERENCY,	/* IOMMU can enforce cache coherent DMA
- 					   transactions */
diff --git a/modules/nixos-apple-silicon/apple-silicon-support/packages/mesa-asahi-edge/default.nix b/modules/nixos-apple-silicon/apple-silicon-support/packages/mesa-asahi-edge/default.nix
index bb828ba4c771..179d742af7b7 100644
--- a/modules/nixos-apple-silicon/apple-silicon-support/packages/mesa-asahi-edge/default.nix
+++ b/modules/nixos-apple-silicon/apple-silicon-support/packages/mesa-asahi-edge/default.nix
@@ -13,14 +13,14 @@
 }).overrideAttrs (oldAttrs: {
   # version must be the same length (i.e. no unstable or date)
   # so that system.replaceRuntimeDependencies can work
-  version = "24.0.0";
+  version = "24.1.0";
   src = fetchFromGitLab {
     # tracking: https://pagure.io/fedora-asahi/mesa/commits/asahi
     domain = "gitlab.freedesktop.org";
     owner = "asahi";
     repo = "mesa";
-    rev = "asahi-20231213";
-    hash = "sha256-hl0JtwWEXaCkhCMQJ393mzfw/eEx6m9DYNS+spQ3Vhs=";
+    rev = "asahi-20240218";
+    hash = "sha256-IMR6x7xYUOp/IBycL8RKs4lbInEh2Xfu6Kjom4S+D/s=";
   };
 
   mesonFlags =
diff --git a/modules/nixos-apple-silicon/docs/release-notes.md b/modules/nixos-apple-silicon/docs/release-notes.md
index 089017dde28e..251fe6cc9b49 100644
--- a/modules/nixos-apple-silicon/docs/release-notes.md
+++ b/modules/nixos-apple-silicon/docs/release-notes.md
@@ -2,6 +2,25 @@
 
 This file contains important information for each release.
 
+## 2024-02-26
+
+This release updates nixpkgs, the kernel, and Mesa. Thanks to oliverbestmann for
+the updates.
+
+This release also includes a patch to fix random boot hangs with recent versions
+of nixpkgs.
+
+The kernel and Mesa are now upgraded to OpenGL 4.6 compatibility. Restructurings
+and upgrades have been made in the sound support as well (in particular an
+upgrade to the `bankstown-lv2` bass enhancer), and quality should be improved.
+
+The GPU acceleration and sound upgrades require packages and features present
+only in the latest nixpkgs unstable releases. If you are using NixOS 23.11,
+please remain on an older release. This may be addressed in the future;
+contributions are welcome.
+
+Upgrading nixpkgs brings GCC 13.2 as the default system compiler.
+
 ## 2024-01-17
 
 This release updates nixpkgs.
diff --git a/modules/nixos-apple-silicon/docs/uefi-standalone.md b/modules/nixos-apple-silicon/docs/uefi-standalone.md
index e7e160a75aa3..20d926e17c91 100644
--- a/modules/nixos-apple-silicon/docs/uefi-standalone.md
+++ b/modules/nixos-apple-silicon/docs/uefi-standalone.md
@@ -1,11 +1,11 @@
-# UEFI Boot Standalone NixOS (2024-01-17)
+# UEFI Boot Standalone NixOS (2024-02-26)
 
 This guide will build and was tested with the following software:
-* Asahi Linux kernel version 6.6.0-asahi14
-* Asahi Linux's Mesa version 24.0.0_asahi-20231213-1
+* Asahi Linux kernel version 6.6.0-asahi15
+* Asahi Linux's Mesa version 24.1.0_asahi-20240218-1
 * m1n1 version v1.4.11
 * Asahi Linux's U-Boot version 2023.07.02.asahi4-1
-* Nixpkgs, as of 2024-01-15
+* Nixpkgs, as of 2024-02-26
 * macOS stub 12.3
 
 NOTE: The latest version of this guide will always be [at its home](https://github.com/tpwrules/nixos-apple-silicon/blob/main/docs/uefi-standalone.md). For more general information about Linux on Apple Silicon Macs, refer to the [Asahi Linux project](https://asahilinux.org/) and [alpha installer release](https://asahilinux.org/2022/03/asahi-linux-alpha-release/).
@@ -228,12 +228,6 @@ Add the `./apple-silicon-support` directory to the imports list and switch off t
   boot.loader.efi.canTouchEfiVariables = false;
 ```
 
-If you used the cross-compiled installer image, i.e. you downloaded the ISO from GitHub or built it on an `x86_64-linux` machine, you may add the following line to re-use the cross-compiled Asahi packages. If you don't, they will be rebuilt in the installer, which wastes time. When you update the system and they need to be rebuilt on the Mac itself, remove this line or you will get an error that an `x86_64-linux` builder is required.
-```
-  # Remove if you get an error that an x86_64-linux builder is required.
-  hardware.asahi.pkgsSystem = "x86_64-linux";
-```
-
 The configuration above is the minimum required to produce a bootable system, but you can further edit the file as desired to perform additional configuration. Uncomment the relevant options and change their values as explained in the file. Note that some advertised features may not work properly at this time. Refer to the [NixOS installation manual](https://nixos.org/manual/nixos/stable/index.html#ch-configuration) for further guidance.
 
 Various non-free non-redistributable peripheral firmware files are required to use system hardware like Wi-Fi. The Asahi Linux installer grabs these from macOS and stores them on the EFI system partition when it is created. The NixOS installer loads them from there while booting so that all hardware is available during installation. By default, the Apple Silicon support module will automatically reference the files in the EFI system partition and incorporate them into your configuration to be managed by the normal NixOS mechanisms.
@@ -246,18 +240,6 @@ Currently, the only supported way to update the peripheral firmware files is to
   # hardware.asahi.extractPeripheralFirmware = false;
 ```
 
-<details>
-  <summary>If you have apps incompatible with 16K page sizes and you need 4K page size instead...</summary>
-
-**Note:** The 4K patches are currently not updated to latest kernel version. See [this issue](https://github.com/tpwrules/nixos-apple-silicon/issues/43).
-You can choose to build the Asahi kernel with a 4K page size by enabling the appropriate option. This results in a reduction in raw compilation speed of 10-25%, but improves software compatibility in some cases (such as with Chromium/Electron and x86 emulation).
-```
-  # Build the kernel with 4K pages to improve software compatibility at
-  # the cost of performance in some cases.
-  hardware.asahi.use4KPages = true;
-```
-</details>
-
 If you want to install a desktop environment, you will have to uncomment the option to enable X11 and NetworkManager, then add an option to include your favorite desktop environment. You may also wish to include graphical packages such as `firefox` in `environment.systemPackages`. For example, to install Xfce:
 ```
   # Enable the X11 windowing system.
diff --git a/modules/nixos-apple-silicon/flake.lock b/modules/nixos-apple-silicon/flake.lock
index 66c822417ebc..65246b664331 100644
--- a/modules/nixos-apple-silicon/flake.lock
+++ b/modules/nixos-apple-silicon/flake.lock
@@ -17,17 +17,17 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1705316053,
-        "narHash": "sha256-J2Ey5mPFT8gdfL2XC0JTZvKaBw/b2pnyudEXFvl+dQM=",
+        "lastModified": 1708954320,
+        "narHash": "sha256-n3LXNMlz7ORCjfIrIUo19a844Fec2+yg7k6NspdVCxs=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370",
+        "rev": "94cda73bf2fd675de987db7c3ac81e861b892266",
         "type": "github"
       },
       "original": {
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370",
+        "rev": "94cda73bf2fd675de987db7c3ac81e861b892266",
         "type": "github"
       }
     },
diff --git a/modules/nixos-apple-silicon/flake.nix b/modules/nixos-apple-silicon/flake.nix
index f069b4eb7ec1..af65ca715bb4 100644
--- a/modules/nixos-apple-silicon/flake.nix
+++ b/modules/nixos-apple-silicon/flake.nix
@@ -5,7 +5,7 @@
     nixpkgs = {
       # https://hydra.nixos.org/jobset/mobile-nixos/unstable/evals
       # these evals have a cross-compiled stdenv available
-      url = "github:nixos/nixpkgs/c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370";
+      url = "github:nixos/nixpkgs/94cda73bf2fd675de987db7c3ac81e861b892266";
     };
 
     rust-overlay = {
diff --git a/modules/nixos-apple-silicon/iso-configuration/installer-configuration.nix b/modules/nixos-apple-silicon/iso-configuration/installer-configuration.nix
index 0cd3ca711e77..112ce6e3cf89 100644
--- a/modules/nixos-apple-silicon/iso-configuration/installer-configuration.nix
+++ b/modules/nixos-apple-silicon/iso-configuration/installer-configuration.nix
@@ -112,7 +112,7 @@
 
   # avoids the need to cross-compile gobject introspection stuff which works
   # now but is slow and unnecessary
-  security.polkit.enable = false;
+  security.polkit.enable = lib.mkForce false;
 
   # bootspec generation is currently broken under cross-compilation
   boot.bootspec.enable = false;