image: migrate off of nixos-generators #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request removes the
nixos-generators
flake input and refactors the code to directly use theconfig.system.build.images.qemu-efi
module that is built-in to the NixOS configuration instead of relying onnixes-generators.nixosGenerate
. This change simplifies the image configuration and eliminates the need for any external flake inputs besidesnixpkgs
.Removal of
nixos-generators
:flake.nix, flake.lock
: Removednixos-generators
from inputs and updated lock file. [1]package.nix
: Removed the call tonixos-generators.nixosGenerate
and instead callnixpkgs.lib.nixosSystem
under an attribute set namedimageConfig
. [1] [2] [3] [4]Image Path Adjustment:
module.nix
: Updated the image location path invmYaml
to useimageWithFinalConfig.passthru.filePath
instead of the hardcodednixos.qcow2
, as the filename of the image built using theimages
module is much longer and will change since it includes thenixpkgs
version.I've tested this configuration in my own nix-darwin config and have had no issues rebuilding the image and running the vm with the exact same module configuration as before.