From 4d57e56b713319c52e05b19351c5ae67ca27550e Mon Sep 17 00:00:00 2001 From: volth Date: Fri, 20 Mar 2020 16:55:44 +0000 Subject: [PATCH] $toplevel/system: use kernel's architecture `$toplevel/system` of a system closure with `x86_64` kernel and `i686` userland should contain "x86_64-linux". If `$toplevel/system` contains "i686-linux", the closure will be run using `qemu-system-i386`, which is able to run `x86_64` kernel on most Intel CPU, but fails on AMD. So this fix is for a rare case of `x86_64` kernel + `i686` userland + AMD CPU --- nixos/modules/system/activation/top-level.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 14bd751ce32..49693b6f1be 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -75,7 +75,7 @@ let echo -n "$configurationName" > $out/configuration-name echo -n "systemd ${toString config.systemd.package.interfaceVersion}" > $out/init-interface-version echo -n "$nixosLabel" > $out/nixos-version - echo -n "${pkgs.stdenv.hostPlatform.system}" > $out/system + echo -n "${config.boot.kernelPackages.stdenv.hostPlatform.system}" > $out/system mkdir $out/fine-tune childCount=0