cachix icon indicating copy to clipboard operation
cachix copied to clipboard

Allow configuring a persistent hostname through the CLI

Open sandydoo opened this issue 3 years ago • 1 comments
trafficstars

You can now configure a persistent hostname with cachix config set hostname.

A few questions to resolve:

  • [ ] host vs hostname hostname seems to be the standard. We could allow providing --hostname (in addition to the current --host)
  • [ ] config set hostname vs config hostname Would we want to have other subcommands in the future? get or list?

Resolves #439.

sandydoo avatar Sep 21 '22 10:09 sandydoo

I don't think anyone was using --host besides me for testing so far, so we can rename it to --hostname and support both (just to keep old scripts working).

I was thinking cachix config hostname myhost to set it and cachix config hostname to retrieve it (although that's not needed yet). Maybe that's too clever and it's better to have a verb?

domenkozar avatar Sep 21 '22 11:09 domenkozar

@domenkozar, I went with hostname, but the CLI will still accept host to remain backwards-compatible. I also decided to keep the get/set verbs in the end. This design seems pretty standard among CLIs that have config options. It’s obvious, it’s explicit, and you get to see help text when you run config hostname.

sandydoo avatar Sep 22 '22 22:09 sandydoo