handle symlink when removing chezmoi

This commit is contained in:
Alexander Navarro 2024-08-08 15:50:41 -04:00
parent 91526079fc
commit 3d28ac9260
5 changed files with 12 additions and 5 deletions

View file

@ -6,11 +6,11 @@ Please ensure the that git is installed and you have an ssh key registered,
then execute the following command: then execute the following command:
```bash ```bash
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin init --apply aleee-idk/mini-dots sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin init --promptBool 'keep chezmoi?=false' --apply aleee-idk/mini-dots
``` ```
To set up the dotfiles and then delete all traces of the manager, run: To set up the dotfiles and then delete all traces of the manager, run:
```bash ```bash
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply --one-shot aleee-idk/mini-dots sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin init --promptBool 'keep chezmoi?=false' --one-shot aleee-idk/mini-dots
``` ```

View file

@ -5,3 +5,4 @@
[data] [data]
osid = {{ $osid | quote }} osid = {{ $osid | quote }}
persistent = {{ promptBoolOnce . "persistent" "keep chezmoi?" true }}

View file

@ -1,2 +0,0 @@
**/original_*
.config/lazygit/state.yml

View file

@ -0,0 +1,4 @@
{{- if .persistent }}
**/original_*
{{ end }}
.config/lazygit/state.yml

View file

@ -1,2 +1,6 @@
{{ .chezmoi.sourceDir }}/dot_config/nvim/original_lazy-lock.json {{ if .persistent }}
{{ .chezmoi.sourceDir }}/dot_config/nvim/original_lazy-lock.json
{{ else }}
{{ .chezmoi.homeDir }}/.config/nvim/original_lazy-lock.json
{{ end }}