From d19de293795d24edbbfae56094179cc8dd40ca07 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 6 Nov 2024 00:58:10 -0800 Subject: [PATCH] fix: patch systemd-boot on callisto to avoid catastrophic failure --- hosts/callisto/configuration.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hosts/callisto/configuration.nix b/hosts/callisto/configuration.nix index 1587d5a..9428c2b 100755 --- a/hosts/callisto/configuration.nix +++ b/hosts/callisto/configuration.nix @@ -2,7 +2,6 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { - config, inputs, pkgs, ... @@ -14,6 +13,17 @@ # ./apple-silicon-support ]; + systemd.package = pkgs.systemd.overrideAttrs ( + finalAttrs: prevAttrs: { + patches = (prevAttrs.patches or [ ]) ++ [ + (pkgs.fetchpatch { + url = "https://gist.githubusercontent.com/andre4ik3/41c71a56e6d5657f7e2b4110d6f83430/raw/c7ef5842959a68d352a9018c6630019419b08b9e/0001-Revert-boot-Make-initrd_prepare-semantically-equival.patch"; + hash = "sha256-WvO8wopQVBBV4unCRW406injEY7P8JSnoBRxHACyG08="; + }) + ]; + } + ); + boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = false;