Skip to content
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

Create multiple networks from the same flake #1451

Open
f4814 opened this issue Apr 10, 2021 · 2 comments
Open

Create multiple networks from the same flake #1451

f4814 opened this issue Apr 10, 2021 · 2 comments

Comments

@f4814
Copy link

f4814 commented Apr 10, 2021

When creating a network from a flake, the network definition from outputs.nixopsConfigurations.default is used. However I think that using something like nixops create -d test --flake .#test, which would use the definition from output.nixopsConfigurations.test should be possible. Otherwise making a nixopsConfigurations attrset doesn't really make sense and is pretty counter-intuitive. (I had to check the code to find out here to find out, what the weird error I was getting meant).

@roberth
Copy link
Member

roberth commented Aug 26, 2021

I think maybe we should default -d to the attribute name as well, although storing multiple deployments in the same remote state is a bad idea because of locking.

@JamesReynolds
Copy link

I think I may be in a similar position: I've migrated from nixops 1.x where I had multiple deployments with different network definitions and I'm unable to replicate this in nixops 2.0. My current "solution" is to move my networks to separate folders and use nixops list --network=ec2 or nixops list --network=kvm etc...

It doesn't seem to be possible to make multiple network definitions in either nixops.nix or flakes.nix, unless I'm missing something.... which is quite possible!

(My use case is staging and testing environments using libvirtd locally and a proper deployment on ec2.)

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

No branches or pull requests

3 participants