dot.yaml
Sections
The dot.yaml
file consists of four optional keys:
key | requirement | function |
---|---|---|
links | optional | Defines where to link which dotfile |
installs | optional | Defines the install command and install dependencies. |
depends | optional | Defines dependencies this application needs to work. |
links
The links
section specifies where the dotfiles should be linked.
It consists of multiple key: value
pairs where the key
is the filename of the dotfile
and the value
is the link path.
- yaml
- toml
- json
...
links:
keybindings.json: ~/AppData/Roaming/Code/User/keybindings.json
settings.json: ~/AppData/Roaming/Code/User/settings.json
...
[links]
'keybindings.json' = '~/AppData/Roaming/Code/User/keybindings.json'
'settings.json' = '~/AppData/Roaming/Code/User/settings.json'
{
...
"links": {
"keybindings.json": "~/AppData/Roaming/Code/User/keybindings.json",
"settings.json": "~/AppData/Roaming/Code/User/settings.json"
}
}
installs
The installs
section contains the install command and optional install dependencies.
It can either be a string
containing the install command or have two sub keys.
key | requirement | function |
---|---|---|
cmd | required | Contains the install command. |
depends | optional | Contains an array of dependencies. |
- yaml
- toml
- json
...
installs:
cmd: scoop install nodejs
depends:
- scoop
...
[installs]
cmd = 'scoop install nodejs'
depends = [
'scoop',
]
{
...
"installs": {
"cmd": "scoop install nodejs",
"depends": [
"scoop"
]
}
}
- yaml
- toml
- json
...
installs: iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
...
installs = "iex (new-object net.webclient).downloadstring('https://get.scoop.sh')"
{
...
"installs": "iex (new-object net.webclient).downloadstring('https://get.scoop.sh')"
}
The command can also be set to false
. This overwrites the value set in the defaults dots.yaml
file.
depends
The depends
section contains an array of dependencies needed for the application to work correctly.
These dependencies will also be installed when the application is installed.
- yaml
- toml
- json
...
depends:
- starship
...
depends = [
'starship',
]
{
...
"depends": [
"starship"
]
}
Nesting
If you have dots nested in subdirectories dependencies need to specify them as a path.
This can either be a path relative to the current dot or an absolute path (the dotfiles repo is used as root).
- yaml
- toml
- json
├── some
│ └── thing
│ └── nested
│ └── dot.yaml
└── other
└── directory
└── dot.yaml
├── some
│ └── thing
│ └── nested
│ └── dot.toml
└── other
└── directory
└── dot.toml
├── some
│ └── thing
│ └── nested
│ └── dot.json
└── other
└── directory
└── dot.json
- yaml
- toml
- json
depends:
- ../../other/directory
depends = [
'../../other/directory',
]
{
"depends": [
"../../other/directory"
]
}
- yaml
- toml
- json
depends:
- /other/directory
depends = [
'/other/directory',
]
{
"depends": [
"/other/directory"
]
}