about summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-06-11 19:28:51 +0200
committerRobert Hensing <robert@roberthensing.nl>2023-06-11 19:28:51 +0200
commit1350e522fa2e6fcc57874a6060f92617fb3a086f (patch)
treebf8dea88aba1d7adb2c5738fa77991775c3123d3 /nixos/modules/installer
parent089f5788fbfefe3adcb930a908d4874e1ce5c0ce (diff)
nixos-generate-config: Fix generated hostPlatform.system
While the intent of the code was correct, the system string can not be used
in the substituteAll function.

See https://github.com/NixOS/nixpkgs/issues/237216
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/tools/nixos-generate-config.pl2
-rw-r--r--nixos/modules/installer/tools/tools.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index c2a5ecbe9e2ea..2e572ef02473b 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -85,7 +85,7 @@ sub debug {
 
 
 # nixpkgs.system
-push @attrs, "nixpkgs.hostPlatform = lib.mkDefault \"@system@\";";
+push @attrs, "nixpkgs.hostPlatform = lib.mkDefault \"@hostPlatformSystem@\";";
 
 
 my $cpuinfo = read_file "/proc/cpuinfo";
diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix
index 5133ad18f4bb5..1e36d10b391f8 100644
--- a/nixos/modules/installer/tools/tools.nix
+++ b/nixos/modules/installer/tools/tools.nix
@@ -35,7 +35,7 @@ let
     name = "nixos-generate-config";
     src = ./nixos-generate-config.pl;
     perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl";
-    system = pkgs.stdenv.hostPlatform.system;
+    hostPlatformSystem = pkgs.stdenv.hostPlatform.system;
     detectvirt = "${config.systemd.package}/bin/systemd-detect-virt";
     btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
     inherit (config.system.nixos-generate-config) configuration desktopConfiguration;