1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 11:03:31 +00:00

documentation

This commit is contained in:
deadc0de6
2022-09-03 15:58:11 +02:00
parent df775d4a4a
commit c9feccd028
26 changed files with 168 additions and 158 deletions

View File

@@ -2,7 +2,7 @@
Sometimes it might be useful to be able to append some text to a
file. Dotdrop is able to do that with the help of
[actions](../config-actions.md) and a temporary file.
[actions](../config/config-actions.md) and a temporary file.
Below is a config example to append to a file:
```yaml

View File

@@ -1,7 +1,7 @@
# Create files on install
One way to create symlinks (or any other special file) is to use a combination of
[actions](../config-actions.md) and a *fake* dotfile.
[actions](../config/config-actions.md) and a *fake* dotfile.
Let's say, for example, you have a list of directories you want to link
from under `~/.original` to `~/symlinks`.

View File

@@ -48,12 +48,12 @@ Dotdrop will then automagically include the files into your vimrc when handling
## Merge all files in a directory
To include all files in a directory, a combination of
[dynvariables](../config-dynvars.md)
[dynvariables](../config/config-dynvars.md)
and [Jinja2 directives](https://jinja.palletsprojects.com/en/2.11.x/) have to be used.
Let's say all files in `<dotpath>/toinclude` need to be included into a dotfile.
First define a [dynvariables](../config-dynvars.md)
First define a [dynvariables](../config/config-dynvars.md)
in the config file which will look for files to include in the above directory:
```yaml
dynvariables:

View File

@@ -1,12 +1,12 @@
# Prompt user for variables
With the use of [uservariables](../config-uservars.md),
With the use of [uservariables](../config/config-uservars.md),
one can define specific variables that need to be initially filled in manually
by the user on first run.
The provided values are then automatically saved by dotdrop to `uservariables.yaml`,
which can be included in the main config as a file from which variables are imported
using [import_variables](../config-config.md).
using [import_variables](../config/config-config.md).
Let's say, for example, that you want to manually provide the email value
on new hosts you deploy your dotfiles to.

View File

@@ -26,7 +26,7 @@ alias dotdrop='eval $(grep -v "^#" ~/dotfiles/.env) /usr/bin/dotdrop --cfg=~/dot
The above aliases load all the variables from `~/dotfiles/.env`
(while omitting lines starting with `#`) before calling dotdrop.
Defined variables can then be used [in the config](../config-file.md#template-config-entries)
Defined variables can then be used [in the config](../config/config-file.md#template-config-entries)
or [for templating dotfiles](../templating.md)
For more see [the doc on environment variables](../templating.md#environment-variables).
@@ -52,7 +52,7 @@ Now whenever you install/compare your dotfile, the `_decrypt` transformation wil
to get the clear version of the file.
When updating the `_encrypt` transformation will transform the file to store it encrypted.
See [transformations](../config-transformations.md).
See [transformations](../config/config-transformations.md).
## gpg examples
@@ -106,4 +106,4 @@ trans_write:
_encrypt: "echo {{@@ gpg_password @@}} | gpg -q --batch --yes --passphrase-fd 0 --no-tty -o {1} -c {0}"
```
See also [transformations](../config-transformations.md).
See also [transformations](../config/config-transformations.md).

View File

@@ -66,7 +66,7 @@ export DB_PORT='4521'
The previous method, albeit flexible, is a bit cumbersome for some use cases.
For example, when the dotfiles belong to different profiles, the cleanest
solution consists of using
[profile variables](../config-profiles.md#profile-variables-entry). This is achieved by:
[profile variables](../config/config-profiles.md#profile-variables-entry). This is achieved by:
1. Creating the merged dotfile with an arbitrary name somewhere in `dotpath`.
2. Adding some variables in the merged dotfile via templating.

View File

@@ -26,4 +26,4 @@ And the *write* transformation `compress` is run when updating the dotfile direc
tar -cf {1} -C {0} .
```
See [transformations](../config-transformations.md).
See [transformations](../config/config-transformations.md).

View File

@@ -117,10 +117,10 @@ $ tree -L 1 ~/.vim
## Templating symlinked dotfiles
Dotfiles not using any templating directives are directly linked
to dotdrop's `dotpath` directory (see [the config file doc](../config-file.md)).
to dotdrop's `dotpath` directory (see [the config file doc](../config/config-file.md)).
When using templating directives, however, the dotfiles are first installed into
`workdir` (defaults to *~/.config/dotdrop*; see [the doc](../config-config.md))
`workdir` (defaults to *~/.config/dotdrop*; see [the doc](../config/config-config.md))
and then symlinked there.
This applies to both dotfiles with `link: absolute|relative` and `link: link_children`.