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
Fully modular #107
Fully modular #107
Conversation
Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
…option Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
…happy Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
…ribute for imports not to be treated as an option Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
Signed-off-by: Shea Levy <shea@shealevy.com>
imports at the top level depending on config cause infinite recursion Signed-off-by: Shea Levy <shea@shealevy.com>
The attributes that are still exported (nodes, info.machines, info.network, info.resources, info.machines) are the same as before, but they are built up from a two-stage import of the entire network-level module with networkExprs set as oldStyleNetworkExpressions (two-stage is needed for nixpkgs.config). Signed-off-by: Shea Levy <shea@shealevy.com>
What are "old-style networks"? |
The network expressions we currently use |
Okay, I should have asked: what are "new-style networks". |
Well currently they are only an internal implementation detail, though the point of this whole exercise is to eventually make them the normal way of specifying a network. Instead of the way we currently write them, they'd be modules like:
IOW, new-style networks are just modules that are evaluated with the |
Btw, config would be a terrible name for the network configuration... |
What do you mean? The |
Yeah, all these config arguments might get a bit confusing. That's already the case with submodules... |
Hmm OK. that's just the name used internally by the module system, we can alias it. |
@edolstra If I bring this up-to-date and change the name from |
@edolstra ping? |
Did you change the config argument name already? If so, to what? |
No, it will take some work to update this to master and I wasn't sure if there was interest in having this merged. As for what to change it to, I'm open for suggestions but was thinking |
I would leave config for machines, as that is the same as in NixOS. However, how about renamin the config at network level to network? |
Sure, that works too. |
@edolstra So is there interest in me updating this PR or should I close it? |
This PR depends on NixOS/nixpkgs@8179bad I've updated #78, which this PR is a part of, to describe a bit what the benefits are. Note that this PR doesn't actually change any external behavior, it just sets up the scaffolding necessary for #78 to be doable and uses that scaffolding internally. |
+1 on this. Though the problem I guess is that the mentioned nixpkgs dependency is quite new and thus will break with deployments using older nixpkgs. On the other side, people who want to switch over to new-style networks probably use newer nixpkgs, no? |
Closed in favor of #187 |
This branch is an attempt at solving #78. It (shouldn't) change any functionality at all yet, so it can go into
master
, though we can merge it intonext
as well. If/when we decide this is OK to merge I'll do the actual merge to avoid conflicts.Note that currently there's no way to actually pass network-level modules to nixops yet. Adding that functionality will be trivial now that this is in place, but there are some interface/backwards-compatibility decisions to be made there that are orthogonal to using network-level modules internally.
This depends on NixOS/nixpkgs#598 or something equivalent.