Skip to content

jeph/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

This repository is used to manage my dotfiles and other configuration files. It integrates with chezmoi to manage these files.

Setting up a new machine

To set up a new machine, first install chezmoi:

brew install chezmoi

Other installation options can be found here.

Next, run the following command to apply the dotfiles:

chezmoi init --apply Jeph

^ This will overwrite existing files so make sure to take a backup if there are any with content you care about.

After applying, create a local git config at ~/.gitconfig.local for your machine-specific identity/signing settings (this file is not managed by chezmoi):

[user]
    name = Your Name
    email = you@example.com
    signingkey = YOUR_SSH_SIGNING_KEY
[gpg]
    format = ssh
[gpg "ssh"]
    program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign
[commit]
    gpgsign = true

Optional: create ~/.zshrc.local for machine-specific shell config. ~/.zshrc sources it if it exists, and it is not managed by chezmoi. (The .local suffix here just means “local overrides”; it’s unrelated to the ~/.local/ directory.)

# ~/.zshrc.local
# Example:
# export PATH="/opt/homebrew/bin:$PATH"

Alternatively, if you want to see what changes chezmoi will make, you can run:

chezmoi init Jeph # Initiate chezmoi without applying changes
chezmoi diff

If you are happy with the changes that chezmoi will make then run:

chezmoi apply -v

You can edit files using the edit command:

chezmoi edit $FILE

or you can simply edit the files directly. chezmoi stores the files in ~/.local/share/chezmoi/ by default.

You can also use the following command to navigate to the chezmoi directory, but be aware that this will also open a new shell:

chezmoi cd

You can pull and apply the latest changes from your repo with:

chezmoi update -v

Workflows

Use the add command to add a new file to chezmoi or an existing file's changes:

chezmoi add $FILE

Use the apply command to update the working files with the source files:

chezmoi apply -v

As long as you already have initiated chezmoi and applied before, chezmoi should warn you if there are any conflicts.

To resolve conflicts, you can use the diff command to see the differences:

chezmoi diff

You can use the merge command to resolve the conflicts:

chezmoi merge $FILE

About

Repository for managing my dotfiles

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages