krebs / krops

Mirror of https://cgit.krebsco.de/krops/about/ (PRs / issues accepted, as can be seen by not having them disabled)
Do What The F*ck You Want To Public License
132 stars 18 forks source link

allow overriding 'switch' on the command line #36

Closed dnr closed 1 year ago

dnr commented 2 years ago

I've been using krops to maintain a few devices and recently found myself wanting to do nixos-rebuild build and nixos-rebuild boot when trying playing around with configs and then upgrading NixOS releases. I switched to writeCommand instead of writeDeploy temporarily, but it would be nicer if I could just do this on the command-line.

If you don't like this approach, please consider this a feature request to add it in a different way.

dnr commented 2 years ago

Definitely a valid concern. Unfortunately it looks like dash is missing printf %q or an equivalent, so doing it really properly would be messy.

4z3 commented 1 year ago

@dnr can you have a look if https://github.com/krebs/krops/commit/9c49e9aa24d7793e2dc99d00e9df04d65851a8ef is good enough for your needs?

dnr commented 1 year ago

Yup, that'll do just fine. I have a wrapper script anyway, so I just hooked that up with --argstr so I can do it from the cli. It's extra derivations but that's no big deal. Thanks!