diff --git a/README.md b/README.md index 7ef1ec5..257e36c 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,11 @@ Defined in the host table in [`flake.nix`](./flake.nix): | `lyrathorpe-mac` | `aarch64-darwin` | macOS (nix-darwin) | Shared layers: `lyrathorpe/home` (home-manager: shell, git, editor), -`system/modules/common-nixos.nix` (all NixOS hosts), and -`system/modules/laptop.nix` (the physical laptops). +`system/modules/common-nixos.nix` (all NixOS hosts: fonts, nix-ld, caches), +`system/modules/workstation.nix` (physical graphical hosts: audio, thermald, +earlyoom, fwupd), `system/modules/laptop.nix` (laptops: Wi-Fi, Bluetooth, power, +lid), and `system/modules/ssh.nix` (key-only sshd). The x86 hosts also pull +`nixos-hardware` profiles. ## Applying @@ -74,5 +77,6 @@ A dev shell and a formatting/lint gate are wired through the flake: ## CI -[`.gitea/workflows/ci.yaml`](./.gitea/workflows/ci.yaml) gates `nixfmt` -formatting and evaluates every NixOS and Darwin host configuration on push/PR. +[`.gitea/workflows/ci.yaml`](./.gitea/workflows/ci.yaml) runs `nix flake check` +(formatting, `deadnix`, `statix`, the pre-commit hooks) and evaluates every +NixOS and Darwin host configuration on push/PR. diff --git a/lyrathorpe/home/KEYBINDINGS.md b/lyrathorpe/home/KEYBINDINGS.md index c92d1d8..a64d2f1 100644 --- a/lyrathorpe/home/KEYBINDINGS.md +++ b/lyrathorpe/home/KEYBINDINGS.md @@ -177,6 +177,11 @@ across vim splits and tmux panes seamlessly. Everything else is stock vim, plus: | ---------------------- | --------------------------------------------------------- | | `,``,` | Toggle the file tree (nvim-tree) — comma pressed twice | | `Ctrl`+`h`/`j`/`k`/`l` | Move between vim splits / tmux panes (vim-tmux-navigator) | +| `ff` | Find files (telescope) | +| `fg` | Live grep (telescope) | +| `fb` | Switch buffer (telescope) | +| `xx` | Diagnostics list (trouble) | +| `gc` / `gcc` | Toggle comment (selection / line) | | `gd` | Go to definition (LSP) | | `gr` | List references (LSP) | | `K` | Hover documentation (LSP) | @@ -184,7 +189,9 @@ across vim splits and tmux panes seamlessly. Everything else is stock vim, plus: | `ca` | Code action (LSP) | LSP covers Nix, Lua, Python and Terraform (the work box adds C# and Helm); -completion (nvim-cmp) appears as you type. `:Git` opens fugitive. +completion (nvim-cmp) appears as you type. Files are formatted on save +(conform-nvim). `:Git` opens fugitive; gitsigns shows gutter signs. which-key +pops up after `` to show the rest. --- diff --git a/lyrathorpe/home/README.md b/lyrathorpe/home/README.md index d34a606..6df0289 100644 --- a/lyrathorpe/home/README.md +++ b/lyrathorpe/home/README.md @@ -44,15 +44,18 @@ and the C#/Helm language servers). | `eza` | modern `ls` (drives the ls aliases) | | `bat` | syntax-highlighting pager (Catppuccin Mocha theme); behaves like `cat` when piped; also the `MANPAGER` | | `ripgrep` / `fd` | fast search (`rg`) and find (`fd`); also back `fzf` | -| `jq` / `btop` | JSON processor; resource monitor | +| `jq` | JSON processor | | `gh` / `tea` | GitHub and Gitea (`code.emmathe.dev`) CLIs; `gh` uses SSH | | `nix-index` | `command-not-found`: an unknown command tells you which Nix package provides it (prebuilt DB, no manual indexing) | | `comma` (`,`) | run an uninstalled program once: `, cowsay hi` | | `nh` | nicer `nixos-rebuild`/`home-manager` with diffs; `$NH_FLAKE` set to the repo. No scheduled GC (it could reap paths a running generation still references) — collect garbage manually with `nh clean all` / `nix-collect-garbage -d` | +| `btop` | resource monitor, themed Catppuccin Mocha (vendored theme) | +| `lazygit` | git TUI for staging/rebasing, themed to match (`git.nix`) | +| `hyperfine` / `sd` | command-line benchmarking; saner find-and-replace than sed | -**Theming:** `fzf`, `bat` and `git`'s `delta` pager are all Catppuccin Mocha, -driven from the shared `../catppuccin-mocha.nix` palette / the catppuccin/bat -theme. +**Theming:** `fzf`, `bat`, `btop`, `lazygit` and `git`'s `delta` pager are all +Catppuccin Mocha, driven from the shared `../catppuccin-mocha.nix` palette / the +catppuccin upstream themes. **Env & defaults:** `xdg.enable` on; `PAGER`/`MANPAGER` (bat) set in `default.nix` (the editor owns `$EDITOR`/`$VISUAL`); `xdg.mimeApps` maps web→Firefox, @@ -80,17 +83,22 @@ non-interactive shells. Escape hatch: `NO_TMUX=1 ` opens a bare shell. | Clipboard | `set-clipboard on`; foot `terminal-features` advertise truecolor/sync/OSC52/title/cursor | **Plugins:** `sensible`, `vim-tmux-navigator` (Ctrl-h/j/k/l across vim ↔ tmux), -`yank`, `catppuccin` (Mocha statusline), `resurrect` + `continuum` +`yank`, `extrakto` (`prefix`+`Tab`: fzf-grab paths/URLs/text from the pane into +the prompt), `catppuccin` (Mocha statusline), `resurrect` + `continuum` (sessions auto-save and restore across reboots). The statusline draws Nerd-Font glyphs — see Fonts. ## Fonts -**JetBrainsMono Nerd Font** is installed on every host (in `common-nixos.nix`, -because tmux runs everywhere; the Mac installs it to `/Library/Fonts` via the -Darwin config). foot uses it as its main font automatically. iTerm2's font is a -GUI setting — set it to _JetBrainsMono Nerd Font_ (Settings → Profiles → Text → -Font) so the tmux statusline glyphs render instead of `?`. +**JetBrainsMono Nerd Font**, **Noto Sans** and **Noto Color Emoji** are +installed on every host (in `common-nixos.nix`, because tmux/terminals run +everywhere; the Mac installs the Nerd Font to `/Library/Fonts` via the Darwin +config). `fonts.fontconfig.defaultFonts` maps the generic families so anything +asking for `monospace` gets the Nerd Font (with emoji fallback) — this also +gives the WSL box emoji/sans coverage it otherwise lacked. foot uses the Nerd +Font as its main font automatically. iTerm2's font is a GUI setting — set it to +_JetBrainsMono Nerd Font_ (Settings → Profiles → Text → Font) so the tmux +statusline glyphs render instead of `?`. ## Editor (Neovim) @@ -99,17 +107,23 @@ declaratively with **nixvim**, so the same plugins and config are baked in on every host. Migrated from plain vim; the practical gain is a real LSP stack in place of the old (inert) ALE. -| Feature | Notes | -| ------------- | -------------------------------------------------------------------------------------- | -| Colorscheme | Catppuccin Mocha (matches the terminal and the rest of the desktop) | -| File tree | nvim-tree, toggled with `,,` (comma twice; was nerdtree) | -| Indent guides | indent-blankline, on by default (was vim-indent-guides) | -| Git | fugitive (`:Git …`) | -| Pane nav | vim-tmux-navigator — `Ctrl`+`h/j/k/l` moves across vim splits and tmux panes | -| Syntax | tree-sitter (nix, lua, bash, markdown, groovy) — replaces `syntax enable` | -| LSP | nvim-cmp completion + servers `nil` (Nix), `lua_ls`, `pyright` (Python), `terraformls` | -| Indentation | 2-wide hard tabs (`noexpandtab`, `tabstop`/`shiftwidth` = 2); line numbers on | -| Filetypes | `*Jenkinsfile` → groovy | +| Feature | Notes | +| -------------- | -------------------------------------------------------------------------------------- | +| Colorscheme | Catppuccin Mocha (matches the terminal and the rest of the desktop) | +| File tree | nvim-tree, toggled with `,,` (comma twice; was nerdtree) | +| Fuzzy finder | telescope (+fzf-native): `ff` files, `fg` grep, `fb` buffers | +| Format on save | conform-nvim (nixfmt, stylua, ruff, shfmt, prettier, gofumpt; LSP fallback otherwise) | +| Git | fugitive (`:Git …`) + gitsigns gutter signs/blame | +| Diagnostics | inline + trouble list (`xx`) | +| Completion | nvim-cmp (LSP/buffer/path) with luasnip snippet expansion | +| Indent guides | indent-blankline, on by default (was vim-indent-guides) | +| Statusline | lualine (Catppuccin theme) | +| Editing | which-key hints, comment (`gc`/`gcc`), autopairs, treesitter textobjects | +| Pane nav | vim-tmux-navigator — `Ctrl`+`h/j/k/l` moves across vim splits and tmux panes | +| Syntax | tree-sitter (nix, lua, bash, markdown, groovy, c#, python, terraform, yaml) | +| LSP | nvim-cmp completion + servers `nil` (Nix), `lua_ls`, `pyright` (Python), `terraformls` | +| Indentation | 2-wide hard tabs (`noexpandtab`, `tabstop`/`shiftwidth` = 2); line numbers on | +| Filetypes | `*Jenkinsfile` → groovy | Leader is `Space`. LSP keymaps (`gd`, `gr`, `K`, `rn`, `ca`) and the file-tree toggle are listed in @@ -121,14 +135,16 @@ host-specific ones go in that host's module — the work box (`work.nix`) adds ## git Pager is **delta**. **commitizen** is installed on every host; `cz` defaults to -Conventional Commits. +Conventional Commits. **lazygit** (themed) is the TUI. The commit-graph is kept +current (`gc`/`fetch.writeCommitGraph`) so `lg` stays fast. -| Aliases | | -| ------------------------ | ----------------------------------------------------------------- | -| `st` `co` `sw` `br` `ci` | status / checkout / switch / branch / commit | -| `last` `unstage` | last commit / unstage | -| `lg` | graph log, all branches | -| `cz` `cc` | `git cz ` (e.g. `git cz c`) and `git cc` → commitizen prompt | +| Aliases | | +| ------------------------ | ------------------------------------------------------------------ | +| `st` `co` `sw` `br` `ci` | status / checkout / switch / branch / commit | +| `last` `unstage` | last commit / unstage | +| `amend` `fixup` `undo` | amend-no-edit / `commit --fixup` / soft-reset HEAD~1 (keep staged) | +| `lg` | graph log, all branches | +| `cz` `cc` | `git cz ` (e.g. `git cz c`) and `git cc` → commitizen prompt | | Behaviour | | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | diff --git a/lyrathorpe/home/default.nix b/lyrathorpe/home/default.nix index c9fa8d6..8e0b05a 100644 --- a/lyrathorpe/home/default.nix +++ b/lyrathorpe/home/default.nix @@ -1,6 +1,6 @@ # Base home-manager profile, shared by every host (graphical or headless). # Graphical hosts additionally import ./desktop.nix; the work host imports -# ../../system/modules/work/default.nix. See the host table in flake.nix. +# ./work.nix. See the host table in flake.nix. { ... }: { imports = [