nixos: Fix use of nixpkgs.localSystem

localSystem is ill-defined because unlike hostPlatform, its
meaning is different in a cross or non-cross context.
This commit is contained in:
Robert Hensing 2022-07-10 13:18:31 +02:00
parent 16de63fcc5
commit e153087276
2 changed files with 2 additions and 2 deletions

View file

@ -186,7 +186,7 @@ in
dysnomia.properties = {
hostname = config.networking.hostName;
inherit (config.nixpkgs.localSystem) system;
inherit (pkgs.stdenv.hostPlatform) system;
supportedTypes = [
"echo"

View file

@ -132,7 +132,7 @@ let
# If the host is 64-bit and the container is 32-bit, add a
# --personality flag.
${optionalString (config.nixpkgs.localSystem.system == "x86_64-linux") ''
${optionalString (pkgs.stdenv.hostPlatform.system == "x86_64-linux") ''
if [ "$(< ''${SYSTEM_PATH:-/nix/var/nix/profiles/per-container/$INSTANCE/system}/system)" = i686-linux ]; then
extraFlags+=" --personality=x86"
fi