Merge pull request #180603 from m-bdf/substitute-nix-instantiate

nixos-generate-config: substitute nix-instantiate
This commit is contained in:
Maximilian Bosch 2022-07-22 14:22:52 +02:00 committed by GitHub
commit 200ce70e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,7 @@ sub debug {
# nixpkgs.system
my ($status, @systemLines) = runCommand("nix-instantiate --impure --eval --expr builtins.currentSystem");
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";
}

View File

@ -34,6 +34,7 @@ let
name = "nixos-generate-config";
src = ./nixos-generate-config.pl;
perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl";
nixInstantiate = "${pkgs.nix}/bin/nix-instantiate";
detectvirt = "${config.systemd.package}/bin/systemd-detect-virt";
btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
inherit (config.system.nixos-generate-config) configuration desktopConfiguration;