Automatically include the bcachefs kernel module when bcachefs is detected in
extraRootModules or boot.supportedFilesystems.
This follows the same pattern as ZFS.
Fixes#1151
Even though we don't depend on the MBR bootable flag in the following
steps, not running udevadm trigger and waiting for settle can cause
/dev/disk/by-partlabel entries to be absent when formatting filesystems
immediately after modifying the partition table.
fixes device groups, for example where the disko config given looks like:
label = "fast.dev1";
after formatting, the device has a literal label of "fast.dev1" which
breaks bcachefs device groups:
echo fast > /sys/fs/bcachefs/<id>/options/foreground_target
gives the error Invalid argument, echo fast.dev1 fails as well
echo "\"fast\"" fails the same, however echo "\"fast.dev1\"" succeeds
after this, device labels and groups work as expected and any component
of the label can be used for a *_target
This update introduces a bcachefs type with encryption support and advanced formatting options.
It includes a new example (`examples/bcachefs-multi-disk.nix`) to demonstrate multi-disk setups and available options.
Key changes:
- Deterministic UUID generation.
- Addressed limitations with multi-disk root setups due to bcachefs and systemd issues.
- Provided a systemd-mount alternative for fileSystems configuration.
- Added subvolume support and updated scripts for clarity and functionality.
---------
Co-authored-by: Jonas Heinrich <onny@project-insanity.org>
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
Co-authored-by: Kyle Petryszak <6314611+ProjectInitiative@users.noreply.github.com>
Update
* Add examples
* Improve descriptions
Remove debugging
Remove comment
Use `unique` to dedup lists
Currently if building an image using cross compilation:
nixpkgs = {
config.allowUnsupportedSystem = true;
hostPlatform = "armv7l-linux";
buildPlatform = "x86_64-linux";
};
And resetting the Disko packages for binFmt use:
disko.imageBuilder =
let
diskoPkgs = nixpkgs.legacyPackages."x86_64-linux";
in
{
enableBinfmt = true;
pkgs = diskoPkgs;
kernelPackages = diskoPkgs.linuxPackages_latest;
};
Something will differ between host/build Platform in diskoPkgs (Not sure
what, they look the same when tracing but there is functions that maybe
differ) causing it to miss the nixpkgs cache and rebuilding for x86_64-linux.
Also resettings buildPlatform fixes this.
This is the only way to assign devices rather than fixed gpt partitions.
Without reading the code it's not very obvious how disko actually
assigns devices to zpools.