From c8f8a9bc276cb90784919a00683dc81c2bb6e306 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 12 Oct 2026 21:10:44 +0000 Subject: [PATCH] Port shell and Neovim aspects, ignore Serena state Replace the T3 stubs with the zsh/starship/fzf/zoxide/eza/bat/direnv/btop/fastfetch aspect (homeManager.shell) and the Neovim aspect (homeManager.neovim, initLua read from the unchanged init.lua), both ported from 030e97e without the my.home.* option wrapper. Neovim keeps its own catppuccin setup; Stylix's neovim target stays off. git.nix and claude-code.nix needed no change: they evaluate, their home-manager output is valid and the pinned sources build. Add .serena/ to .gitignore: Serena writes per-project state into every repository it activates. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z --- .gitignore | 3 ++ modules/cli/neovim/default.nix | 46 +++++++++++++++++++- modules/cli/shell.nix | 76 +++++++++++++++++++++++++++++++++- 3 files changed, 121 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 581d843..f698e0f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ result-* # Images *.qcow2 *.iso + +# Serena writes per-project state into every repository it activates +.serena/ diff --git a/modules/cli/neovim/default.nix b/modules/cli/neovim/default.nix index 0e06704..6552bf7 100644 --- a/modules/cli/neovim/default.nix +++ b/modules/cli/neovim/default.nix @@ -1,4 +1,46 @@ -# STUB (T3): replaced in phase 2 +# Neovim with LSP, completion, fuzzy finding and format-on-save. +# The editor config is in init.lua next to this file. It sets the catppuccin +# colorscheme itself, so Stylix's neovim target stays off (modules/theme/stylix.nix). { - flake.modules.homeManager.neovim = { }; + flake.modules.homeManager.neovim = + { pkgs, ... }: + { + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + + plugins = with pkgs.vimPlugins; [ + nvim-treesitter.withAllGrammars + nvim-lspconfig + blink-cmp + telescope-nvim + telescope-fzf-native-nvim + plenary-nvim + lualine-nvim + gitsigns-nvim + which-key-nvim + oil-nvim + conform-nvim + catppuccin-nvim + nvim-web-devicons + mini-nvim + ]; + + # Language servers, formatters and search tools, visible to nvim only. + extraPackages = with pkgs; [ + nixd + nixfmt + lua-language-server + stylua + bash-language-server + shfmt + ripgrep + fd + ]; + + initLua = builtins.readFile ./init.lua; + }; + }; } diff --git a/modules/cli/shell.nix b/modules/cli/shell.nix index 7333a4c..ab743c9 100644 --- a/modules/cli/shell.nix +++ b/modules/cli/shell.nix @@ -1,4 +1,76 @@ -# STUB (T3): replaced in phase 2 +# Interactive shell: zsh with starship prompt, fzf, zoxide, eza, bat, direnv. +# Home-manager only (hm.shell); the owner's login shell is set in core/users.nix. { - flake.modules.homeManager.shell = { }; + flake.modules.homeManager.shell = + { pkgs, ... }: + { + programs = { + zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + autocd = true; + + history = { + size = 50000; + save = 50000; + # Share between open terminals, skip duplicates and space-prefixed lines. + share = true; + ignoreDups = true; + ignoreSpace = true; + extended = true; + }; + + shellAliases = { + cat = "bat"; + ".." = "cd .."; + g = "git"; + # nh builds, diffs and activates the flake in one step. + rebuild = "nh os switch"; + rebuild-boot = "nh os boot"; + rebuild-test = "nh os test"; + }; + }; + + starship = { + enable = true; + settings = { + add_newline = false; + # Short marker inside `nix shell` / `nix develop`. + nix_shell.format = "[$symbol$state]($style) "; + }; + }; + + fzf = { + enable = true; + defaultCommand = "fd --type f --hidden --exclude .git"; + fileWidget.command = "fd --type f --hidden --exclude .git"; + changeDirWidget.command = "fd --type d --hidden --exclude .git"; + }; + + # `z dir` jumps to frecent directories, `zi` picks with fzf. + zoxide.enable = true; + + # ls, ll, la, lt and lla aliases come from the zsh integration. + eza = { + enable = true; + icons = "auto"; + git = true; + }; + + bat.enable = true; + + direnv = { + enable = true; + nix-direnv.enable = true; + }; + + btop.enable = true; + fastfetch.enable = true; + }; + + # fd backs the fzf commands above. + home.packages = [ pkgs.fd ]; + }; }