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
#! @perl@
2
0
3
use Cwd 'abs_path';
4
use File::Spec;
5
use File::Path;
···
69
my @attrs = ();
70
my @kernelModules = ();
71
my @initrdKernelModules = ();
0
72
my @modulePackages = ();
73
my @imports;
74
···
379
# Is this a btrfs filesystem?
380
if ($fsType eq "btrfs") {
381
my ($status, @id_info) = runCommand("btrfs subvol show $rootDir$mountPoint");
382
-
if ($status != 0 || join("", @msg) =~ /ERROR:/) {
383
die "Failed to retrieve subvolume info for $mountPoint\n";
384
}
385
my @ids = join("", @id_info) =~ m/Subvolume ID:[ \t\n]*([^ \t\n]*)/;
···
440
sub multiLineList {
441
my $indent = shift;
442
return " [ ]" if !@_;
443
-
$res = "\n${indent}[ ";
444
my $first = 1;
445
foreach my $s (@_) {
446
$res .= "$indent " if !$first;
···
494
if ($force || ! -e $fn) {
495
print STDERR "writing $fn...\n";
496
497
-
my $bootloaderConfig = "";
498
if (-e "/sys/firmware/efi/efivars") {
499
$bootLoaderConfig = <<EOF;
500
# Use the gummiboot efi boot loader.
···
568
# };
569
570
# The NixOS release to be compatible with for stateful data such as databases.
571
-
system.stateVersion = "@nixosRelease@";
572
573
}
574
EOF
···
1
#! @perl@
2
3
+
use strict;
4
use Cwd 'abs_path';
5
use File::Spec;
6
use File::Path;
···
70
my @attrs = ();
71
my @kernelModules = ();
72
my @initrdKernelModules = ();
73
+
my @initrdAvailableKernelModules = ();
74
my @modulePackages = ();
75
my @imports;
76
···
381
# Is this a btrfs filesystem?
382
if ($fsType eq "btrfs") {
383
my ($status, @id_info) = runCommand("btrfs subvol show $rootDir$mountPoint");
384
+
if ($status != 0 || join("", @id_info) =~ /ERROR:/) {
385
die "Failed to retrieve subvolume info for $mountPoint\n";
386
}
387
my @ids = join("", @id_info) =~ m/Subvolume ID:[ \t\n]*([^ \t\n]*)/;
···
442
sub multiLineList {
443
my $indent = shift;
444
return " [ ]" if !@_;
445
+
my $res = "\n${indent}[ ";
446
my $first = 1;
447
foreach my $s (@_) {
448
$res .= "$indent " if !$first;
···
496
if ($force || ! -e $fn) {
497
print STDERR "writing $fn...\n";
498
499
+
my $bootLoaderConfig = "";
500
if (-e "/sys/firmware/efi/efivars") {
501
$bootLoaderConfig = <<EOF;
502
# Use the gummiboot efi boot loader.
···
570
# };
571
572
# The NixOS release to be compatible with for stateful data such as databases.
573
+
system.stateVersion = "${\(qw(@nixosRelease@))}";
574
575
}
576
EOF