config.yaml
The following settings are configurable in the config file like so:
- yaml
- toml
- json
config.yaml
dotfiles: <path to dotfiles>
link_type: <'symbolic'|'hard'>
shell_command: <shell command template used for the install command>
variables: <map of variables which can be used in templates>
config.toml
dotfiles = '<path to dotfiles>'
link_type = "<'symbolic'|'hard'>"
shell_command = '<shell command template used for the install command>'
variables = '<map of variables which can be used in templates>'
config.json
{
"dotfiles": "<path to dotfiles>",
"link_type": "<'symbolic'|'hard'>",
"shell_command": "<shell command template used for the install command>",
"variables": "<map of variables which can be used in templates>"
}
Those settings can be overridden in the cli when applicable (see rotz --help
and rotz <command> --help
to get more information).
shell_command
This setting allows to specify how Rotz should launch the install command.
If this is not set the default values are used.
- yaml
- toml
- json
Windows
shell_command: powershell -NoProfile -C {{ quote "" cmd }}
Windows
shell_command = 'powershell -NoProfile -C {{ quote "" cmd }}'
Windows
{
"shell_command": "powershell -NoProfile -C {{ quote \"\" cmd }}"
}
- yaml
- toml
- json
Linux
shell_command: bash -c {{ quote "" cmd }}
Linux
shell_command = 'bash -c {{ quote "" cmd }}'
Linux
{
"shell_command": "bash -c {{ quote \"\" cmd }}"
}
- yaml
- toml
- json
MacOS
shell_command: zsh -c {{ quote "" cmd }}
MacOS
shell_command = 'zsh -c {{ quote "" cmd }}'
MacOS
{
"shell_command": "zsh -c {{ quote \"\" cmd }}"
}
variables
These variables can be used in templates.
- yaml
- toml
- json
config.yaml
variables:
some: value
array:
- one
- two
config.toml
[variables]
some = 'value'
array = [
'one',
'two',
]
config.json
{
"variables": {
"some": "value",
"array": [
"one",
"two"
]
}
}
Repo defaults
It is possible to put a config file in your repo containing default values depending on the OS. These are overridden by the config file on the machine.
- yaml
- toml
- json
.dotfiles/config.yaml
global:
link_type: <globalDefault>
windows:
dotfiles: <windowsDefault>
linux:
dotfiles: <linuxDefault>
darwin:
dotfiles: <macosDefault>
.dotfiles/config.toml
[global]
link_type = '<globalDefault>'
[windows]
dotfiles = '<windowsDefault>'
[linux]
dotfiles = '<linuxDefault>'
[darwin]
dotfiles = '<macosDefault>'
.dotfiles/config.json
{
"global": {
"link_type": "<globalDefault>"
},
"windows": {
"dotfiles": "<windowsDefault>"
},
"linux": {
"dotfiles": "<linuxDefault>"
},
"darwin": {
"dotfiles": "<macosDefault>"
}
}
If no
global
,windows
,linux
ordarwin
key is provided theglobal
key will be assumed.
- yaml
- toml
- json
.dotfiles/config.yamllink_type: <globalDefault>
.dotfiles/config.tomllink_type = '<globalDefault>'
.dotfiles/config.json{
"link_type": "<globalDefault>"
}