Nix refuses to operate when the store path or its parent directories
contain symlinks. On some systems /mnt can be a symlink, causing
disko-install to fail with:
error: the path '"/mnt"' is a symlink; this is not allowed for the
Nix store and its parent directories
Use realpath to resolve symlinks before passing the mount point to
nix-store and nixos-install commands.
Allow users to override the automatic thread count detection for nix
store copying. The default "auto" behavior remains unchanged (min of
nproc and 8), but users can now specify a fixed thread count for
environments where the automatic detection isn't optimal.
The value for device is copied into the SOURCE column of findmnt.
By default this is "none". The mount and unmount scripts
branch on SOURCE=fsType specifically, and the existence of "none"
in the SOURCE column causes wrong branches to be executed.
For a list of special filesystems, the default value "none"
is replaced by the value for fsType.
QEMU on aarch64 requires an explicit machine type (e.g., '-machine virt'),
unlike x86_64 which has a default. Previously, the test script hardcoded
'qemu-kvm' without machine type arguments, causing aarch64 tests to fail
with "No machine specified, and there is no default".
By importing and using nixpkgs' qemu-common.nix library, we reuse the
existing platform-specific QEMU configuration logic.
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.