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.
Fixes#900
This was caused by https://github.com/NixOS/nixpkgs/pull/354535
originally. The breaking changes introduced there have been resolved by
https://github.com/NixOS/nixpkgs/pull/360413, but one addition survived,
which was the line `source $stdenv/setup`.
Because we used `>` instead of `>>`, `saved-env` was overwritten, so
even with the second PR, the script failed with the following error:
/nix/store/pw...ykc-vm-run-stage2: line 16: stdenv: unbound variable
Once this and the second PR mentioned above are merged, #903 will be
unblocked.
It seems that there is a difference between how `pkgs` and `lib` get
passed to NixOS modules: `pkgs` is the unmodified original, `lib` is the
final version after overrides etc.
This causes `pkgs.lib.version` to be `24.11git` in some cases, while
`lib.version` is `24.11.20241123.0c58267`.
Maybe this can be fixed in nixpkgs? Either way, this change fixes that
issue.
Fixes#904