My dotfiles collection for a flawless workflow. Starring zsh
, nvim
, tmux
, and NixOS.
Warning
All data will be erased to install NixOS! These instructions are not indented for any users but myself (@maxbrunet), read scripts carefully!
-
Download and boot the NixOS installer
-
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
-
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
-
Generate SSH key:
/etc/nixos/scripts/generate-ssh-key.sh
-
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
At least it is not Windows.
-
Install Homebrew
-
Install Nix
-
Install the dotfiles:
mkdir -p ~/.config git clone https://github.com/maxbrunet/dotfiles.git ~/.config/darwin cd ~/.config/darwin git remote set-url origin git@github.com:maxbrunet/dotfiles.git
-
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 printf 'run\tprivate/var/run\n' | sudo tee -a /etc/synthetic.conf /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t
-
Install nix-darwin:
nix --extra-experimental-features 'flakes nix-command' build ".#darwinConfigurations.$(scutil --get LocalHostName).system" ./result/sw/bin/darwin-rebuild switch --flake .
-
Change login shell to Nix's Zsh:
chsh -s /run/current-system/sw/bin/zsh maxime
-
/run/current-system/sw/bin/infocmp -x tmux-256color >tmux-256color.src /usr/bin/tic -o ~/.terminfo -x tmux-256color.src rm -f tmux-256color.src
-
Configure SSH client:
ssh-keygen -t ed25519 -a 100 cat >>~/.ssh/config <<EOF Host * SetEnv LC_ALL=C UseKeychain yes EOF
-
Set up Podman machine:
sudo podman-mac-helper install podman machine init --cpus=4 --memory=4096 --now # 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 cat >>~/.ssh/config <<EOF Host localhost IdentityFile $(podman machine inspect --format='{{.SSHConfig.IdentityPath}}') EOF