diff --git a/README.md b/README.md index 4e1c7e0..4aea171 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,46 @@ # dotfiles -My personal dotfiles and configurations, generated from templates with Mako! +My personal dotfiles and configurations, generated from Jinja2 templates. ## Contents -- `install.py` - The script that generates and installs the templates. (Requires Mako) +- `install.py` - The script that generates and installs the templates. (Requires + the virtual environment specified using Pipenv) - `install` - Updates submodules and runs `pipenv run install.py "$@"`. -- `hosts` - Host-specific configuration files. +- `hosts/` - Host-specific configuration files. - `templates/` - The set of base template files. -- `include/` - Template files that do not map directly to a generated file. - - `raw/` - Raw files to be copied directly to the home directory (useful for submodules). -## How it Works +## How it works -For each file in the `templates/` directory (recursively), the installation script -will parse and render it as a Mako template and output it with the same path but -relative to the home directory. Mako is configured to look for additional files in the -`include/` directory if they don't exist in `templates/`, so use that if you reference -other template files that aren't supposed to be rendered as a standalone file. +The host configuration is parsed from the file in `hosts/` that corresponds to +the hostname. This file mainly contains system information like the size and +position of monitors and the names of the built-in network interfaces. -## Requirements - -Basic requirements (`install`): - -- pipenv - -Low-level requirements (`install.py`): - -- mako -- toml +Then, for each file in the `templates/` directory (recursively), the script will +parse and render it as a Jinja2 template with the host's configuration as an +input variable. The result will be written to the same path but relative to the +home directory. Any `.j2` file suffix will also be automatically stripped. ## Installation -Made easy by the `install` script. Use `install --help` to see customization options. +Made easy by the `install` script. Use `install --help` to see customization +options. + +Before running, set up the Python virtual environment with `pipenv install`. + +## Questions/Comments/Contributing + +At the time of writing, this project is hosted on a Forgejo instance at +. Because Forgejo [doesn't yet][federation-roadmap] +support federated issues/PRs, I am accepting any comments or patches at +`adam@gaussian.dev`. If you want to send a patch and don't know how, a simple +text file attachment with the contents of `git show` will work. However, if +you're already familiar with [`git send-email`], that is also fine with me! + +[federation-roadmap]: https://codeberg.org/forgejo-contrib/federation +[`git send-email`]: https://git-send-email.io