This commit is contained in:
Harivansh Rathi 2026-03-13 16:44:38 -04:00
parent fc8675e1b0
commit 550fca2383
13 changed files with 151 additions and 163 deletions

View file

@ -6,6 +6,8 @@
claudePackage =
inputs.claudeCode.packages.${pkgs.stdenv.hostPlatform.system}.default;
in {
# Keep the managed Claude binary on the same path the live machine was using
# so the Nix package cleanly replaces the prior manual install.
home.file.".local/bin/claude".source = "${claudePackage}/bin/claude";
home.file.".claude/CLAUDE.md".source = ../config/claude/CLAUDE.md;
home.file.".claude/commands" = {

View file

@ -10,6 +10,7 @@
./karabiner.nix
./k9s.nix
./lazygit.nix
./migration.nix
./nvim.nix
./rectangle.nix
./tmux.nix

29
home/migration.nix Normal file
View file

@ -0,0 +1,29 @@
{lib, ...}: {
# Transitional cleanup for files previously owned by ~/dots. Keeping this
# separate from steady-state modules makes it obvious what can be deleted
# once every managed path has been fully handed over to Home Manager.
home.activation.removeLegacyZshLinks = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
for path in "$HOME/.zshenv" "$HOME/.zshrc"; do
if [ -L "$path" ]; then
target="$(readlink "$path")"
case "$target" in
dots/zsh/*|"$HOME"/dots/zsh/*)
rm -f "$path"
;;
esac
fi
done
'';
home.activation.removeLegacyTmuxLink = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
path="$HOME/.config/tmux/tmux.conf"
if [ -L "$path" ]; then
target="$(readlink "$path")"
case "$target" in
../../dots/tmux/*|dots/tmux/*|"$HOME"/dots/tmux/*)
rm -f "$path"
;;
esac
fi
'';
}

View file

@ -1,16 +1,4 @@
{lib, ...}: {
home.activation.removeLegacyTmuxLink = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
path="$HOME/.config/tmux/tmux.conf"
if [ -L "$path" ]; then
target="$(readlink "$path")"
case "$target" in
../../dots/tmux/*|dots/tmux/*|"$HOME"/dots/tmux/*)
rm -f "$path"
;;
esac
fi
'';
programs.tmux = {
enable = true;
extraConfig = ''
@ -40,12 +28,6 @@
bind K switch-client -p
bind L switch-client -n
# Switch sessions with prefix + H/J/K/L (capital)
bind J switch-client -n
bind K switch-client -p
bind H switch-client -p
bind L switch-client -n
# fzf pane switcher
bind f display-popup -w 80% -h 80% -E "\
tmux list-panes -a -F '#{session_name}:#{window_index}.#{pane_index} #{session_name}/#{window_name} [#{pane_current_command}] #{pane_current_path}' \

View file

@ -7,19 +7,6 @@
home.file.".oh-my-zsh/custom/themes/agnoster.zsh-theme".source =
../config/agnoster.zsh-theme;
home.activation.removeLegacyZshLinks = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
for path in "$HOME/.zshenv" "$HOME/.zshrc"; do
if [ -L "$path" ]; then
target="$(readlink "$path")"
case "$target" in
dots/zsh/*|"$HOME"/dots/zsh/*)
rm -f "$path"
;;
esac
fi
done
'';
home.activation.ensureOhMyZshCache = lib.hm.dag.entryAfter ["writeBoundary"] ''
mkdir -p "${config.xdg.cacheHome}/oh-my-zsh"
'';
@ -56,6 +43,9 @@
envExtra = ''
. "$HOME/.cargo/env"
# Ghostty shell integration expects a resource directory; the Nix app
# bundle lives in the store instead of /Applications.
export GHOSTTY_RESOURCES_DIR="${pkgs.ghostty-bin}/Applications/Ghostty.app/Contents/Resources/ghostty"
'';