cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.47k stars 252 forks source link

draft: attempt to unify process-compose settings #1161

Open sandydoo opened 1 week ago

sandydoo commented 1 week ago

I started updating process.process-compose to allow overriding individual settings without losing any of the defaults. But I noticed that, despite the description, those settings are never used.

What needs to be fixed

Name Type Default Comment
process.process-compose attrs { version = "0.5"; ... } Claims to control top-level settings. Only used for tui and unix-socket.
process.process-compose.tui any true Controls the --tui CLI option
process.process-compose.unix-socket any "${config.devenv.runtime}/pc.sock" Sets the --unix-socket path.
process.process-compose.settings yaml {} implementation in config Claims to modify process-specific settings. Controls top-level settings in reality.
process-managers.process-compose.settings.tui bool lib.mkDefault true Never used. Not a PC setting AFAIKT, only command-line.
process-managers.process-compose.settings.port int lib.mkDefault 9999 Never used. Not a PC settings AFAIKT, only command-line.

Other issues

Proposal

Name Action
process.process-compose Deprecate. If this was previously used for settings, migrate to process-managers.process-compose.settings.
process.process-compose.tui Move to process-managers.process-compose.tui.
process.process-compose.unix-socket Move to process-managers.process-compose.unixSocket. Or unix-socket 🤷.
process-managers.process-compose.settings Fix description to say that this controls the top-level options
process-managers.process-compose.settings.port Move to process-managers.process-compose.port.
process-managers.process-compose.settings.tui Remove. Migrate if previously used.
process-managers.process-compose.useUnixSocket Add. Set to true by default and controls the --use-uds CLI flag. Or enable when port = 0.
sandydoo commented 1 week ago

Relevant example: https://github.com/cachix/devenv/issues/1104#issuecomment-2068232549

domenkozar commented 1 week ago

We also should update examples and docs and make sure all options are deprecated/renamed.