Skip to content

Consider using a configuration file inside xdg config dir #7

Description

@cortsf
  • Specify computer name
  • Specify dotfiles path
  • Tweak colors/theme

Set up variables using (in this particular order):

  1. .env file provided by calling jkl with a --jkl-config <env_file> argument
  2. Xdg config file: ~/.config/jkl/cofig.env
  3. Environment variables
  4. Defaults
  • Don't trust and source ~/.config/jlk/jkl.env directly
  • Don't just filter out irrelevant declarations from ~/.config/jkl/jkl.env, think of malicious variables like: JKL_COMPUTER_NAME="$(rm -rf *)"
  • Allow using variables (as in JKL_COMPUTER_NAME="$HOME/.dotfiles") but prevent execution of code (as in JKL_COMPUTER_NAME="$(rm -rf *)"). Just disallowing the usage of $ (as in eval "$(cat "$HOME/.config/jkl/jkl.env" | grep -E "^JKL_COMPUTER_NAME=\"[^\$]* *$|^JKL_FLAKE_DIR=\"[^\$]* *$")") is not an ideal solution
  • Keep codebase as dumb and simple as possible and do not introduce any dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions