juspay / services-flake

NixOS-like services for Nix flakes
https://community.flake.parts/services-flake
MIT License
342 stars 28 forks source link

Nginx config file location doesn't support relative imports #173

Closed szucsitg closed 4 months ago

szucsitg commented 4 months ago

Currently due to the fact that nginx config is directly pointing to Nix store's location, complex Nginx setup cannot be imported with relative references to the config file.

If the config would be symlinked to dataDir, that would make it trivial to do within the project.

srid commented 4 months ago

I'd like to understand the original problem being solved. Could you state what those relative references to the config file in the Nix store are?

I'm wondering why this wouldn't work for you: create a derivation that contains the master config file, along with these relative references in the same directory ... and then pass that to services-flake.

szucsitg commented 4 months ago

Again, the issue is not specifically for config file, but this was the minimal reproducible config. I can link any config, the issue is that I don't want to put into store the local environment certificates, that lives under in our case ./data/mkcert/. Why ../mkcert/localhost.pem will work in the config