NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.82k stars 363 forks source link

Flag/Command to list args in a machine-friendly format #394

Open rehno-lindeque opened 8 years ago

rehno-lindeque commented 8 years ago

The only command I know of for listing arguments set using nixops set-args is nixops info.

I feel it would be convenient to list arguments in a more machine-friendly format. Currently the output for nixops info seems intended for human consumption (and --plain doesn't list arguments).

The use case I have in mind is dumping arguments to a file in order to pass along to someone else. How does this idea sound to others?

rbvermaa commented 8 years ago

@rehno-lindeque Wouldn't it be easier to get the data programmatically via python?

rehno-lindeque commented 8 years ago

Python seems a bit heavy-weight for what I have in mind? I tend to just shell script our nix-shell environment in this sort of style:

alias dump-args = nixops info --args > .args
alias load-args = nixops set-args $(xargs < .args)
rbvermaa commented 8 years ago

Ah, sorry, I misread your original request. I was already thinking of something similar. Will add it in next release.

rehno-lindeque commented 8 years ago

Fantastic thanks!