Commit graph

5 commits

Author SHA1 Message Date
WilliButz 82ef47d3b7
nixos/repart-image: add options to specify mkfs parameters
This new option makes it easier to specify extra mkfs parameters for the
systemd-repart builder.

See https://github.com/systemd/systemd/blob/v255/docs/ENVIRONMENT.md?plain=1#L575-L577
2024-03-07 22:50:56 +01:00
WilliButz f88148f05e
nixos/repart-image: improve overridability, use structuredAttrs
Parameters passed to systemd-repart are now passed to the build script
via environment variable, which is defined as a list of strings in
combination with `__structuredAttrs = true`. This should make it easier
to customize the image build using `overrideAttrs`.

Both the script used to amend the repart definitions and the amended
definitions are now available via passthru.
2024-03-07 18:27:11 +01:00
Jared Baur 4e139026b5
nixos/repart: add option for configuring sector size
This option is helpful for situations when the target host disk's sector
size differs from that of the build host.
2024-01-27 17:19:32 -08:00
nikstur a34af9a955 image/repart: add version and compression options
The version option is needed if you want to implement partition &
systemd-boot based A/B booting where the version information is encoded
in the files on the ESP. See systemd-sysupate docs for more details on
this:
https://www.freedesktop.org/software/systemd/man/latest/sysupdate.d.html

Note, however, that this is not *only* useful for systemd-sysupdate but
also for other similar updating tools/mechanisms.
2024-01-19 14:43:29 +01:00
Jared Baur f58c5e7154
image/repart: build image with buildPackages
Since the repart image is built on the build platform, use
`buildPackages` to construct the image. This allows for systemd-repart
images for cross-compiled nixos configurations to work properly.
2023-12-21 15:11:13 -08:00