nixpkgs/nixos/modules/image
Will Fancher 26ccfb7a8c nixos/image/repart: Use own assertions / warnings.
It was easy to accidentally trigger infinite recursion if you depended
on `toplevel` in any way before. For instance, if you used
`CopyBlocks` with an image containing `toplevel`. This was because
`toplevel`'s assertion / warning logic has to be evaluated, but that
means evaluating `image.repart`'s assertions / warnings, which
requires evaluating the `repartConfig` attrsets to check for malformed
`Label`s. That causes the module system to type check *all*
`repartConfig` keys, even though most of them aren't used in the
assertions / warnings. So evaluating `system.build.image` evaluates
`repartConfig.CopyBlocks`, which evaluates `toplevel`, which evaluates
assertions / warnings, which evaluates `repartConfig.CopyBlocks` to
type check it. Infinite loop.

Even ignoring this recursion problem, it's still better for the repart
module to have its own assertions / warnings options. You don't have
to use `toplevel` in a repart image, so its assertions / warnings
would have been ignored in that case anyway. This way they're *always*
checked when you build an image.
2025-05-14 01:24:43 -04:00
..
amend-repart-definitions.py modules/image/repart: Fix stripNixStorePrefix 2023-08-22 13:09:03 +02:00
assert_uki_repart_match.py nixos/repart-verity-store: init 2024-09-20 17:35:49 +02:00
file-options.nix image/file-options: use defaultText 2025-04-25 22:03:46 +02:00
images.nix cloudstack: add to image/images 2025-04-14 14:03:58 +02:00
repart-image.nix treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
repart-verity-store.nix nixos/repart-verity-store: use mkDefault for partition types 2024-12-17 17:12:42 +01:00
repart.nix nixos/image/repart: Use own assertions / warnings. 2025-05-14 01:24:43 -04:00