Skip to content
IslamTayebPublic

About

My shell/editor config managed with Nix

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

233 Commits

Folders and files

Repository files navigation

dotfiles

Nix/Home Manager dotfiles for my shell, editor, tmux, CLI tools, and app configs.

Install on a new machine

curl -fsSL https://raw.githubusercontent.com/IslamTayeb/dotfiles/main/bootstrap.sh | bash

The bootstrap script will:

  • install Nix if needed
  • enable flakes
  • clone this repo to ~/.config/nix-config
  • detect username@hostname and system architecture
  • add the machine to flake.nix if missing
  • run scripts/install.sh to activate Home Manager

If Nix is already installed and you cannot use sudo, run:

curl -fsSL https://raw.githubusercontent.com/IslamTayeb/dotfiles/main/bootstrap-no-sudo.sh | bash

Add a new host

Bootstrap adds the detected machine to flake.nix automatically. If it cannot, add it under homeConfigurations:

"username@hostname" = mkHomeConfig "x86_64-linux" "username" [ ];

Use the detected system from the bootstrap output, such as aarch64-darwin, x86_64-darwin, x86_64-linux, or aarch64-linux.

Then run:

cd ~/.config/nix-config
./scripts/install.sh

After install

gh auth login        # optional, avoids GitHub rate limits/private repo issues
nvim                 # let LazyVim finish plugin setup
tmux                 # tmux/TPM plugins are installed by the setup

The installer may ask to make zsh the default shell.

Update

cd ~/.config/nix-config
git pull
./scripts/update.sh

scripts/update.sh updates flake inputs, rebuilds Home Manager, and switches to the new generation.

Ghostty

The shared terminal config lives at configs/ghostty/config.ghostty and Home Manager links it to ~/.config/ghostty/config.ghostty. Per-machine look (theme, font size, padding, cursor) lives in configs/ghostty/hosts/<username>.ghostty, linked to ~/.config/ghostty/host.ghostty and pulled in by the shared file's config-file = ?host.ghostty line. Ghostty 1.3.1 still also loads a plain config file, so do not add one. On macOS Ghostty searches ~/Library/Application Support/com.mitchellh.ghostty/config* first, so keep that directory free of config files or it will shadow the dotfiles config.

The config sets no font-family: Ghostty's built-in JetBrains Mono plus its bundled Symbols Nerd Font fallback already cover the powerlevel10k nerdfont-v3 icons, so a new machine needs no font installed. Check with:

ghostty +validate-config
ghostty +show-config --changes-only
ghostty +show-face --string=""

Edit things

  • Packages: home.packages in home.nix
  • Hosts: homeConfigurations in flake.nix
  • Shell: configs/shell/
  • Neovim: configs/nvim/
  • Tmux: configs/tmux/
  • Ghostty: configs/ghostty/config.ghostty
  • OpenCode: configs/opencode/
  • Codex profiles and personal skills: configs/codex/
  • Other app configs: configs/<app>/

Home Manager symlinks managed configs into your home directory.

Codex sync

Dotfiles installs portable Codex state with:

./scripts/sync-codex.sh --profile auto --write-config

This syncs personal skills and a host-specific ~/.codex/config.toml, backing up the previous config first. It does not sync Codex auth, sessions, logs, caches, state databases, or app-server sockets.

Profiles currently include macos, resembool, typhon, and generic linux.

Recover

Rollback to the previous Home Manager generation:

home-manager generations
home-manager switch --rollback

If Home Manager fails because a config path already exists, move the old path aside and rerun the update:

mv ~/.config/opencode ~/.config/opencode.backup
./scripts/update.sh

Replace opencode with the conflicting config directory if needed.

About

My shell/editor config managed with Nix

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages