summary refs log tree commit diff
path: root/nixos/modules/installer/tools
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/installer/tools')
-rw-r--r--nixos/modules/installer/tools/nixos-generate-config.pl28
1 files changed, 17 insertions, 11 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index 0f72f94fd35c..9ce2cab79b0b 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -248,15 +248,22 @@ foreach my $fs (read_file("/proc/self/mountinfo")) {
     if (defined $fsByDev{$fields[2]}) {
         my $path = $fields[3]; $path = "" if $path eq "/";
         $fileSystems .= <<EOF;
-  fileSystems.\"$mountPoint\" = {
-    device = \"$fsByDev{$fields[2]}$path\";
-    fsType = \"none\";
-    options = \"bind\";
-  };
+  fileSystems.\"$mountPoint\" =
+    { device = \"$fsByDev{$fields[2]}$path\";
+      fsType = \"none\";
+      options = \"bind\";
+    };
 
 EOF
         next;
     }
+    $fsByDev{$fields[2]} = $mountPoint;
+
+    # We don't know how to handle FUSE filesystems.
+    if ($fsType eq "fuseblk" || $fsType eq "fuse") {
+        print STDERR "warning: don't know how to emit ‘fileSystem’ option for FUSE filesystem ‘$mountPoint’\n";
+        next;
+    }
 
     # Is this a mount of a loopback device?
     my @extraOptions;
@@ -271,13 +278,12 @@ EOF
     }
 
     # Emit the filesystem.
-    $fsByDev{$fields[2]} = $mountPoint;
     $fileSystems .= <<EOF;
-  fileSystems.\"$mountPoint\" = {
-    device = \"$device\";
-    fsType = \"$fsType\";
-    options = \"${\join ",", uniq(@extraOptions, @superOptions, @mountOptions)}\";
-  };
+  fileSystems.\"$mountPoint\" =
+    { device = \"$device\";
+      fsType = \"$fsType\";
+      options = \"${\join ",", uniq(@extraOptions, @superOptions, @mountOptions)}\";
+    };
 
 EOF
 }