-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding build time ERB/erubis dependency? #51
Comments
Do we really need templating ? |
I hadn't thought of the option of moving Templating is also more scalable for future changes, allowing for more complex logic as we add support for more VM's. And as I mentioned, erubis is already a Vagrant dependency, so it's not like we'll be asking most people to download something new. I personally wouldn't want to introduce runtime checks in configuration.nix for enabling services depending on whether certain virtualization options have been enabled. That feels brittle. |
Fair enough. |
Would folks be open to adding ERB/erubis as a dependency to this project to customize config files during the provisioning step?
Use case
I'm adding support for the
parallels-iso
builder, which entails setting thehardware.parallels.enable = true
option in NixOS to enable Parallels guest OS support. However, I'm currently stuck because this line inparallels-guest.nix
conflicts with this line inconfiguration.nix
, resulting in the following error when runningpacker build
:In my opinion, the proper way to deal with this is to generate configuration.nix from a template during the provisioning step before it's downloaded by
install.sh
. In this case, we would stick a conditional that would either emit or omitservices.timesyncd.enable = false;
from configuration.nix depending on which builder is being used.I think that using ERB makes sense since Packer and Vagrant use Ruby and
erubis
is already a Packer dependency.The text was updated successfully, but these errors were encountered: