systemd-nspawn overwrites timezone after postinstall script
mkosi seems to use systemd-nspawn without --timezone flag during the build even after running postinstall causing it to always set timezone to be same as host by default. This means that image timezone can only be set to different than host timezone during finalize step if I checked correctly.
This isn't a big deal once realized but having some option to disable this behavior during the image build would make forcing specific timezone to the image more intuitive.
Thanks for the report!
Yeah, this might be useful, but adding this is a bit niche. I would be happy to review a patch adding a CLI option adding this feature, but I actually think, that we should add a mechanism to funnel arbitrary settings to nspawn - similar to Settings=, but at build time (BuildSettings= or BuildtmeSettings=?), since I'm quite sure, that this will come up again and this would similarly allow pass credentials to nspawn.
I agree that the build time Settings= would be more general fix for this. resolv.conf handling comes to mind as another example where changing build time nspawn settings might be useful sometimes.
We don't use systemd-nspawn during the build process anymore so this should be fixed