mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
nixos/nixos-generate-config: use hostPlatform.system
instead of calling nix
This commit is contained in:
parent
136f6ccdc8
commit
1aa8534f3e
2 changed files with 2 additions and 7 deletions
|
@ -85,12 +85,7 @@ sub debug {
|
|||
|
||||
|
||||
# nixpkgs.system
|
||||
my ($status, @systemLines) = runCommand("@nixInstantiate@ --impure --eval --expr builtins.currentSystem");
|
||||
if ($status != 0 || join("", @systemLines) =~ /error/) {
|
||||
die "Failed to retrieve current system type from nix.\n";
|
||||
}
|
||||
chomp(my $system = @systemLines[0]);
|
||||
push @attrs, "nixpkgs.hostPlatform = lib.mkDefault $system;";
|
||||
push @attrs, "nixpkgs.hostPlatform = lib.mkDefault \"@system@\";";
|
||||
|
||||
|
||||
my $cpuinfo = read_file "/proc/cpuinfo";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue