- Specify computer name
- Specify dotfiles path
- Tweak colors/theme
Set up variables using (in this particular order):
.env file provided by calling jkl with a --jkl-config <env_file> argument
- Xdg config file:
~/.config/jkl/cofig.env
- Environment variables
- 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.
Set up variables using (in this particular order):
.envfile provided by calling jkl with a--jkl-config <env_file>argument~/.config/jkl/cofig.env~/.config/jlk/jkl.envdirectly~/.config/jkl/jkl.env, think of malicious variables like:JKL_COMPUTER_NAME="$(rm -rf *)"JKL_COMPUTER_NAME="$HOME/.dotfiles") but prevent execution of code (as inJKL_COMPUTER_NAME="$(rm -rf *)"). Just disallowing the usage of$(as ineval "$(cat "$HOME/.config/jkl/jkl.env" | grep -E "^JKL_COMPUTER_NAME=\"[^\$]* *$|^JKL_FLAKE_DIR=\"[^\$]* *$")") is not an ideal solution