Support environment file(s)
Currently mkosi supports specification of environment variables via cli and inside the mkosi.default file.
Both variants are tedious to use when variables are generated outside of mkosi.
I propose a new option EnvironmentFile (mkosi.env as default) which takes multiple file paths that are parsed & translated into nspawn env options when building the container and set inside the mkosi.finalize script.
The file format that is used to describe the variables inside these files could be a "plain" shell-like format like systemd uses, which can be generated outside of mkosi.
makes sense I guess.
@nopeslide You can now specify Environment=FOO, and this will propagate $FOO from the mkosi environment. Is this enough for you, or do you still want the env file?
@nopeslide You can now specify Environment=FOO, and this will propagate $FOO from the mkosi environment. Is this enough for you, or do you still want the env file?
I have a few hundred variables (multiple network configs), a file based approach would be nice. I also started an implementation, but didn't had the time to finalize it.