diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 3d0f4a9f7d86..96d0d68e5c93 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -505,7 +505,7 @@ EOF # This should work for single and multi-device systems. # still needs subvolume support if ($fsType eq "bcachefs") { - my ($status, @info) = runCommand("bcachefs fs usage $rootDir$mountPoint"); + my ($status, @info) = runCommand("@bcachefs@ fs usage $rootDir$mountPoint"); my $UUID = $info[0]; if ($status == 0 && $UUID =~ /^Filesystem:[ \t\n]*([0-9a-z-]+)/) { diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index f3f60dfbdd49..6ce3e2839371 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/nixos/modules/installer/tools/tools.nix @@ -38,6 +38,11 @@ let ); hostPlatformSystem = pkgs.stdenv.hostPlatform.system; detectvirt = lib.getExe' config.systemd.package "systemd-detect-virt"; + bcachefs = + if pkgs.bcachefs-tools.meta.broken then + lib.getExe' pkgs.coreutils "false" + else + lib.getExe pkgs.bcachefs-tools; btrfs = lib.getExe pkgs.btrfs-progs; inherit (config.system.nixos-generate-config) configuration desktopConfiguration flake; xserverEnabled = config.services.xserver.enable;