-
Notifications
You must be signed in to change notification settings - Fork 239
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
RFC: File based config #27
Comments
Would it be feasible to do this through a {stdenv, nixpacks}: rec {
derivation = stdenv.mkDerivation {
# ...
};
deploy = nixpacks.configure {
inherit derivation;
startCommand = "./whatever";
# Since the package is already built by the derivation, you shouldn't need a separate build command here
};
} Or something like that. |
That could work. And I do think it is a good idea to be able to import/build Nix projects with zero-config. However, I am not sure this is the right approach for all projects. Ideally, users can use all features of Nixpacks without having to know and understand the Nix expression language (see core ideas in readme). This is also something you have to opt into completely and means that if you want to save the start command to version control you will have to also figure out how to build your app with Nix and cannot take advantage of the providers. That being said, looking for and building a |
An idea: if Nixpacks were to export some sort of interface to Nix expressions, then would it be possible to also export the providers? Maybe even provide some sort of wrapper around {nixpacks, stdenv, myDependency}:
nixpacks.mkDerivation {
# All options are optional; `extends` would default to stdenv, most likely.
extends = stdenv;
buildCommand = "whatever";
runCommand = "./whatever";
packages = [ myDependency ];
} That might take whatever the |
Oh yeah that is a neat idea. It would allow us to leverage the Nix ecosystem a bit more too. I'll play around with it. |
Moved to discussions (#120) |
Nixpacks configuration should be able to be provided through a file on disk in the app source. The main benefit is that build configuration can be tracked through source control.
At the moment, the configurable options are
A very basic format for these options is a JSON file
The text was updated successfully, but these errors were encountered: