tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos-generate-config: Enable strictness
Eelco Dolstra
9 years ago
c6ab4ab2
fa1b9ec1
+6
-4
1 changed file
expand all
collapse all
unified
split
nixos
modules
installer
tools
nixos-generate-config.pl
+6
-4
nixos/modules/installer/tools/nixos-generate-config.pl
···
1
1
#! @perl@
2
2
3
3
+
use strict;
3
4
use Cwd 'abs_path';
4
5
use File::Spec;
5
6
use File::Path;
···
69
70
my @attrs = ();
70
71
my @kernelModules = ();
71
72
my @initrdKernelModules = ();
73
73
+
my @initrdAvailableKernelModules = ();
72
74
my @modulePackages = ();
73
75
my @imports;
74
76
···
379
381
# Is this a btrfs filesystem?
380
382
if ($fsType eq "btrfs") {
381
383
my ($status, @id_info) = runCommand("btrfs subvol show $rootDir$mountPoint");
382
382
-
if ($status != 0 || join("", @msg) =~ /ERROR:/) {
384
384
+
if ($status != 0 || join("", @id_info) =~ /ERROR:/) {
383
385
die "Failed to retrieve subvolume info for $mountPoint\n";
384
386
}
385
387
my @ids = join("", @id_info) =~ m/Subvolume ID:[ \t\n]*([^ \t\n]*)/;
···
440
442
sub multiLineList {
441
443
my $indent = shift;
442
444
return " [ ]" if !@_;
443
443
-
$res = "\n${indent}[ ";
445
445
+
my $res = "\n${indent}[ ";
444
446
my $first = 1;
445
447
foreach my $s (@_) {
446
448
$res .= "$indent " if !$first;
···
494
496
if ($force || ! -e $fn) {
495
497
print STDERR "writing $fn...\n";
496
498
497
497
-
my $bootloaderConfig = "";
499
499
+
my $bootLoaderConfig = "";
498
500
if (-e "/sys/firmware/efi/efivars") {
499
501
$bootLoaderConfig = <<EOF;
500
502
# Use the gummiboot efi boot loader.
···
568
570
# };
569
571
570
572
# The NixOS release to be compatible with for stateful data such as databases.
571
571
-
system.stateVersion = "@nixosRelease@";
573
573
+
system.stateVersion = "${\(qw(@nixosRelease@))}";
572
574
573
575
}
574
576
EOF