Skip to content
michaelheymanPublic

About

My personal dotfiles managed by chezmoi.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

365 Commits

Folders and files

Repository files navigation

dotfiles

My personal dotfiles, managed by chezmoi.

Description

This is a configuration-driven set of dotfiles that allows me to version control my development environment and keep it consistent across multiple machines. It uses chezmoi to manage configurations for different operating systems (macOS and Linux) and environments.

Optional

This repository can be installed via HTTPS or SSH. In order to install via SSH, you must set up SSH authentication with GitHub.

Installation

You can install chezmoi and initialize your dotfiles from this repository with a single command. This will also apply the changes to your home directory.

If you prefer to review the changes before applying them, you can omit the --apply flag and then run chezmoi diff to see a preview and chezmoi apply -v to execute the changes.

Install via SSH (Recommended)

sh -c "$(curl -fsLS get.chezmoi.io/lb)" -- init --apply git@github.com:michaelheyman/dotfiles.git

Install via HTTPS

sh -c "$(curl -fsLS get.chezmoi.io/lb)" -- init --apply https://github.com/michaelheyman/dotfiles.git

Install on Synology NAS

Two DSM-specific issues require workarounds:

  1. The standard install script fails with unable to determine libc — use the statically-linked musl build instead, which has no libc dependency.
  2. DSM mounts /tmp with noexec, so chezmoi can't execute its temporary scripts there — set TMPDIR to a directory under your home folder.
mkdir -p ~/.local/bin ~/.local/tmp
curl -sL "https://github.com/twpayne/chezmoi/releases/download/v2.69.4/chezmoi-linux-amd64-musl" \
    -o ~/.local/bin/chezmoi
chmod +x ~/.local/bin/chezmoi
TMPDIR=~/.local/tmp ~/.local/bin/chezmoi init --apply https://github.com/michaelheyman/dotfiles.git

Development and Testing

To make changes to your dotfiles, you can edit the source files directly and then apply them.

  1. Edit a file: Use chezmoi edit to open a file in your editor.

    chezmoi edit ~/.bashrc
  2. Apply changes: Run chezmoi apply to apply any pending changes.

    chezmoi apply -v
  3. Commit and push changes: The source directory (~/.local/share/chezmoi) is a git repository. Commit and push your changes as you would with any other repository.

    chezmoi cd
    git add .
    git commit -m "Add new feature"
    git push

    task install installs the pinned tools (via mise) and a pre-commit hook that checks every commit. To run the same checks on every file:

    task lint

Testing with Docker

A Dockerfile is included in the .docker/ directory to provide a clean environment for testing your dotfiles on Linux.

  1. Build the Docker image: From the root of the repository, run:

    task docker:build
  2. Run the container: The Dockerfile is configured to automatically run chezmoi apply. You can run the container interactively to see the results:

    task docker:run

About

My personal dotfiles managed by chezmoi.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages