Merge pull request #1791 from wizeman/u/nixos-gen
nixos-generate-config: improve filesystem generation
This commit is contained in:
commit
d9cc648d6c
@ -256,7 +256,7 @@ foreach my $fs (read_file("/proc/self/mountinfo")) {
|
||||
$mountPoint = "/" if $mountPoint eq "";
|
||||
|
||||
# Skip special filesystems.
|
||||
next if in($mountPoint, "/proc") || in($mountPoint, "/dev") || in($mountPoint, "/sys") || in($mountPoint, "/run");
|
||||
next if in($mountPoint, "/proc") || in($mountPoint, "/dev") || in($mountPoint, "/sys") || in($mountPoint, "/run") || $mountPoint eq "/var/lib/nfs/rpc_pipefs";
|
||||
|
||||
# Skip the optional fields.
|
||||
my $n = 6; $n++ while $fields[$n] ne "-"; $n++;
|
||||
@ -305,7 +305,15 @@ EOF
|
||||
fileSystems.\"$mountPoint\" =
|
||||
{ device = \"$device\";
|
||||
fsType = \"$fsType\";
|
||||
options = \"${\join ",", uniq(@extraOptions, @superOptions, @mountOptions)}\";
|
||||
EOF
|
||||
|
||||
if (scalar @extraOptions > 0) {
|
||||
$fileSystems .= <<EOF;
|
||||
options = \"${\join ",", uniq(@extraOptions)}\";
|
||||
EOF
|
||||
}
|
||||
|
||||
$fileSystems .= <<EOF;
|
||||
};
|
||||
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user