All gists

Last active 1 month ago
0 0 1

Encrypt Rclone Config

rclone can encrypt its configuration file behind a password. There are different levels of security to observe depending on the environment.

Single User Home Machine

For a machine that only has a single user, i.e. a personal device, it's secure enough to export your Rclone decryption password to the environment variable RCLONE_CONFIG_PASS. You should not do something like adding export RCLONE_CONFIG_PASS=my-rclone-secure-password to ~/.bashrc. The password should be sourced as-needed, i.e. in a script or from the CLI, and cleared on session exit.

To do this:

Last active 1 month ago
0 0 1

Chezmoi 3-Way Diff Merge

When running chezmoi merge ~/path/to/file.ext, you may encounter a warning about the files being out of date, with the option to cancel, merge, or overwrite. If you choose to merge, a 3-way diff will open, and the controls are confusing.

In the 3-column diff view, the middle column will be the "keep" file. You merge changes into the middle from either the left or the right, by selecting that column and the line you want to merge using :diffget 1

Steps:

  • Ctrl-w l: Move from left pane to middle pane
  • :diffget 1: Copy the differing hunk from pane/buffer 1, the left destination, into the middle source