Skip to content

Configurable nix options and substitute-on-destination#83

Merged
adamtulinius merged 3 commits intomasterfrom
nix-options
Oct 27, 2019
Merged

Configurable nix options and substitute-on-destination#83
adamtulinius merged 3 commits intomasterfrom
nix-options

Conversation

@johanot
Copy link
Contributor

@johanot johanot commented Oct 27, 2019

Trying to make morph more configurable by allowing for pass-through of nix.conf options. It's now possible to provide an attribute set of configuration options (nixConfig) for each deployment. These options will be passed to both nix-build and nix copy. Unfortunately, because of the way morph does things, it's not possible to set nix config on a per-host level.

In an effort to also try and fix #73, i've added substituteOnDestination as a deployment module option. This option applies with per-host granularity.

While working on this, I considered just making the entire nix command-line available to the user, which would make any possible flag and option configurable. I rejected that idea for now though, because it turns out to be complicated. There are many permutations of per-host and per-deployment options and there should be a way in the API to then also distinguish flags intended for nix-build and nix copy or even nix eval.

TLDR; I figured that would make the API too complicated at this point. I hope that this PR at least solves "some" problems.

@adamtulinius adamtulinius merged commit 58676c3 into master Oct 27, 2019
@adamtulinius adamtulinius deleted the nix-options branch October 27, 2019 12:48
Copy link

@flokli flokli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any plans for doing a release containing this commit?

@johanot
Copy link
Contributor Author

johanot commented Nov 21, 2019

Sure! Let's see if we can get #91 squeezed in the release as well. :) I'll get back to you on that.

@flokli
Copy link

flokli commented Nov 21, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants