Compare commits

...

10 Commits

Author SHA1 Message Date
tomatocream 4a65050f92 t 2026-01-23 01:52:59 +08:00
tomatocream 4316b0344c t 2026-01-23 01:26:09 +08:00
tomatocream 9aff8bacd7 test 2026-01-19 01:23:12 +08:00
tomatocream 047d6048e8 test 2026-01-19 01:06:01 +08:00
tomatocream b5f2a4ce76 test 2026-01-19 00:52:06 +08:00
tomatocream 3bea79854c test 2026-01-18 23:56:35 +08:00
tomatocream c261d0afcc test 2026-01-18 23:32:09 +08:00
tomatocream fd3f507e8c test 2026-01-18 23:17:17 +08:00
tomatocream cc988bba6f test 2026-01-18 23:12:55 +08:00
tomatocream 4e2ef4adb6 test 2026-01-16 01:50:39 +08:00
23 changed files with 1290 additions and 406 deletions
+1
View File
@@ -22,3 +22,4 @@ result-*
# Uncomment if you don't want to commit it:
# nixos/hardware-configuration.nix
reference/
+1
View File
@@ -78,6 +78,7 @@
# Shared nixpkgs configuration
nixpkgs = {
overlays = [
inputs.self.overlays.emacs
inputs.self.overlays.additions
inputs.self.overlays.modifications
inputs.self.overlays.unstable-packages
+2 -1
View File
@@ -12,7 +12,8 @@
# Shared configuration between NixOS and nix-darwin
../common.nix
# skhd hotkey daemon (system service)
# Window management services
./yabai.nix
./skhd.nix
# If you want to use modules your own flake exports (from modules/darwin):
+3 -3
View File
@@ -1,4 +1,5 @@
# Simple Hotkey Daemon configuration for nix-darwin
# skhd (Simple Hotkey Daemon) configuration for macOS
# Uses nix-darwin's services.skhd module
{
config,
lib,
@@ -9,7 +10,6 @@
in {
services.skhd = {
enable = true;
package = pkgs.skhd;
skhdConfig = ''
## Navigation (${super} - ...)
# Space Navigation (four spaces per display): ${super} - {1, 2, 3, 4}
@@ -103,7 +103,7 @@ in {
## Misc
# Open new Kitty window
${super} - return : kitty
${super} - return : kitty --single-instance -d ~
# Bring Kitty window to current space
${super} - o : yabai -m window $(yabai -m query --windows | jq '.[] | select(.app==".kitty-wrapped") | .id') --space $(yabai -m query --spaces | jq '.[] | select(.has-focus==1) .id')
'';
+74
View File
@@ -0,0 +1,74 @@
# Yabai window manager configuration (nix-darwin service)
{
config,
lib,
pkgs,
...
}: {
services.yabai = {
enable = true;
config = {
# Layout
layout = "bsp";
auto_balance = "off";
split_ratio = 0.50;
window_placement = "second_child";
# Gaps
window_gap = 18;
top_padding = 18;
bottom_padding = 52;
left_padding = 18;
right_padding = 18;
# Shadows and borders
window_shadow = "float";
# Mouse
mouse_follows_focus = "off";
focus_follows_mouse = "off";
mouse_modifier = "alt";
mouse_action1 = "move";
mouse_action2 = "resize";
mouse_drop_action = "swap";
};
extraConfig = ''
# Emacs (emacsMacport) - explicitly manage for proper tiling
yabai -m rule --add app="^Emacs$" manage=on
# rules - apps to ignore (manage=off)
yabai -m rule --add app="^Genshin Impact$" manage=off
yabai -m rule --add app="^LuLu$" manage=off
yabai -m rule --add app="^Vimac$" manage=off
yabai -m rule --add app="^Calculator$" manage=off
yabai -m rule --add app="^Software Update$" manage=off
yabai -m rule --add app="^Dictionary$" manage=off
yabai -m rule --add app="^VLC$" manage=off
yabai -m rule --add app="^System Preferences$" manage=off
yabai -m rule --add app="^zoom.us$" manage=off
yabai -m rule --add app="^Photo Booth$" manage=off
yabai -m rule --add app="^Archive Utility$" manage=off
yabai -m rule --add app="^Python$" manage=off
yabai -m rule --add app="^LibreOffice$" manage=off
yabai -m rule --add app="^App Store$" manage=off
yabai -m rule --add app="^Steam$" manage=off
yabai -m rule --add app="^Alfred$" manage=off
yabai -m rule --add app="^Activity Monitor$" manage=off
yabai -m rule --add app="^Raycast$" manage=off
# Finder dialogs
yabai -m rule --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off
# Safari dialogs
yabai -m rule --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off
# System dialogs
yabai -m rule --add label="About This Mac" app="System Information" title="About This Mac" manage=off
# Inkscape dialogs
yabai -m rule --add label="Select file to save to" app="^Inkscape$" title="Select file to save to" manage=off
'';
};
}
+4 -1
View File
@@ -89,7 +89,10 @@
(when (eq system-type 'darwin)
;; Use Command key as Meta
(setq mac-command-modifier 'meta
mac-option-modifier 'super))
u mac-option-modifier 'super)
;; Enable menu-bar for yabai tiling compatibility
;; Without this, yabai can't detect Emacs windows properly
(menu-bar-mode 1))
;; Better defaults for coding
(setq-default indent-tabs-mode nil
+96 -98
View File
@@ -2,9 +2,6 @@
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;;
;; NOTE: With nix-doom-emacs-unstraightened, you don't need to run 'doom sync'
;; manually - rebuilding your Nix configuration handles this automatically.
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
@@ -12,16 +9,16 @@
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those those those those symbols that start with a plus).
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot thgir) etirw uoy teleL
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,teleL for dvorstraq
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
@@ -34,151 +31,151 @@
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM://quit messages when you quit Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
hydra
indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nstrstrstr) and target them
;;(format +onsave) ; automated prettiness
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my hierarchical snippets
;;word-wrap ; soft wrapping with language-aware indent
lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once
objed ; text object editing for the innocent
parinfer ; turn lisp into python, sort of
rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
eshell ; the elisp shell that works everywhere
shell ; simple shell REPL for Emacs
term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
(spell +flyspell) ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
docker
editorconfig ; let someone else argue about tabs vs spaces
ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
gist ; interacting with github gists
lookup ; navigate your code and its documentation
lsp ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
;;pdf ; pdf enhancements
;;prodigy ; FIXME manage external services &டைக்களுக்கு kill them
make ; run make tasks from Emacs
pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
upload ; map local to remote projects via ssh/ftp
:os
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
(:if IS-MAC macos) ; improve compatibility with macOS
tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
(cc +lsp) ; C > C++ == 1
clojure ; java with a lisp
common-lisp ; if you've seen one lisp, you've seen them all
coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, currentYear = 2026, or something
;;data ; config/data formats
;;(dart +flutter) ; paint ui and ignore in web development
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
dhall
elixir ; erlang done right
elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an pointlike object with very very high momentum
;;ess ; emacs speaks statistics
erlang ; an elegant language for a more civilized age
ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your knees
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML://finally.googled.fsharp
;;fstar ; (dependent alarm)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazy about everything but its types
;;hy ; a dialect of Lisp that's embedded in Python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +lsp) ; the 00 in language
;;javascript ; all(alarm alarm) by alarm brained alarm
;;julia ; a]> (alarmalarm) the language of the future
;;kotlin ; a better, better Java
(go +lsp) ; the hipster dialect
(graphql +lsp) ; Give queries a REST
(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
idris ; a language you can depend on
json ; At least it ain't XML
(java +lsp) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much alarm time
;;ledger ; be alarmed about your alarming finances
;;lua ; one-hierarchical lang for rule them all
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
nix ; I hereby declare "nix xNIX(alarm, null alarm);
;;ocaml ; an idealized alarm in a alarm alarm
nix ; I hereby declare "nix geht mehr!"
ocaml ; an objective camel
org ; organize your plain life in plain text
;;php ; perl's alarm alarm
;;plantuml ; diagrams for confusing people more
;;graphviz ; dependency graphs for confusing people more
;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly
;;qt ; the 'hierarchical' in 'hierarchical hierarchical'
;;php ; perl's insecure younger brother
plantuml ; diagrams for confusing people more
purescript ; javascript, but functional
python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the hierarchical hierarchical for hierarchical hackers
;;rest ; Alarm alarm rest alarm(alarm, Emacs)
;;rst ; ReST in peace
;;(rust +lsp) ; Fe2O3.unwrap().hierarchical()
;;scala ; java, but good
;;(scheme +guile) ; a fully hierarchical hierarchical lisp
;;raku ; the artist formerly known as perl6
rest ; Emacs as a REST client
rst ; ReST in peace
(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
scala ; java, but good
(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you hierarchical those mass hierarchical NFT fails?
;;swift ; who hierarchical Swift was hierarchical...
;;terra ; Earth and target
;;web ; the hierarchical, hierarchical, hierarchical of the Internet
;;yaml ; JSON, but readable
;;zig ; C, but hierarchical
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
web ; the tubes
yaml ; JSON, but readable
zig ; C, but simpler
:email
;;(mu4e +org +gmail)
@@ -186,12 +183,13 @@
;;(wanderlust +gmail)
:app
;;calendar
calendar
;;emms
;;everywhere ; *hierarchical* hierarchical Emacs from hierarchical
;;irc ; how neckbeards hierarchical
;;(rss +org) ; emacs as an RSS reader
;;everywhere ; *leave* Emacs!? You must be joking
irc ; how neckbeards socialize
(rss +org) ; emacs as an RSS reader
twitter ; twitter client https://twitter.com/vnought
:config
;;literate
literate
(default +bindings +smartparens))
Generated
+39 -1
View File
@@ -38,6 +38,27 @@
}
},
"emacs-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1768756303,
"narHash": "sha256-Dp9IFkXJ1GZsW6Z5hJUpfGUMFiJiTig/EEZ5sY4guzM=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "4910d1c87da2ba69df11d25833b2c780e55c37b3",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"emacs-overlay_2": {
"inputs": {
"nixpkgs": [
"nix-doom-emacs-unstraightened"
@@ -84,7 +105,7 @@
"nix-doom-emacs-unstraightened": {
"inputs": {
"doomemacs": "doomemacs",
"emacs-overlay": "emacs-overlay",
"emacs-overlay": "emacs-overlay_2",
"nixpkgs": [],
"systems": "systems"
},
@@ -118,6 +139,22 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1714076141,
@@ -137,6 +174,7 @@
"root": {
"inputs": {
"darwin": "darwin",
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager",
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
"nixpkgs": "nixpkgs",
+4
View File
@@ -22,6 +22,10 @@
nix-doom-emacs-unstraightened.url = "github:marienz/nix-doom-emacs-unstraightened";
# Optional: reduce download size by not pulling in nixpkgs from this input
nix-doom-emacs-unstraightened.inputs.nixpkgs.follows = "";
# Emacs overlay for latest Emacs builds with native-comp
emacs-overlay.url = "github:nix-community/emacs-overlay";
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
+3 -4
View File
@@ -16,21 +16,20 @@
./platform/darwin.nix
./platform/linux.nix
./modules/packages.nix
./modules/inbox/packages.nix
./modules/shells.nix
./modules/fish.nix
./modules/git.nix
./modules/kitty.nix
./modules/neovim.nix
./modules/tmux.nix
# skhd is a darwin system service, configured in darwin/skhd.nix
./modules/yabai.nix
# Doom Emacs via nix-doom-emacs-unstraightened
./modules/doom-emacs.nix
./modules/inbox.nix
./modules/inbox/inbox.nix
# If you want to use modules your own flake exports (from modules/home-manager):
# inputs.self.homeManagerModules.example
+12 -20
View File
@@ -19,15 +19,16 @@ in {
doomDir = ../../doom.d;
# Where Doom stores local state (cache, etc.)
# Supports ~ expansion but NOT shell variables like $XDG_DATA_HOME
doomLocalDir = "~/.local/share/nix-doom";
# Must be an absolute path
doomLocalDir = "${config.home.homeDirectory}/.local/share/nix-doom";
# Use emacs-pgtk for better Wayland support on Linux
# On macOS, falls back to regular emacs
# Use emacs30-pgtk for Wayland support on Linux
# On macOS, use emacs30 from emacs-overlay (native-comp, tree-sitter)
# fix-window-role.patch applied via overlay for yabai compatibility
emacs =
if pkgs.stdenv.isLinux
then pkgs.emacs-pgtk
else pkgs.emacs;
then pkgs.emacs30-pgtk
else pkgs.emacs30;
# Extra packages to make available (tree-sitter grammars, etc.)
# Tree-sitter grammars are not installed automatically by Doom
@@ -68,19 +69,10 @@ in {
# Ensure doom directories exist
home.file.".local/share/nix-doom/.keep".text = "";
# Shell aliases for Doom Emacs
programs.fish.shellAbbrs = lib.mkIf config.programs.fish.enable {
em = "emacsclient -c -a emacs";
et = "emacsclient -t -a 'emacs -nw'";
};
# Install fonts referenced in doom.d/config.el
home.packages = with pkgs; [
jetbrains-mono
inter
];
programs.zsh.shellAliases = lib.mkIf config.programs.zsh.enable {
em = "emacsclient -c -a emacs";
et = "emacsclient -t -a 'emacs -nw'";
};
programs.bash.shellAliases = lib.mkIf config.programs.bash.enable {
em = "emacsclient -c -a emacs";
et = "emacsclient -t -a 'emacs -nw'";
};
}
+68
View File
@@ -0,0 +1,68 @@
# Fish Plugins Available in Nixpkgs
## Directory Navigation
- **z** (`pkgs.fishPlugins.z`) - Pure-fish z directory jumping
- **fish-bd** (`pkgs.fishPlugins.fish-bd`) - Fish plugin to quickly go back to a parent directory up in your current working directory tree
## Prompts & Themes
- **tide** (`pkgs.fishPlugins.tide`) - Ultimate Fish prompt
- **pure** (`pkgs.fishPlugins.pure`) - Pretty, minimal and fast Fish prompt, ported from zsh
- **hydro** (`pkgs.fishPlugins.hydro`) - Ultra-pure, lag-free prompt with async Git status
- **bobthefish** (`pkgs.fishPlugins.bobthefish`) - Powerline-style, Git-aware fish theme optimized for awesome
- **bobthefisher** (`pkgs.fishPlugins.bobthefisher`) - Powerline-style, Git-aware fish theme optimized for awesome (fork of bobthefish)
- **transient-fish** (`pkgs.fishPlugins.transient-fish`) - Fish plugin to enable a transient prompt
- **gruvbox** (`pkgs.fishPlugins.gruvbox`) - Gruvbox theme for fish shell
- **async-prompt** (`pkgs.fishPlugins.async-prompt`) - Make your prompt asynchronous to improve the reactivity
## Fuzzy Finding & Search
- **fzf-fish** (`pkgs.fishPlugins.fzf-fish`) - Augment your fish command line with fzf key bindings
- **fzf** (`pkgs.fishPlugins.fzf`) - Ef-fish-ient fish keybindings for fzf
- **fifc** (`pkgs.fishPlugins.fifc`) - Fzf powers on top of fish completion engine and allows customizable completion rules
## Git Integration
- **forgit** (`pkgs.fishPlugins.forgit`) - Utility tool powered by fzf for using git interactively
- **plugin-git** (`pkgs.fishPlugins.plugin-git`) - Git plugin for fish (similar to oh-my-zsh git)
- **git-abbr** (`pkgs.fishPlugins.git-abbr`) - Abbreviations for git for the fish shell 🐟
## Quality of Life
- **autopair** (`pkgs.fishPlugins.autopair`) - Auto-complete matching pairs in the Fish command line
- **done** (`pkgs.fishPlugins.done`) - Automatically receive notifications when long processes finish
- **sponge** (`pkgs.fishPlugins.sponge`) - Keeps your fish shell history clean from typos, incorrectly used commands and everything you don't want to store due to privacy reasons
- **puffer** (`pkgs.fishPlugins.puffer`) - Text Expansions for Fish
- **colored-man-pages** (`pkgs.fishPlugins.colored-man-pages`) - Fish shell plugin to colorize man pages
- **pisces** (`pkgs.fishPlugins.pisces`) - Paired symbols in the command line
- **spark** (`pkgs.fishPlugins.spark`) - Sparklines for Fish
- **humantime-fish** (`pkgs.fishPlugins.humantime-fish`) - Turn milliseconds into a human-readable string in Fish
## Shell Compatibility & Utilities
- **bass** (`pkgs.fishPlugins.bass`) - Fish function making it easy to use utilities written for Bash in Fish shell
- **foreign-env** (`pkgs.fishPlugins.foreign-env`) - Foreign environment interface for Fish shell
- **grc** (`pkgs.fishPlugins.grc`) - Grc Colourizer for some commands on Fish shell
- **plugin-sudope** (`pkgs.fishPlugins.plugin-sudope`) - Fish plugin to quickly put 'sudo' in your command
- **fishbang** (`pkgs.fishPlugins.fishbang`) - Bash bang commands for fish
- **bang-bang** (`pkgs.fishPlugins.bang-bang`) - Bash style history substitution for Oh My Fish
## Development Tools
- **nvm** (`pkgs.fishPlugins.nvm`) - Node.js version manager you'll adore, crafted just for Fish
- **sdkman-for-fish** (`pkgs.fishPlugins.sdkman-for-fish`) - Adds support for SDKMAN! to fish
- **github-copilot-cli-fish** (`pkgs.fishPlugins.github-copilot-cli-fish`) - GitHub Copilot CLI aliases for Fish Shell
- **exercism-cli-fish-wrapper** (`pkgs.fishPlugins.exercism-cli-fish-wrapper`) - Fish wrapper for the Exercism CLI
- **aws** (`pkgs.fishPlugins.aws`) - Completions and integrations with the AWS CLI
## Testing & Development
- **fishtape** (`pkgs.fishPlugins.fishtape`) - TAP-based test runner for Fish
- **fishtape_3** (`pkgs.fishPlugins.fishtape_3`) - 100% pure-Fish test runner
- **clownfish** (`pkgs.fishPlugins.clownfish`) - Fish function to mock the behaviour of commands
## Productivity & Monitoring
- **wakatime-fish** (`pkgs.fishPlugins.wakatime-fish`) - Fish plugin for wakatime
- **fish-you-should-use** (`pkgs.fishPlugins.fish-you-should-use`) - Fish plugin that reminds you to use your aliases
## Platform-Specific
- **macos** (`pkgs.fishPlugins.macos`) - MacOS functions for Fish
# notes
```
tide configure --auto --style=Rainbow --prompt_colors='True color' --show_time='24-hour format' --rainbow_prompt_separators=Angled --powerline_prompt_heads=Sharp --powerline_prompt_tails=Flat --powerline_prompt_style='One line' --prompt_spacing=Compact --icons='Few icons' --transient=Yes
```
+128
View File
@@ -0,0 +1,128 @@
# Fish shell configuration - batteries included
# A comprehensive, quality-of-life focused fish setup with useful plugins
{
inputs,
lib,
config,
pkgs,
...
}: {
programs.fish = {
enable = true;
# ═══════════════════════════════════════════════════════════════════════════
# PLUGINS - Curated selection for productivity
# ═══════════════════════════════════════════════════════════════════════════
plugins = with pkgs.fishPlugins; [
# ── Directory Navigation ──────────────────────────────────────────────────
# z: Jump to frequently used directories (like autojump/zoxide but pure fish)
{ name = "z"; src = z.src; }
# fish-bd: Quickly go back to a parent directory in your working tree
{ name = "fish-bd"; src = fish-bd.src; }
# ── Prompt ────────────────────────────────────────────────────────────────
# tide: Modern, extensible prompt
{ name = "tide"; src = tide.src; }
# ── Fuzzy Finding ─────────────────────────────────────────────────────────
# fzf-fish: Superior fzf integration - Ctrl+R history, Ctrl+Alt+F files, Ctrl+V vars
{ name = "fzf.fish"; src = fzf-fish.src; }
# fifc: Fzf powers on top of fish completion engine with customizable rules
{ name = "fifc"; src = fifc.src; }
# ── Git Integration ───────────────────────────────────────────────────────
# forgit: Interactive git with fzf (ga, glo, gi, gd, grh, gcf, gss, gclean)
{ name = "forgit"; src = forgit.src; }
# plugin-git: Git aliases and status helpers (similar to oh-my-zsh git)
{ name = "plugin-git"; src = plugin-git.src; }
# ── Quality of Life ───────────────────────────────────────────────────────
# autopair: Auto-insert matching brackets, quotes, etc.
{ name = "autopair"; src = autopair.src; }
# done: Notifications when long-running commands complete
{ name = "done"; src = done.src; }
# sponge: Remove failed commands and typos from history automatically
{ name = "sponge"; src = sponge.src; }
# puffer: Text expansions (!! for last command, !$ for last argument)
{ name = "puffer"; src = puffer.src; }
# fish-you-should-use: Reminds you to use your aliases
{ name = "fish-you-should-use"; src = fish-you-should-use.src; }
# ── Shell Compatibility ───────────────────────────────────────────────────
# bass: Run bash scripts and capture environment changes
{ name = "bass"; src = bass.src; }
# foreign-env: Source files from other shells (bash, zsh env files)
{ name = "foreign-env"; src = foreign-env.src; }
# plugin-sudope: Quickly put 'sudo' in your command
{ name = "plugin-sudope"; src = plugin-sudope.src; }
# ── Utility ───────────────────────────────────────────────────────────────
# grc: Colorize output of common commands (ping, traceroute, make, etc.)
{ name = "grc"; src = grc.src; }
# colored-man-pages: Colorize man pages for better readability
{ name = "colored-man-pages"; src = colored-man-pages.src; }
# spark: Sparklines for Fish
{ name = "spark"; src = spark.src; }
# humantime-fish: Turn milliseconds into a human-readable string
{ name = "humantime-fish"; src = humantime-fish.src; }
] ++ lib.optionals pkgs.stdenv.isDarwin [
# ── Platform-Specific (macOS) ─────────────────────────────────────────────
# macos: MacOS functions for Fish
{ name = "macos"; src = macos.src; }
];
# ═══════════════════════════════════════════════════════════════════════════
# INTERACTIVE SHELL INITIALIZATION
# ═══════════════════════════════════════════════════════════════════════════
interactiveShellInit = ''
# Set up fzf.fish key bindings (Ctrl+R history, Ctrl+Alt+F files, etc.)
fzf_configure_bindings
echo "🐟 "(set_color cyan)(whoami)(set_color normal)" @ "(set_color yellow)(hostname -s)(set_color normal)" in "(set_color green)(prompt_pwd)(set_color normal)
'';
# ═══════════════════════════════════════════════════════════════════════════
# SHELL INIT (runs for all shells, including non-interactive)
# ═══════════════════════════════════════════════════════════════════════════
shellInit = ''
# Ensure locale is set properly for UTF-8
if test -z "$LANG"
set -gx LANG en_US.UTF-8
end
if test -z "$LC_ALL"
set -gx LC_ALL en_US.UTF-8
end
'';
# ═══════════════════════════════════════════════════════════════════════════
# LOGIN SHELL INIT
# ═══════════════════════════════════════════════════════════════════════════
loginShellInit = ''
# Add any login-specific initialization here
# This runs only for login shells
'';
};
# ═════════════════════════════════════════════════════════════════════════════
# ADDITIONAL PACKAGES needed for fish plugins and functions
# ═════════════════════════════════════════════════════════════════════════════
home.packages = with pkgs; [
grc # Generic colorizer (for grc plugin)
libnotify # For done plugin notifications (Linux)
] ++ lib.optionals pkgs.stdenv.isDarwin [
terminal-notifier # For done plugin notifications (macOS)
];
}
+10
View File
@@ -35,5 +35,15 @@
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
};
};
# GitHub CLI configuration
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
prompt = "enabled";
};
};
}
@@ -28,19 +28,9 @@
# docker-compose
];
# GitHub CLI configuration
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
prompt = "enabled";
};
};
# Direnv for per-directory environments
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}
@@ -113,19 +113,16 @@ in {
docker
# lima - removed due to CVEs, use unstable version if needed
llvmPackages_14.clangUseLLVM
headscale
kitty
alacritty
# add packages
w3m
emacs
# emacs is provided by doom-emacs module (programs.doom-emacs)
parinfer-rust
sshuttle
maven363
openssh
@@ -148,5 +145,6 @@ in {
# progs
zstd
bun
];
}
+60 -1
View File
@@ -6,9 +6,68 @@
pkgs,
...
}: {
# Alacritty terminal emulator configuration
programs.kitty = {
enable = true;
font = {
name = "Fira Code";
size = 13.0;
};
settings = {
# Fonts
bold_font = "Fira Code Bold";
italic_font = "Maple Mono Italic";
bold_italic_font = "Maple Mono BoldItalic";
symbol_map = "U+e000-U+e00a,U+ea60-U+ebeb,U+e0a0-U+e0c8,U+e0ca,U+e0cc-U+e0d7,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b1,U+e700-U+e7c5,U+ed00-U+efc1,U+f000-U+f2ff,U+f000-U+f2e0,U+f300-U+f372,U+f400-U+f533,U+f0001-U+f1af0 Symbols Nerd Font Mono";
disable_ligatures = "cursor";
# Cursor
cursor = "none";
cursor_blink_interval = 0;
cursor_trail = 3;
# Window
hide_window_decorations = "titlebar-only";
window_margin_width = 4;
remember_window_size = "yes";
initial_window_width = 1600;
initial_window_height = 1000;
enabled_layouts = "Splits,Stack";
confirm_os_window_close = -2;
# Performance
repaint_delay = 8;
input_delay = 1;
resize_draw_strategy = "blank";
resize_debounce_time = "0.001";
# Tab bar
tab_bar_min_tabs = 1;
tab_bar_edge = "top";
tab_bar_style = "powerline";
tab_powerline_style = "slanted";
tab_separator = "\" \"";
tab_activity_symbol = "";
tab_title_max_length = 30;
tab_title_template = "\"{fmt.fg.red}{bell_symbol}{fmt.fg.tab} {index}: ({tab.active_oldest_exe}) {title}{fmt.bold}{' ' if num_windows > 1 and layout_name == 'stack' else ''}{' :{}:'.format(num_windows) if num_windows > 1 else ''}{activity_symbol}\"";
# Scrollback
scrollback_lines = 10000;
touch_scroll_multiplier = "6.0";
# scrollback_pager = "~/.local/share/bob/nvim-bin/nvim -c \"lua require('util').colorize()\"";
# Misc
copy_on_select = "yes";
background_opacity = "0.5";
dynamic_background_opacity = "yes";
enable_audio_bell = "no";
# macOS specific
macos_quit_when_last_window_closed = "no";
macos_colorspace = "default";
macos_show_window_title_in = "window";
};
};
}
+566 -11
View File
@@ -1,4 +1,4 @@
# Text editor configurations
# Batteries-included Neovim configuration for developer productivity
{
inputs,
lib,
@@ -6,21 +6,576 @@
pkgs,
...
}: {
# Neovim configuration
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
extraConfig = ''
set number
set relativenumber
set expandtab
set tabstop=2
set shiftwidth=2
set smartindent
set clipboard=unnamedplus
# External tools needed by plugins
extraPackages = with pkgs; [
# LSP servers
lua-language-server
nil # Nix LSP
nodePackages.typescript-language-server
nodePackages.vscode-langservers-extracted # HTML/CSS/JSON/ESLint
pyright
rust-analyzer
gopls
# Formatters & linters
stylua
prettierd
nixpkgs-fmt
black
isort
shfmt
# Telescope dependencies
ripgrep
fd
# Other tools
tree-sitter
];
plugins = with pkgs.vimPlugins; [
# ===================
# Core / Dependencies
# ===================
plenary-nvim
nvim-web-devicons
# ===================
# Treesitter (syntax highlighting & more)
# ===================
{
plugin = nvim-treesitter.withAllGrammars;
type = "lua";
config = ''
require('nvim-treesitter.configs').setup({
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
})
'';
}
nvim-treesitter-textobjects
nvim-treesitter-context # Show context at top of screen
# ===================
# LSP & Completion
# ===================
{
plugin = nvim-lspconfig;
type = "lua";
config = ''
local lspconfig = require('lspconfig')
local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Common on_attach function
local on_attach = function(client, bufnr)
local opts = { buffer = bufnr, noremap = true, silent = true }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<leader>f', function() vim.lsp.buf.format({ async = true }) end, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, opts)
end
-- LSP servers
local servers = {
'lua_ls', 'nil_ls', 'ts_ls', 'pyright', 'rust_analyzer', 'gopls',
'html', 'cssls', 'jsonls'
}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({
on_attach = on_attach,
capabilities = capabilities,
})
end
-- Lua specific settings
lspconfig.lua_ls.setup({
on_attach = on_attach,
capabilities = capabilities,
settings = {
Lua = {
diagnostics = { globals = { 'vim' } },
workspace = { checkThirdParty = false },
telemetry = { enable = false },
},
},
})
'';
}
# Completion engine
{
plugin = nvim-cmp;
type = "lua";
config = ''
local cmp = require('cmp')
local luasnip = require('luasnip')
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' },
}),
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
})
'';
}
cmp-nvim-lsp
cmp-buffer
cmp-path
cmp_luasnip
luasnip
friendly-snippets
# ===================
# Telescope (fuzzy finder)
# ===================
{
plugin = telescope-nvim;
type = "lua";
config = ''
local telescope = require('telescope')
local builtin = require('telescope.builtin')
telescope.setup({
defaults = {
file_ignore_patterns = { "node_modules", ".git/", "target/", "dist/" },
mappings = {
i = {
["<C-j>"] = "move_selection_next",
["<C-k>"] = "move_selection_previous",
},
},
},
pickers = {
find_files = { hidden = true },
},
})
telescope.load_extension('fzf')
-- Keymaps
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Find files' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Live grep' })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Find buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Help tags' })
vim.keymap.set('n', '<leader>fr', builtin.oldfiles, { desc = 'Recent files' })
vim.keymap.set('n', '<leader>fs', builtin.lsp_document_symbols, { desc = 'Document symbols' })
vim.keymap.set('n', '<leader>fw', builtin.grep_string, { desc = 'Grep word under cursor' })
vim.keymap.set('n', '<C-p>', builtin.find_files, { desc = 'Find files' })
'';
}
telescope-fzf-native-nvim
# ===================
# File Explorer
# ===================
{
plugin = neo-tree-nvim;
type = "lua";
config = ''
require('neo-tree').setup({
close_if_last_window = true,
filesystem = {
follow_current_file = { enabled = true },
use_libuv_file_watcher = true,
filtered_items = {
hide_dotfiles = false,
hide_gitignored = false,
},
},
window = {
width = 35,
mappings = {
["<space>"] = "none",
},
},
})
vim.keymap.set('n', '<leader>e', ':Neotree toggle<CR>', { silent = true, desc = 'Toggle file explorer' })
vim.keymap.set('n', '<leader>o', ':Neotree focus<CR>', { silent = true, desc = 'Focus file explorer' })
'';
}
# ===================
# Git Integration
# ===================
{
plugin = gitsigns-nvim;
type = "lua";
config = ''
require('gitsigns').setup({
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local opts = { buffer = bufnr }
vim.keymap.set('n', ']c', function()
if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end)
return '<Ignore>'
end, { expr = true, buffer = bufnr })
vim.keymap.set('n', '[c', function()
if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>'
end, { expr = true, buffer = bufnr })
vim.keymap.set('n', '<leader>hs', gs.stage_hunk, opts)
vim.keymap.set('n', '<leader>hr', gs.reset_hunk, opts)
vim.keymap.set('n', '<leader>hS', gs.stage_buffer, opts)
vim.keymap.set('n', '<leader>hu', gs.undo_stage_hunk, opts)
vim.keymap.set('n', '<leader>hp', gs.preview_hunk, opts)
vim.keymap.set('n', '<leader>hb', function() gs.blame_line({ full = true }) end, opts)
end,
})
'';
}
vim-fugitive
# ===================
# UI Enhancements
# ===================
{
plugin = lualine-nvim;
type = "lua";
config = ''
require('lualine').setup({
options = {
theme = 'auto',
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
globalstatus = true,
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff', 'diagnostics' },
lualine_c = { { 'filename', path = 1 } },
lualine_x = { 'encoding', 'fileformat', 'filetype' },
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
})
'';
}
{
plugin = bufferline-nvim;
type = "lua";
config = ''
require('bufferline').setup({
options = {
diagnostics = "nvim_lsp",
offsets = {
{ filetype = "neo-tree", text = "File Explorer", highlight = "Directory" }
},
show_buffer_close_icons = true,
show_close_icon = false,
},
})
vim.keymap.set('n', '<S-l>', ':BufferLineCycleNext<CR>', { silent = true })
vim.keymap.set('n', '<S-h>', ':BufferLineCyclePrev<CR>', { silent = true })
vim.keymap.set('n', '<leader>bp', ':BufferLineTogglePin<CR>', { silent = true })
vim.keymap.set('n', '<leader>bc', ':BufferLinePickClose<CR>', { silent = true })
'';
}
{
plugin = indent-blankline-nvim;
type = "lua";
config = ''
require('ibl').setup({
indent = { char = "" },
scope = { enabled = true },
})
'';
}
# Color scheme
{
plugin = catppuccin-nvim;
type = "lua";
config = ''
require('catppuccin').setup({
flavour = 'mocha',
integrations = {
cmp = true,
gitsigns = true,
treesitter = true,
telescope = { enabled = true },
neo_tree = true,
indent_blankline = { enabled = true },
native_lsp = { enabled = true },
},
})
vim.cmd.colorscheme('catppuccin')
'';
}
# ===================
# Editor Enhancements
# ===================
{
plugin = which-key-nvim;
type = "lua";
config = ''
require('which-key').setup({})
'';
}
{
plugin = comment-nvim;
type = "lua";
config = ''
require('Comment').setup()
'';
}
{
plugin = nvim-autopairs;
type = "lua";
config = ''
require('nvim-autopairs').setup({
check_ts = true,
})
-- Integrate with nvim-cmp
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local cmp = require('cmp')
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
'';
}
{
plugin = nvim-surround;
type = "lua";
config = ''
require('nvim-surround').setup({})
'';
}
{
plugin = todo-comments-nvim;
type = "lua";
config = ''
require('todo-comments').setup({})
vim.keymap.set('n', '<leader>ft', ':TodoTelescope<CR>', { silent = true, desc = 'Find TODOs' })
'';
}
{
plugin = trouble-nvim;
type = "lua";
config = ''
require('trouble').setup({})
vim.keymap.set('n', '<leader>xx', ':Trouble diagnostics toggle<CR>', { silent = true, desc = 'Diagnostics' })
vim.keymap.set('n', '<leader>xd', ':Trouble diagnostics toggle filter.buf=0<CR>', { silent = true, desc = 'Buffer diagnostics' })
'';
}
# Flash for quick navigation
{
plugin = flash-nvim;
type = "lua";
config = ''
require('flash').setup({})
vim.keymap.set({ 'n', 'x', 'o' }, 's', function() require('flash').jump() end, { desc = 'Flash' })
vim.keymap.set({ 'n', 'x', 'o' }, 'S', function() require('flash').treesitter() end, { desc = 'Flash Treesitter' })
'';
}
# Mini.nvim utilities
{
plugin = mini-nvim;
type = "lua";
config = ''
require('mini.ai').setup() -- Better text objects
require('mini.splitjoin').setup() -- Split/join arguments
require('mini.move').setup() -- Move lines/selections
'';
}
# Formatting
{
plugin = conform-nvim;
type = "lua";
config = ''
require('conform').setup({
formatters_by_ft = {
lua = { 'stylua' },
python = { 'isort', 'black' },
javascript = { 'prettierd' },
typescript = { 'prettierd' },
javascriptreact = { 'prettierd' },
typescriptreact = { 'prettierd' },
json = { 'prettierd' },
html = { 'prettierd' },
css = { 'prettierd' },
nix = { 'nixpkgs_fmt' },
sh = { 'shfmt' },
bash = { 'shfmt' },
},
format_on_save = {
timeout_ms = 500,
lsp_fallback = true,
},
})
'';
}
];
# Core Neovim options
extraLuaConfig = ''
-- Leader key
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Basic options
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.expandtab = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.smartindent = true
vim.opt.clipboard = 'unnamedplus'
vim.opt.mouse = 'a'
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.hlsearch = true
vim.opt.incsearch = true
vim.opt.wrap = false
vim.opt.scrolloff = 8
vim.opt.sidescrolloff = 8
vim.opt.signcolumn = 'yes'
vim.opt.updatetime = 250
vim.opt.timeoutlen = 300
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.cursorline = true
vim.opt.termguicolors = true
vim.opt.undofile = true
vim.opt.completeopt = 'menu,menuone,noselect'
-- Better diagnostics display
vim.diagnostic.config({
virtual_text = true,
signs = true,
underline = true,
update_in_insert = false,
severity_sort = true,
float = {
border = 'rounded',
source = 'always',
},
})
-- Essential keymaps
local opts = { noremap = true, silent = true }
-- Better window navigation
vim.keymap.set('n', '<C-h>', '<C-w>h', opts)
vim.keymap.set('n', '<C-j>', '<C-w>j', opts)
vim.keymap.set('n', '<C-k>', '<C-w>k', opts)
vim.keymap.set('n', '<C-l>', '<C-w>l', opts)
-- Resize windows
vim.keymap.set('n', '<C-Up>', ':resize +2<CR>', opts)
vim.keymap.set('n', '<C-Down>', ':resize -2<CR>', opts)
vim.keymap.set('n', '<C-Left>', ':vertical resize -2<CR>', opts)
vim.keymap.set('n', '<C-Right>', ':vertical resize +2<CR>', opts)
-- Move text up and down in visual mode
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv", opts)
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv", opts)
-- Stay in indent mode
vim.keymap.set('v', '<', '<gv', opts)
vim.keymap.set('v', '>', '>gv', opts)
-- Clear search highlight
vim.keymap.set('n', '<Esc>', ':nohlsearch<CR>', opts)
-- Buffer management
vim.keymap.set('n', '<leader>bd', ':bdelete<CR>', opts)
vim.keymap.set('n', '<leader>bn', ':bnext<CR>', opts)
vim.keymap.set('n', '<leader>bp', ':bprevious<CR>', opts)
-- Quick save/quit
vim.keymap.set('n', '<leader>w', ':w<CR>', opts)
vim.keymap.set('n', '<leader>q', ':q<CR>', opts)
vim.keymap.set('n', '<leader>Q', ':qa!<CR>', opts)
-- Better paste (don't yank replaced text)
vim.keymap.set('v', 'p', '"_dP', opts)
-- Center screen after jumps
vim.keymap.set('n', '<C-d>', '<C-d>zz', opts)
vim.keymap.set('n', '<C-u>', '<C-u>zz', opts)
vim.keymap.set('n', 'n', 'nzzzv', opts)
vim.keymap.set('n', 'N', 'Nzzzv', opts)
'';
};
}
+2 -41
View File
@@ -10,14 +10,6 @@
programs.bash = {
enable = true;
enableCompletion = true;
shellAliases = {
ll = "ls -la";
".." = "cd ..";
"..." = "cd ../..";
gs = "git status";
gd = "git diff";
};
};
# Zsh configuration
@@ -27,44 +19,13 @@
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
ll = "ls -la";
".." = "cd ..";
"..." = "cd ../..";
gs = "git status";
gd = "git diff";
nix-gc = "nix-collect-garbage -d";
};
history = {
size = 10000;
path = "${config.home.homeDirectory}/.zsh_history";
};
initContent = ''
# Custom prompt or additional configuration
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_FIND_NO_DUPS
setopt HIST_REDUCE_BLANKS
'';
};
# Fish configuration
programs.fish = {
enable = true;
shellAliases = {
ll = "ls -la";
".." = "cd ..";
"..." = "cd ../..";
gs = "git status";
gd = "git diff";
};
functions = {
mkcd = "mkdir -p $argv[1]; and cd $argv[1]";
};
};
# Fish configuration is in ./fish.nix
# Starship prompt (works with all shells)
programs.starship = {
@@ -92,7 +53,7 @@
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
enableFishIntegration = false; # Using PatrickF1/fzf.fish plugin instead
};
# Eza (modern ls replacement)
+177 -14
View File
@@ -1,4 +1,4 @@
# Terminal multiplexer configurations
# Terminal multiplexer configurations - Batteries-included developer setup
{
inputs,
lib,
@@ -7,40 +7,203 @@
...
}: {
home.packages = with pkgs; [
# Optional multiplexers (tmux enabled by default below)
# Required for some tmux plugins
fzf
# Optional multiplexers
# zellij
];
# Tmux configuration
# Tmux configuration - Optimized for developer productivity
programs.tmux = {
enable = true;
terminal = "tmux-256color";
historyLimit = 10000;
baseIndex = 1;
historyLimit = 50000; # Much larger scrollback
baseIndex = 1; # Windows start at 1
keyMode = "vi";
mouse = true;
prefix = "C-a"; # More ergonomic than C-b
escapeTime = 0; # No delay for escape (important for vim)
sensibleOnTop = true;
plugins = with pkgs.tmuxPlugins; [
# Core essentials
sensible
yank
vim-tmux-navigator
yank # System clipboard integration
vim-tmux-navigator # Seamless vim/tmux pane navigation
better-mouse-mode # Enhanced mouse support
# Session persistence - survive reboots
{
plugin = resurrect;
extraConfig = ''
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-processes 'ssh nvim vim "~rails server" "~rails console"'
'';
}
{
plugin = continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-save-interval '10'
'';
}
# Fast copy with hints (like vimium)
tmux-thumbs
# Fuzzy session management
# Note: sessionx is not packaged in nixpkgs, uncomment if you add it as an overlay
# {
# plugin = sessionx;
# extraConfig = ''
# set -g @sessionx-bind 'o'
# set -g @sessionx-zoxide-mode 'on'
# '';
# }
# URL opening
fzf-tmux-url
# Theme - Catppuccin (mocha)
{
plugin = catppuccin;
extraConfig = ''
set -g @catppuccin_flavor 'mocha'
set -g @catppuccin_window_status_style 'rounded'
set -g @catppuccin_status_background 'default'
# Window format
set -g @catppuccin_window_number_position 'right'
set -g @catppuccin_window_default_fill 'number'
set -g @catppuccin_window_default_text '#W'
set -g @catppuccin_window_current_fill 'number'
set -g @catppuccin_window_current_text '#W'
# Status bar modules
set -g @catppuccin_status_modules_right 'session date_time'
set -g @catppuccin_status_modules_left ''''
set -g @catppuccin_date_time_text '%H:%M'
'';
}
];
extraConfig = ''
# Split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# ============================================
# GENERAL SETTINGS
# ============================================
# True color support
set -ag terminal-overrides ",xterm-256color:RGB"
set -ag terminal-overrides ",*256col*:Tc"
# Undercurl support (for spell checking in nvim)
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# Renumber windows when one is closed
set -g renumber-windows on
# Enable focus events (for vim autoread)
set -g focus-events on
# Faster command sequences
set -s escape-time 0
# Increase tmux messages display duration
set -g display-time 4000
# Status bar refresh interval
set -g status-interval 5
# Aggressive resize (useful when switching clients)
setw -g aggressive-resize on
# ============================================
# KEY BINDINGS
# ============================================
# Split panes using | and - in current directory
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# New window in current directory
bind c new-window -c "#{pane_current_path}"
# Reload config
bind r source-file ~/.config/tmux/tmux.conf
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!"
# Easy pane switching
# Quick pane switching with Alt+arrow (no prefix needed)
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Quick pane switching with Alt+hjkl (vim style, no prefix)
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
# Resize panes with prefix + HJKL
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Quick window switching with Alt+number
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
# Switch to last window
bind Space last-window
# Switch to last session
bind -r Tab switch-client -l
# ============================================
# COPY MODE (vi-style)
# ============================================
# Enter copy mode with prefix + v (in addition to [)
bind v copy-mode
# Vi-style selection in copy mode
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# ============================================
# POPUP WINDOWS (modern tmux feature)
# ============================================
# Quick terminal popup
bind -n M-t display-popup -E -w 80% -h 80%
# Git status popup
bind g display-popup -E -w 80% -h 80% "lazygit || git status"
# ============================================
# SESSION MANAGEMENT
# ============================================
# Create new session
bind S command-prompt -p "New session name:" "new-session -s '%%'"
# Kill session
bind X confirm-before -p "Kill session #S? (y/n)" kill-session
# Detach other clients (claim session)
bind D detach-client -a
'';
};
}
-54
View File
@@ -1,54 +0,0 @@
# Yabai window manager configuration (macOS only)
# Note: Yabai is a system-level service and should be configured through nix-darwin
# This file only installs the package for home-manager
{
inputs,
lib,
config,
pkgs,
...
}: {
# Install yabai package for user
home.packages = lib.mkIf pkgs.stdenv.isDarwin [
pkgs.yabai
];
# Create yabai config file
home.file.".yabairc" = lib.mkIf pkgs.stdenv.isDarwin {
text = ''
#!/usr/bin/env sh
# layout
yabai -m config layout bsp
yabai -m config auto_balance off
yabai -m config split_ratio 0.50
yabai -m config window_placement second_child
# Gaps
yabai -m config window_gap 18
yabai -m config top_padding 18
yabai -m config bottom_padding 52
yabai -m config left_padding 18
yabai -m config right_padding 18
# shadows and borders
yabai -m config window_shadow float
# mouse
yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse off
yabai -m config mouse_modifier cmd
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
yabai -m config mouse_drop_action swap
# rules
yabai -m rule --add app="^(Genshin Impact|LuLu|Vimac|Calculator|Software Update|Dictionary|VLC|System Preferences|zoom.us|Photo Booth|Archive Utility|Python|LibreOffice|App Store|Steam|Alfred|Activity Monitor)$" manage=off
yabai -m rule --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off
yabai -m rule --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off
yabai -m rule --add label="About This Mac" app="System Information" title="About This Mac" manage=off
yabai -m rule --add label="Select file to save to" app="^Inkscape$" title="Select file to save to" manage=off
'';
executable = true;
};
}
-111
View File
@@ -1,111 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
super = "lalt";
in {
services.skhd = {
enable = true;
package = pkgs.skhd;
skhdConfig = ''
## Navigation (${super} - ...)
# Space Navigation (four spaces per display): ${super} - {1, 2, 3, 4}
${super} - 1 : yabai -m space --focus 1
${super} - 2 : yabai -m space --focus 2
${super} - 3 : yabai -m space --focus 3
${super} - 4 : yabai -m space --focus 4
${super} - 5 : yabai -m space --focus 5
${super} - 6 : yabai -m space --focus 6
${super} - 7 : yabai -m space --focus 7
${super} - 8 : yabai -m space --focus 8
${super} - 9 : yabai -m space --focus 9
${super} - 0 : yabai -m space --focus 0
# Window Navigation (through display borders): ${super} - {h, j, k, l}
${super} - h : yabai -m window --focus west || yabai -m display --focus west
${super} - j : yabai -m window --focus south || yabai -m display --focus south
${super} - k : yabai -m window --focus north || yabai -m display --focus north
${super} - l : yabai -m window --focus east || yabai -m display --focus east
# Float / Unfloat window: ${super} - space
# ${super} - space : yabai -m window --toggle float; sketchybar --trigger window_focus
# Make window zoom to fullscreen: shift + ${super} - f
shift + ${super} - f : yabai -m window --toggle zoom-fullscreen; sketchybar --trigger window_focus
# Make window zoom to parent node: ${super} - f
${super} - f : yabai -m window --toggle zoom-parent; sketchybar --trigger window_focus
## Window Movement (shift + ${super} - ...)
# Moving windows in spaces: shift + ${super} - {h, j, k, l}
shift + ${super} - h : yabai -m window --warp west || $(yabai -m window --display west && sketchybar --trigger windows_on_spaces && yabai -m display --focus west && yabai -m window --warp last) || yabai -m window --move rel:-10:0
shift + ${super} - j : yabai -m window --warp south || $(yabai -m window --display south && sketchybar --trigger windows_on_spaces && yabai -m display --focus south) || yabai -m window --move rel:0:10
shift + ${super} - k : yabai -m window --warp north || $(yabai -m window --display north && sketchybar --trigger windows_on_spaces && yabai -m display --focus north) || yabai -m window --move rel:0:-10
shift + ${super} - l : yabai -m window --warp east || $(yabai -m window --display east && sketchybar --trigger windows_on_spaces && yabai -m display --focus east && yabai -m window --warp first) || yabai -m window --move rel:10:0
# Toggle split orientation of the selected windows node: shift + ${super} - s
shift + ${super} - s : yabai -m window --toggle split
# Moving windows between spaces: shift + ${super} - {1, 2, 3, 4, p, n } (Assumes 4 Spaces Max per Display)
shift + ${super} - 1 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
yabai -m window --space $((1+4*($DISPLAY - 1)));\
sketchybar --trigger windows_on_spaces
shift + ${super} - 2 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
yabai -m window --space $((2+4*($DISPLAY - 1)));\
sketchybar --trigger windows_on_spaces
shift + ${super} - 3 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
yabai -m window --space $((3+4*($DISPLAY - 1)));\
sketchybar --trigger windows_on_spaces
shift + ${super} - 4 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
yabai -m window --space $((4+4*($DISPLAY - 1)));\
sketchybar --trigger windows_on_spaces
shift + ${super} - p : yabai -m window --space prev; yabai -m space --focus prev; sketchybar --trigger windows_on_spaces
shift + ${super} - n : yabai -m window --space next; yabai -m space --focus next; sketchybar --trigger windows_on_spaces
# Mirror Space on X and Y Axis: shift + ${super} - {x, y}
shift + ${super} - x : yabai -m space --mirror x-axis
shift + ${super} - y : yabai -m space --mirror y-axis
## Stacks (shift + ctrl - ...)
# Add the active window to the window or stack to the {direction}: shift + ctrl - {h, j, k, l}
shift + ctrl - h : yabai -m window west --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
shift + ctrl - j : yabai -m window south --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
shift + ctrl - k : yabai -m window north --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
shift + ctrl - l : yabai -m window east --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
# Stack Navigation: shift + ctrl - {n, p}
shift + ctrl - n : yabai -m window --focus stack.next
shift + ctrl - p : yabai -m window --focus stack.prev
## Resize (ctrl + ${super} - ...)
# Resize windows: ctrl + ${super} - {h, j, k, l}
ctrl + ${super} - h : yabai -m window --resize right:-100:0 || yabai -m window --resize left:-100:0
ctrl + ${super} - j : yabai -m window --resize bottom:0:100 || yabai -m window --resize top:0:100
ctrl + ${super} - k : yabai -m window --resize bottom:0:-100 || yabai -m window --resize top:0:-100
ctrl + ${super} - l : yabai -m window --resize right:100:0 || yabai -m window --resize left:100:0
# Equalize size of windows: ctrl + ${super} - e
ctrl + ${super} - e : yabai -m space --balance
# Enable / Disable gaps in current workspace: ctrl + ${super} - g
ctrl + ${super} - g : yabai -m space --toggle padding; yabai -m space --toggle gap
# Enable / Disable window borders in current workspace: ctrl + ${super} - b
ctrl + ${super} - b : yabai -m config window_border off
shift + ctrl + ${super} - b : yabai -m config window_border on
## Misc
# Open new Alacritty window
${super} - return : kitty
${super} - o : yabai -m window $(yabai -m query --windows | jq '.[] | select(.app==".kitty-wrapped") | .id') --space $(yabai -m query --spaces | jq '.[] | select(.has-focus==1) .id')
'';
};
}
+13 -7
View File
@@ -1,5 +1,8 @@
# This file defines overlays
{inputs, ...}: {
# Emacs overlay for latest Emacs builds
emacs = inputs.emacs-overlay.overlays.default;
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs final.pkgs;
@@ -7,13 +10,16 @@
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
modifications = final: prev: {
maven363 = prev.maven.overrideAttrs (old: rec {
pname = "apache-maven";
version = "3.6.3";
src = prev.fetchurl {
url = "mirror://apache/maven/maven-3/${version}/binaries/${pname}-${version}-bin.tar.gz";
sha256 = "sha256-Jq2R11GzqaUwh676dD9OFqF3QdORWyGc90ESv4ekOMU=";
};
# Add emacs-plus patches on top of emacs-overlay's emacs30
emacs30 = prev.emacs30.overrideAttrs (old: {
patches = (old.patches or []) ++ [
# Fix window role for yabai compatibility
(final.fetchpatch {
name = "fix-window-role.patch";
url = "http://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/refs/heads/master/patches/emacs-28/fix-window-role.patch";
hash = "sha256-+z/KfsBm1lvZTZNiMbxzXQGRTjkCFO4QPlEK35upjsE=";
})
];
});
};