https://github.com/er1c-zh/dotbot-secret
Dotbot plugins for decrypt private file.
https://github.com/er1c-zh/dotbot-secret
dotbot dotbot-plugin
Last synced: 3 months ago
JSON representation
Dotbot plugins for decrypt private file.
- Host: GitHub
- URL: https://github.com/er1c-zh/dotbot-secret
- Owner: er1c-zh
- Created: 2021-06-23T15:51:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-08T00:30:41.000Z (over 1 year ago)
- Last Synced: 2024-08-13T07:08:21.812Z (6 months ago)
- Topics: dotbot, dotbot-plugin
- Language: Python
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- jimsghstars - er1c-zh/dotbot-secret - Dotbot plugins for decrypt private file. (Python)
README
# dotbot-secret
dotbot plugins for encrypt/decrypt private file.
# usage
## dotbot config
dotbot-secret will encrypt file in `src_path` and write to `dst_path`.
```yaml
- decrypt:
-
src_path: './encrypt'
dst_path: './decrypt'
- ['src_path', 'dst_path']- encrypt:
-
src_path: './decrypt'
dst_path: './encrypt'
- ['src_path', 'dst_path']
```## sample

## best practice
1. Add dotbot-secret as a submodule in your dotfiles repo and sync it when init dotbot.
```shell
git submodule add https://github.com/er1c-zh/dotbot-secret.git
```1. Modify `install` script with `--except encrypt` action.
```shell
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" --plugin-dir ./dotbot-secret --except encrypt "${@}"
```
1. Create [another `install` script named `do_encrypt`](https://github.com/er1c-zh/dotfiles/blob/master/do_encrypt)
with `--only encrypt` for encrypt only,
then use `do_encrypt` to encrypt files.
```shell
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" --plugin-dir ./dotbot-secret --only encrypt "${@}"
```