allow subtype definitions to be broken up#1094
Conversation
|
this looks pretty good, can we add a test that shows that we can split it up now? :) |
|
Not sure if this is going to be very heavy because it uses |
|
hmm, the test framework is really too opinionated to test this. I don't think computation will be heavy with this, since the evalModules should be fast with the few options available. So I'm gonna merge this for now and try to integrate it into the nixpkgs PR at a later point. Thanks a lot! |
|
Just tested this and it works well 👍 Thanks One example using this PR is for having a different FDE password for your VM: {
virtualisation.vmVariantWithDisko = {
disko.devices.disk.primary.content.partitions.luks.content.passwordFile =
lib.mkForce (toString (pkgs.writeText "password" "apple"));
};
} |
|
This PR allows us to finish #480 which I think should refactor |
When extendModules is provided (from module.nix), use it to merge extraSystemConfig with the base configuration BEFORE running prepareDiskoConfig. This allows users to override disko settings (partition sizes, LUKS keys, etc.) via disko.tests.extraConfig using the proper NixOS module system rather than manual attribute merging. The key change is that test-specific disko overrides are now merged before device path transformation, so the overrides are included when prepareDiskoConfig maps devices to QEMU virtio paths. This makes PR nix-community#480 obsolete by using extendModules (enabled by PR nix-community#1094's evalModules support for disko subtypes) instead of lib.recursiveUpdate.
When extendModules is provided (from module.nix), use it to merge extraSystemConfig with the base configuration BEFORE running prepareDiskoConfig. This allows users to override disko settings (partition sizes, LUKS keys, etc.) via disko.tests.extraConfig using the proper NixOS module system rather than manual attribute merging. The key change is that test-specific disko overrides are now merged before device path transformation, so the overrides are included when prepareDiskoConfig maps devices to QEMU virtio paths. This makes PR nix-community#480 obsolete by using extendModules (enabled by PR nix-community#1094's evalModules support for disko subtypes) instead of lib.recursiveUpdate.
When extendModules is provided (from module.nix), use it to merge extraSystemConfig with the base configuration BEFORE running prepareDiskoConfig. This allows users to override disko settings (partition sizes, LUKS keys, etc.) via disko.tests.extraConfig using the proper NixOS module system rather than manual attribute merging. The key change is that test-specific disko overrides are now merged before device path transformation, so the overrides are included when prepareDiskoConfig maps devices to QEMU virtio paths. This makes PR nix-community#480 obsolete by using extendModules (enabled by PR nix-community#1094's evalModules support for disko subtypes) instead of lib.recursiveUpdate.
Currently
subtypesuffers from a few issues:This PR addresses them.