yolk_dots

Crates.ioyolk_dots
lib.rsyolk_dots
version
sourcesrc
created_at2024-12-08 21:14:26.592236
updated_at2024-12-09 20:57:56.195885
descriptionTemplated dotfile management without template files
homepagehttps://elkowar.github.io/yolk
repositoryhttps://github.com/elkowar/yolk
max_upload_size
id1476704
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
ElKowar (elkowar)

documentation

README

Yolk – Painfree Templated Dotfile Management

Static Badge Crates.io Version GitHub Release GitHub License

Yolk is a dotfile management tool with a unique spin on templating, sitting somewhere in between GNU Stow and chezmoi.

WARNING

This is pre-alpha software. In its current state, do not trust it. At all. Always make backups of everything before trying to use yolk, until it's in a stable state.

You have been warned.

The Concept

Yolk allows you to use simple templates in your configuration files without having to worry about keeping a separate template file and the generated config file in sync. This is achieved through a design that allows all templates to be included inside comments in your actual configuration file.

Let's demonstrate:

# Use a different font on one host
# {% if SYSTEM.hostname == "epic-desktop" %}
font="Fira Code"
# {% else %}
#<yolk> font="Iosevka"
# {% end %}

[colors]
# Load your colors from your yolk configuration
background="#282828" # {< replace_color(data.colors.background) >}
foreground="#ebdbb2" # {< replace_color(data.colors.foreground) >}

Yolk will now be able to run the corresponding modifications on the file itself, allowing you to set templated values while keeping the template directly in the same file.

User Configuration

Yolk template expressions and configuration are written in the Luau scripting language. You can provide custom data to use in your templates via the yolk.lua file in your yolk directory, which allows you to fetch data dynamically from your system, or reference different static data depending on your system.

Version Control

How does this work with git? Given that the concrete files in use on your system may be different across machines, adding those to version control directly would result in a lot of merge conflicts frequently. Yolk solves this by only commiting a "canonical" version of your templates, generated right before you commit. This means that the version of your configuration seen in git will always be generated from a consistent, stable context.

Commit count: 179

cargo fmt