-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Eggs | ||
|
||
An egg is one package of configuration, typically for one single application. | ||
For example, your editor configuration `~/.config/nvim` would likely be one egg called `nvim`. | ||
|
||
When you want to deploy a specific application configuration to your system, you deploy the corresponding egg using `yolk use`. | ||
You can create a new egg using `yolk add`, which will move the given paths into the `eggs` directory, | ||
create a new egg for you, and set up a symlink back to the original file location. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# The yolk.lua file | ||
|
||
The `yolk.lua` file is the heart of your Yolk configuration. | ||
It's where you define all of the variables and functionality you will then refer to inside your templates. | ||
|
||
## Basic structure | ||
|
||
The `yolk.lua` file is a Lua script that is run by Yolk to generate your configuration. | ||
It needs to contain at least two functions: `canonical_data()` and `local_data(system)`. | ||
|
||
Both of these return a table, which is then used by Yolk to generate your configuration. | ||
Inside your templates, yolk will make the table available under the global variable `data`. | ||
If yolk is currently generating the config for your local system, the `local_data` will be used. | ||
|
||
If yolk is evaluating the templates for use in version control, it will instead use the `canonical_data` function, which should return data that is fully stable across all systems. | ||
This allows yolk to keep a stable, consistent state in version control, while having a dynamic, system-specific state on your local machine. |