From 6f09e34c212389d83710de90d5b66351c57563e6 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Wed, 24 Sep 2025 14:30:04 +0800 Subject: [PATCH] fix: qemu-user-static on aarch64 - disable pie --- hosts/12kingdoms-shoukei/hardware-configuration.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hosts/12kingdoms-shoukei/hardware-configuration.nix b/hosts/12kingdoms-shoukei/hardware-configuration.nix index ff8ca041..77a214ff 100644 --- a/hosts/12kingdoms-shoukei/hardware-configuration.nix +++ b/hosts/12kingdoms-shoukei/hardware-configuration.nix @@ -41,6 +41,15 @@ in } ); }) + # https://github.com/NixOS/nixpkgs/issues/366902 + (final: prev: { + qemu-user = prev.qemu-user.overrideAttrs ( + old: + lib.optionalAttrs final.stdenv.hostPlatform.isStatic { + configureFlags = old.configureFlags ++ [ "--disable-pie" ]; + } + ); + }) ]; # supported file systems, so we can mount any removable disks with these filesystems