disko
disko copied to clipboard
cleanup host environment passed to VM for image building
keeping only origBuilder env from host
should resolve https://github.com/nix-community/disko/issues/622
Looks good. Does it work?
i've mentioned in the issue https://github.com/nix-community/disko/issues/622 that it does seem to work fine, but i only manually tested a few configs for config.system.build.diskoImagesScript, and visually confirmed that result boots and seems good, nothing else.
the change should affect only VM environment, created early in stage-2 script, the only change in environment in which the script that starts VM is executed is the absence of origBuilder var there, as it's set through preVM instead
i basically know two features in this project so far :) are there any automated tests to ensure nothing else broke from this change?
there are tests in the tests folder, they should be nix-build able or alternatively with nix build .#tests.make-disk-image
i've ran some tests so far (I assume - the process of building IS running the test), it seem to work fine.
interestingly, the tests run with nix build will run in clean environment, so they won't catch issues as with running the result of image building script in tainted user enviornment. (unless there is such special test case that imitates that problem somewhere, but I doubt that since it seems that this was not noticed to be something noticeable before)
Oh wait, (i'm blind) I've just noticed that there are github actions that run all the tests, and all the tests pass
@mergify queue
queue
✅ The pull request has been merged automatically
The pull request has been merged automatically at c194451352987aff99c472af131ebe71e2575df2