disko/tests/bcachefs.nix
2023-01-23 10:56:51 +01:00

25 lines
758 B
Nix

{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest
}:
let
linux-bcachefs = pkgs.callPackage ../linux-testing-bcachefs.nix {};
in
makeDiskoTest {
disko-config = ../example/bcachefs.nix;
extraTestScript = ''
machine.succeed("mountpoint /");
machine.succeed("lsblk >&2");
'';
# so that the installer boots with a bcachefs enabled kernel
extraConfig = {
boot.supportedFilesystems = [ "bcachefs" ];
# disable zfs so we can support latest kernel
nixpkgs.overlays = [(final: super: {
zfs = super.zfs.overrideAttrs(_: {
meta.platforms = [];
});
})];
boot.kernelPackages = pkgs.lib.mkForce (pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux-bcachefs));
};
}