Commit graph

12 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
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
nikstur 14152f80bb nixos/image: fix layout of option examples in repart builder 2023-10-31 11:27:57 +01:00
nikstur 84722633b7 nixos/image: move docs into manual 2023-10-31 11:27:56 +01:00
Julian Stecklina ea3ca0b1e3 nixos/image: fix documentation build
literalExpression triggers the following error when building the
manual:

Cacheable portion of option doc build failed.
Usually this means that an option attribute that ends up in documentation (eg `default` or `description`) depends on the restricted module arguments `config` or `pkgs`.
2023-10-31 00:36:17 +01:00
nikstur e2699cd256 nixos/image: fix for systemd 254 2023-09-13 12:03:50 +02:00
Vincent Haupert f652755434 nixos/image: add image.repart.package option
Allow giving a custom package containing the `systemd-repart` binary.
Defaults to `pkgs.systemd`. This option opens up the possibility to use
a different package for the image builder and the system configuration.

For example, someone could use this option to build an image with a
patched systemd while still using the upstream nixpkgs systemd package
(i.e., `pkgs.systemd`) for the system configuration installed to the
created image.
2023-08-04 13:49:18 +02:00
Vincent Haupert 7f70abf80c nixos/image: write systemd-repart output to $out/repart-output.json
Write the output of `systemd-repart` as a JSON file to
`$out/repart-output.json`.

Depending on the repart configuration, the output of `systemd-repart`
contains important information, for example, when creating verity
partitions:

> The verity root hash itself will be included in the output of
> systemd-repart.

See `Verity=` in repart.d(5).
2023-08-02 00:10:14 +02:00
nikstur cb2d047c57 nixos/image: add repart builder docs 2023-07-26 23:36:18 +02:00
nikstur ec8d30cc50 nixos/image: add repart builder 2023-07-26 23:33:14 +02:00