nixops icon indicating copy to clipboard operation
nixops copied to clipboard

Make --network accept a file argument and add a --flake flag

Open talyz opened this issue 4 years ago • 2 comments

To make it possible to keep multiple network definitions in the same directory, make the --network flag accept a file in addition to a directory. Also, add a corresponding --flake flag and create short flags for both (-n and -f respectively).

talyz avatar Oct 21 '21 11:10 talyz

This needs documentation and tests.

We have unit tests in tests.py and the tests directory, or https://github.com/NixOS/nixpkgs/pull/142035 could be added here for end to end tests.

Not sure if eval-machine-info needs to use the name, instead of nixopsConfigurations.default. Perhaps that should be independent and part of the flake fragment: --flake .#other-deployment.

Documentation can be updated in doc/manual/nixops.rst

roberth avatar Nov 23 '21 11:11 roberth

This needs documentation and tests.

We have unit tests in tests.py and the tests directory, or NixOS/nixpkgs#142035 could be added here for end to end tests.

I'm not sure how to add this to the unit tests - it doesn't really feel suited for it. The NixOS test could be updated for it, though.

Not sure if eval-machine-info needs to use the name, instead of nixopsConfigurations.default. Perhaps that should be independent and part of the flake fragment: --flake .#other-deployment.

I'm not really sure what this is referring to in relation to this change.

Documentation can be updated in doc/manual/nixops.rst

I've added some basic parameter documentation now and removed the references I could find to the previous -n flag. There's more to document and more in the documentation to update, but I think it makes more sense to do a bigger rewrite when we know how the interface looks - should deployments and the legacy backend be removed or should legacy deployments be fixed instead? As I see it, the prior alternative would require more substantial documentation updates (and be a lot of work in general), while the latter would give us a confusing UX with a lot of old cruft.

talyz avatar Nov 23 '21 16:11 talyz