My Awesome Dotfiles

July 12, 2026 ยท View on GitHub

My dotfiles collection for a flawless workflow. Starring zsh, nvim, zellij, and NixOS.

Screenshot

Bootstrapping NixOS

Warning

All data will be erased to install NixOS! These instructions are not indented for any users but myself (@maxbrunet), read scripts carefully!

  1. Download and boot the NixOS installer

  2. If using WiFi, connect to it:

    wpa_passphrase <ESSID> | sudo tee /etc/wpa_supplicant.conf
    sudo wpa_supplicant -B -i wlp3s0 -c /etc/wpa_supplicant.conf
    
  3. Run bootstrap script:

    sudo -i
    nix-env -iA nixos.git
    git clone https://github.com/maxbrunet/dotfiles.git
    cd dotfiles
    ./scripts/bootstrap.sh <HOSTNAME>
    reboot
    
  4. Generate SSH key:

    /etc/nixos/scripts/generate-ssh-key.sh
    
  5. Install Rust toolchain:

    rustup toolchain install stable --component rust-analyzer
    

Note

If running in VirtualBox, ensure:

  • EFI is enabled
  • 3D acceleration is enabled
  • Solid-state Drive is checked for the virtual disk

Bootstrapping macOS

At least it is not Windows.

  1. Install Nix

  2. Log out and log back in to load the new shell profiles installed by Nix (possibly restart)

  3. Install the dotfiles:

    sudo mkdir /etc/nix-darwin
    sudo chown "${UID}:${GID}" /etc/nix-darwin
    # Git is not installed, so curl and tar are used to get a copy of the repository
    curl --proto '=https' --tlsv1.2 -sSfL https://github.com/maxbrunet/dotfiles/archive/HEAD.tar.gz \
      | tar xvf - --strip-components=1 -C /etc/nix-darwin
    cd /etc/nix-darwin
    
  4. Prepare system for nix-darwin:

    sudo mv /etc/bashrc /etc/bashrc.orig
    sudo mv /etc/shells /etc/shells.orig
    sudo mv /etc/zshrc /etc/zshrc.orig
    sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.orig
    
  5. Install Command Line Tools for Xcode (required by Homebrew)

    xcode-select --install
    
  6. Install Rosetta:

    softwareupdate --install-rosetta --agree-to-license
    
  7. Install nix-darwin:

    nix --extra-experimental-features 'flakes nix-command' build ".#darwinConfigurations.$(scutil --get LocalHostName).system"
    ./result/sw/bin/darwin-rebuild switch
    
  8. Change login shell to Nix's Zsh:

    chsh -s /run/current-system/sw/bin/zsh maxime
    
  9. Log out and log back in to load the new shell profiles installed by nix-darwin (possibly restart)

  10. Git should now be available, fetch the Git tracking data:

    cd /etc/nix-darwin
    git init
    git remote add --fetch origin https://git@github.com/maxbrunet/dotfiles.git
    git reset origin/HEAD
    git remote set-url origin git@github.com:maxbrunet/dotfiles.git
    
  11. Configure SSH client:

ssh-keygen -t ed25519 -a 100
cat >>~/.ssh/config <<EOF
Host *
  SetEnv LC_ALL=C
  UseKeychain yes
EOF
  1. Set up Podman machine for k3d:
# https://github.com/k3d-io/k3d/issues/1082
podman machine ssh bash -e <<EOF
echo 'Delegate=cpuset' | sudo tee -a /etc/systemd/system/user@.service.d/delegate.conf
sudo systemctl daemon-reload
sudo systemctl restart user@\${UID}
EOF