Install nix with the determinate systems installer:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- installsh -c "$(curl -fsLS get.chezmoi.io)" -- init apply bcvanmeursThis will download the dotfiles to ~/.local/share/chezmoi,
as we need the nix-darwin flakes to install the required software.
Install all software and packages:
nix run nix-darwin -- switch --flake ~/.local/share/chezmoi/dot_config/nix-darwin-
Allow the 1Password cli functionality from the UI.
-
Apply chezmoi
chezmoi status # check if everything works chezmoi apply -
Change your default shell
chsh -s $(which fish) -
Set remote to be through SSH
git remote set-url origin git@github.com:bcvanmeurs/dotfiles.git -
Import GPG key
gpg --import ~/.gnupg/gpg-github-0x7DFB3B93C5B98C91-2024-12-03.asc gpg --edit-key 0x7DFB3B93C5B98C91 trust quit
-
In tmux run
prefix + Ito install tpm packages.
- Using Age and YubiKeys for encryption (age-plugin-yubikey)
- SSH keys on YubiKeys with secret part in 1Password
- Using Nix for packages
- Using Brew for casks as these seem better maintained
- Headless install on linux
- Encryption dependencies
- Install dependencies
- Inspiration:
-
Follow this to create a key pair: https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/
-
Encrypt a yaml file in some place (in my example it is in data).
-
Use Go templating syntax to read and decrypt the file, for example:
{{- $work := include "data/work.yaml.age" | decrypt | fromYaml -}} export PIP_EXTRA_INDEX_URL={{ $work.pip_extra_index_url }}
{{ onepasswordRead "op://development/id_sk_nano/id_sk_nano.pub" }}chezmoi initrecreate configchezmoi --refresh-externalsupdate externals
chezmoi init $GITHUB_USERNAMEclones your dotfiles from GitHub into the source directory.chezmoi init --apply $GITHUB_USERNAMEclones your dotfiles from GitHub into the source directory and runschezmoi apply.chezmoi updatepulls the latest changes from your remote repo and runschezmoi apply.
chezmoi dataprints the available template data.chezmoi add --template $FILEadds$FILEas a template.chezmoi chattr +template $FILEmakes an existing file a template.chezmoi cat $FILEprints the target contents of$FILE, without changing$FILE.chezmoi execute-templateis useful for testing and debugging templates.
chezmoi state delete-bucket --bucket=scriptStateto clear the state of run once scripts.
chezmoi add $FILEadds$FILEfrom your home directory to the source directory.chezmoi edit $FILEopens your editor with the file in the source directory that corresponds to$FILE.chezmoi statusgives a quick summary of what files would change if you ranchezmoi apply.chezmoi diffshows the changes thatchezmoi applywould make to your home directory.chezmoi applyupdates your dotfiles from the source directory.chezmoi edit --apply $FILEis likechezmoi edit $FILEbut also runschezmoi apply $FILEafterwards.chezmoi cdopens a subshell in the source directory.