Skip to content

marchelbling/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

383 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

This repository aims at providing a simple way to (re)set a local environment.

Note: 607747a is the last revision relying on homemade scripts. Some of the existing configuration (e.g. screen, curl) have not been moved to the current setup.

Configuration files

The configuration files are managed via chezmoi.

References:

OSX

MacOS tools are managed via Homebrew. We rely on the bundle feature (see Brewfile).

Notes:

  • that this means applications should ideally be installed using App store (mas CLI) or brew cask to ensure reproducibility.
  • apps installed via App Store will be "frozen"
  • brew bundle dump --force will override an existing Brewfile which means that we cannot really add comments in the file: we therefore want to provide documentation when adding tools using dedicated commits.

Secrets

Passwords, secrets, SSH keys are managed with 1password. For example, git signing is done using SSH key signing.

1password CLI is installed automatically via the Brewfile during chezmoi init --apply. Run eval $(op signin) before the final chezmoi apply to allow secrets to be read.

After installing the 1Password app, two settings must be enabled manually in Settings → Developer:

  • CLI integration: allows op to authenticate via the desktop app (no need for eval $(op signin) on subsequent runs)
  • SSH agent: allows 1Password to serve SSH keys to the system

Cheatsheet

  1. chezmoi init marchelbling (marchelbling will be expanded to github.com/marchelbling/dotfiles.git)
  2. chezmoi cd: changes current directory to this repository
  3. chezmoi apply: copies chezmoi current definitions to their home destinations

New machine setup

  1. Install mise:
    curl https://mise.run | sh
  2. Add mise to your shell (temporary, will be configured properly by chezmoi):
    export PATH="$HOME/.local/bin:$PATH"
    eval "$(mise activate zsh)"  # or bash
  3. Install the 1password application; ⚠️ ensure to activate the CLI and setup the SSH agent as without it, chezmoi init will fail
  4. Install chezmoi via mise:
    mise use -g chezmoi
  5. Initialize and apply dotfiles (note that part of the setup will not be final in this stage as we need to install 1password cli):
    chezmoi init --apply marchelbling
  6. Sign into 1Password CLI (installed in the previous step via Brewfile):
    eval $(op signin)
  7. Finalize configuration:
    chezmoi apply

Neovim

Keymaps are documented in dot_config/nvim/KEYMAPS.md. That file is generated, not hand-written: inside Neovim run

:KeymapsDoc

to regenerate it from the live mappings (defined in lua/config/keymaps_doc.lua). Run it from a code buffer with your LSP attached so buffer-local LSP maps are captured. Then persist the result into this repo:

chezmoi re-add ~/.config/nvim/KEYMAPS.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors