This is my personal dotfiles (configuration and settings for each program).
Below are a list of configuration I have on each categories.
- Zsh configuration
- Homebrew packages
- You can find list of packages here
- Commandline interface (cli)
- You can find list of cli here
Run chezmoi init kc-workspace --apply
to initialize and apply config to your machine.
https://www.chezmoi.io/user-guide/daily-operations/ https://www.chezmoi.io/user-guide/command-overview/
Below are a list of useful commands.
Similar to update but initiatize new local directories.
sequenceDiagram
participant T as Target directory
participant S as Source directory
participant L as Local repository
participant R as Remote repository
R ->> S: pull
S ->> T: apply (when add --apply)
## chezmoi init kc-workspace --apply
chezmoi init "<repo>" [--apply]
Similar to init but to update existed local directories.
sequenceDiagram
participant T as Target directory
participant S as Source directory
participant L as Local repository
participant R as Remote repository
R ->> T: pull & apply
chezmoi update
sequenceDiagram
participant T as Target directory
participant S as Source directory
participant L as Local repository
participant R as Remote repository
S -> T: diff
S ->> T: apply
## View the different between work state and local machine
chezmoi diff
chezmoi apply
sequenceDiagram
participant T as Target directory
participant S as Source directory
participant L as Local repository
participant R as Remote repository
T -> S: add [with encrypt (optionally)]
chezmoi add "<filepath>"
chezmoi add --encrypt "<filepath>"
This will only remove file from source directory, not target directory
sequenceDiagram
participant T as Target directory
participant S as Source directory
participant L as Local repository
participant R as Remote repository
S -> S: remove file/folder
chezmoi forget "<filepath>"
## Without GITHUB_TOKEN environment, mise might failed due to rate-limit exceed
docker buildx build --tag kamontat/dotfiles:local .
## Assume you have $GITHUB_TOKEN environment set
docker buildx build --secret id=GITHUB_TOKEN --tag kamontat/dotfiles:local .
The docker image will contains all applications need for everyday works without secure information.
To configure secure information (e.g. gpg, ssh, etc.), run kdf-setup.sh
command to fully set up the chezmoi.
The kdf-setup.sh
script will verify the result after finished. To verify manually, use kdf-verify.sh
script.
## initiate zsh shell session
docker run -it --rm kamontat/dotfiles:local
All docker image have attestations. You can verify the integrity and provenance of an artifact using its associated cryptographically signed attestations.
The output of the verify command should contains as following information:
- Verify status:
✓ Verification succeeded!
- Repository where image was created
- Workflow and Git Reference where image was created
To verify Docker Hub image:
# gh attestation verify oci://kamontat/dotfiles:latest --owner kc-workspace
$ gh attestation verify "oci://kamontat/dotfiles:<tag-name>" --owner kc-workspace
...
✓ Verification succeeded!
...
To verify GitHub Container Registry image:
## Add read:packages scope to read image from ghcr.
## You may need to login first: https://cli.github.com/manual/gh_auth_login
$ gh auth refresh --scopes "read:packages"
# gh auth token | docker login "ghcr.io" --username "kamontat" --password-stdin
$ gh auth token | docker login "ghcr.io" --username "<username>" --password-stdin
# gh attestation verify "oci://ghcr.io/kc-workspace/dotfiles:latest" --owner kc-workspace
$ gh attestation verify "oci://ghcr.io/kc-workspace/dotfiles:<tag-name>" --owner kc-workspace
...
✓ Verification succeeded!
...