Simple configuration manager for dotfiles and system configuration files
{
"type": "files",
"files": [
{
"src": ".zshrc",
"dest": "~/.zshrc"
}
]
}
{
"type": "repository",
"repository": "https://github.com/mrivnak/neovim-config",
"reference": {
"type": "branch",
"value": "main"
},
"path": "~/.config/nvim"
}
File Templating with Tera
{% if hostname == "gentoo-desktop" -%}
monitor=DP-1, 3440x1440@165.00, 2560x0, 1
monitor=DP-2, 2560x1440@239.96, 0x0, 1
{% elif hostname == "gentoo-laptop" -%}
monitor=eDP-1, 2560x1440@165.00, 0x0, 1
{%- endif %}
Secrets that may be stored in existing config files, like an API key for a weather toolbar, can be obfuscated from your dotfiles repo and added on apply
<fixture_dir>/secrets.json
{
"API_KEY": "12345abcde"
}
file.conf
get-data --api-key {{ API_KEY }}
Requires Rust >=1.67
git clone https://github.com/mrivnak/spaceconf
cd spaceconf
cargo install --path .
spaceconf clone https://github.com/<username>/<dotfiles-repo>
You can then create subfolders in ~/.config/spaceconf/
with fixture.json
files and associated config files. Then run...
spaceconf apply