about summary refs log tree commit diff
path: root/nixos/modules/system/activation
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2020-03-20 16:55:44 +0000
committerGitHub <noreply@github.com>2020-03-20 16:55:44 +0000
commit4d57e56b713319c52e05b19351c5ae67ca27550e (patch)
treec812ff703c1fe979bf3bbe2ebe17421142261097 /nixos/modules/system/activation
parentd1303f10e9e1cfcabbca66e10a56696ae7c975e0 (diff)
downloadnixlib-4d57e56b713319c52e05b19351c5ae67ca27550e.tar
nixlib-4d57e56b713319c52e05b19351c5ae67ca27550e.tar.gz
nixlib-4d57e56b713319c52e05b19351c5ae67ca27550e.tar.bz2
nixlib-4d57e56b713319c52e05b19351c5ae67ca27550e.tar.lz
nixlib-4d57e56b713319c52e05b19351c5ae67ca27550e.tar.xz
nixlib-4d57e56b713319c52e05b19351c5ae67ca27550e.tar.zst
nixlib-4d57e56b713319c52e05b19351c5ae67ca27550e.zip
$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
Diffstat (limited to 'nixos/modules/system/activation')
-rw-r--r--nixos/modules/system/activation/top-level.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix
index 14bd751ce324..49693b6f1be0 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