@@ -1,5 +1,6 @@
11#! @perl@
22
3+use strict;
34use Cwd 'abs_path';
45use File::Spec;
56use File::Path;
@@ -69,6 +70,7 @@ for (my $n = 0; $n < scalar @ARGV; $n++) {
6970my @attrs = ();
7071my @kernelModules = ();
7172my @initrdKernelModules = ();
73+my @initrdAvailableKernelModules = ();
7274my @modulePackages = ();
7375my @imports;
7476
@@ -379,7 +381,7 @@ EOF
379381 # Is this a btrfs filesystem?
380382 if ($fsType eq "btrfs") {
381383 my ($status, @id_info) = runCommand("btrfs subvol show $rootDir$mountPoint");
382− if ($status != 0 || join("", @msg) =~ /ERROR:/) {
384+ if ($status != 0 || join("", @id_info) =~ /ERROR:/) {
383385 die "Failed to retrieve subvolume info for $mountPoint\n";
384386 }
385387 my @ids = join("", @id_info) =~ m/Subvolume ID:[ \t\n]*([^ \t\n]*)/;
@@ -440,7 +442,7 @@ sub toNixList {
440442sub multiLineList {
441443 my $indent = shift;
442444 return " [ ]" if !@_;
443− $res = "\n${indent}[ ";
445+ my $res = "\n${indent}[ ";
444446 my $first = 1;
445447 foreach my $s (@_) {
446448 $res .= "$indent " if !$first;
@@ -494,7 +496,7 @@ if ($showHardwareConfig) {
494496 if ($force || ! -e $fn) {
495497 print STDERR "writing $fn...\n";
496498
497− my $bootloaderConfig = "";
499+ my $bootLoaderConfig = "";
498500 if (-e "/sys/firmware/efi/efivars") {
499501 $bootLoaderConfig = <<EOF;
500502 # Use the gummiboot efi boot loader.
@@ -568,7 +570,7 @@ $bootLoaderConfig
568570 # };
569571
570572 # The NixOS release to be compatible with for stateful data such as databases.
571− system.stateVersion = "@nixosRelease@";
573+ system.stateVersion = "${\(qw(@nixosRelease@))}";
572574
573575}
574576EOF