about summary refs log tree commit diff
path: root/nixos/modules/installer/tools/nixos-generate-config.pl
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/installer/tools/nixos-generate-config.pl')
-rw-r--r--nixos/modules/installer/tools/nixos-generate-config.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index 65b5c0331f42d..1935d8252607c 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -89,7 +89,7 @@ my ($status, @systemLines) = runCommand("nix-instantiate --impure --eval --expr
 if ($status != 0 || join("", @systemLines) =~ /error/) {
     die "Failed to retrieve current system type from nix.\n";
 }
-my $system = substr(@systemLines[0], 0, -1);
+chomp(my $system = @systemLines[0]);
 push @attrs, "nixpkgs.hostPlatform = lib.mkDefault $system;";