nix-community / nixos-generators

Collection of image builders [maintainer=@Lassulus]
MIT License
1.84k stars 145 forks source link

Ability to reconfigure machines built with generators #401

Open paulvictor opened 1 week ago

paulvictor commented 1 week ago

Hello, I have been able to generate Amazon images(among other variants) by using the nixosGenerate function. Once on the instance, for me to rebuild-switch, I find it difficult because I would still like to have the options set by ${modulesPath}/virtualisation/amazon-image.nix available. Is there a way possible. One possibility I can think of is if the nixosGenerate function return the image value and have another attribute in the final attrset for the actual image artifact. Can you let me know of any other way this can be done?

Thanks Paul

paulvictor commented 1 week ago

I just came across https://github.com/nix-community/nixos-generators/pull/256 , would using nixos-generators as a module solve my problem?