Personal fork of https://nest.pijul.com/pijul/pijul

Refactor `pijul-config` to support layered configuration

Adds a pijul_config::Config struct that uses the figment crate to merge global and local configuration files.

Notable changes:

  • Created a unified pijul_config::Config struct that merges user configuration from global/local config files
  • Created a pijul_config::Shared struct containing all of the configuration options that can be used in both global and local config files
  • Created pijul_config::{global::Global, local::Local} structs that contain global/local-specific options along with the shared options (these are what get serialized/deserialized on disk)
  • Removed pijul_config::Remote - it it seemed to be completely unused and a duplicate of pijul_config::RemoteConfig (now renamed to pijul_config::Remote to replace it)
  • Moved local configuration management from pijul_repository to pijul_config

Future work:

  • pijul_config::shell_cmd() should be moved to pijul_remote
  • Additional configuration layers (environment variables, global --config flag)
  • Centralize all configuration management on the pijul_config crate (currently subcommands have various hacks that can be removed)

Since this is already quite a large change, migration of the codebase to this refactored crate will happen in a different change.

Created by  finchie  on July 27, 2025
Z4PPQZUGHT5F5VFFBQBIW2J3OLHP4SF33QMT6POFCX6JS7L6G7GQC
Dependencies
In channels
main
Change contents