Closed kolloch closed 6 months ago
Sure! I don't mind to split it into another file.
To avoid misleading users such as me, I'd comment on the original file that some more steps are needed to make this work in practice. I mistook the example as a best practice recommendation and getting started basis.
If the "new" example will serve as the getting started basis, I'd keep adding to the nix.conf in there: It is a very common requirement if you want to build upon that example.
And I am all for tests. One think that might potentially make this difficult, is that for a meaninful test, you'd need to load the image into a docker runtime and execute some commands in it. Does your CI support that?
I mistook the example as a best practice recommendation and getting started basis.
I'm sorry about this: this should no longer be in a example directory... Ideally we should have an example section and a test section but this kind of improvements takes time to implement :/ At least, currently, all "examples" are tested. (btw, +1 for a comment in this file).
If the "new" example will serve as the getting started basis, I'd keep adding to the nix.conf in there: It is a very common requirement if you want to build upon that example.
Agreed (and i'm also in favor of enabling flakes).
One think that might potentially make this difficult, is that for a meaninful test, you'd need to load the image into a docker runtime and execute some commands in it. Does your CI support that?
Yes, the CI does that... in an impure way (see this doc) but in practice it works pretty well (in the future, I'm planning to run this in a NixOS VM to make it pure).
How shall I call the new directory then?
Or shall I rename examples
to testImages
or similar?
Makes executing
nix
within thenix-user
container possible :)