about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-06-12 10:06:17 +0200
committerGitHub <noreply@github.com>2019-06-12 10:06:17 +0200
commit734b3e7758d988b88b77fc2f3d3aed7a3d79cf2d (patch)
tree16681c9e03442905027659e7cc96dc2bba1676fc /nixos
parentca099915f78b3543bb31924f3121ad19c1d1faf6 (diff)
parent4755811a12c11b5ed6f6ccd6036526d5869d9b17 (diff)
Merge pull request #62966 from bjornfor/nixos-generate-config-bcache
nixos-generate-config: add support for bcache
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/installer/tools/nixos-generate-config.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index b7e5b99a9e01b..0ccdac30d9158 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -258,6 +258,11 @@ foreach my $path (glob "/sys/class/{block,mmc_host}/*") {
     }
 }
 
+# Add bcache module, if needed.
+my @bcacheDevices = glob("/dev/bcache*");
+if (scalar @bcacheDevices > 0) {
+    push @initrdAvailableKernelModules, "bcache";
+}
 
 my $virt = `systemd-detect-virt`;
 chomp $virt;