Added: Nixvim modules
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
# nixpkgs is best for CLI tools
|
# nixpkgs is best for CLI tools
|
||||||
casks = [
|
casks = [
|
||||||
"element"
|
"element"
|
||||||
|
"affinity"
|
||||||
|
|
||||||
];
|
];
|
||||||
brews = [ ];
|
brews = [ ];
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
{ app = "/Users/phil/Applications/Home Manager Apps/Obsidian.app"; }
|
{ app = "/Users/phil/Applications/Home Manager Apps/Obsidian.app"; }
|
||||||
{ app = "/Users/phil/Applications/Home Manager Apps/OpenSCAD.app"; }
|
{ app = "/Users/phil/Applications/Home Manager Apps/OpenSCAD.app"; }
|
||||||
{ app = "/Applications/okular.app"; }
|
{ app = "/Applications/okular.app"; }
|
||||||
|
{ app = "/Applications/Affinity.app"; }
|
||||||
{ app = "/System/Applications/Mail.app"; }
|
{ app = "/System/Applications/Mail.app"; }
|
||||||
{ app = "/System/Applications/Launchpad.app"; }
|
{ app = "/System/Applications/Launchpad.app"; }
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -39,67 +39,67 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
skhd = {
|
# skhd = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
skhdConfig = ''
|
# skhdConfig = ''
|
||||||
# Application Bindings
|
# Application Bindings
|
||||||
cmd - q : open -a kitty
|
# cmd - q : open -a kitty
|
||||||
cmd - e : ${pkgs.kitty}/bin/kitty yazi
|
# cmd - e : ${pkgs.kitty}/bin/kitty yazi
|
||||||
cmd - o : open -a "Obsidian"
|
# cmd - o : open -a "Obsidian"
|
||||||
cmd - i : open -a "Floorp"
|
# cmd - i : open -a "Floorp"
|
||||||
cmd - g : open -a "Mail"
|
# cmd - g : open -a "Mail"
|
||||||
|
|
||||||
# Window Management (using yabai if installed, otherwise basic macOS)
|
# Window Management (using yabai if installed, otherwise basic macOS)
|
||||||
cmd + shift - c : yabai -m window --close || osascript -e 'tell application "System Events" to keystroke "w" using command down'
|
#cmd + shift - c : yabai -m window --close || osascript -e 'tell application "System Events" to keystroke "w" using command down'
|
||||||
cmd + shift - v : yabai -m window --toggle float
|
#cmd + shift - v : yabai -m window --toggle float
|
||||||
|
|
||||||
# Focus windows (vim-like)
|
# Focus windows (vim-like)
|
||||||
cmd - left : yabai -m window --focus west
|
# cmd - left : yabai -m window --focus west
|
||||||
cmd - right : yabai -m window --focus east
|
# cmd - right : yabai -m window --focus east
|
||||||
cmd - up : yabai -m window --focus north
|
# cmd - up : yabai -m window --focus north
|
||||||
cmd - down : yabai -m window --focus south
|
# cmd - down : yabai -m window --focus south
|
||||||
|
|
||||||
# Move windows to spaces (workspaces)
|
# Move windows to spaces (workspaces)
|
||||||
cmd + shift - 1 : yabai -m window --space 1
|
# cmd + shift - 1 : yabai -m window --space 1
|
||||||
cmd + shift - 2 : yabai -m window --space 2
|
# cmd + shift - 2 : yabai -m window --space 2
|
||||||
cmd + shift - 3 : yabai -m window --space 3
|
# cmd + shift - 3 : yabai -m window --space 3
|
||||||
cmd + shift - 4 : yabai -m window --space 4
|
# cmd + shift - 4 : yabai -m window --space 4
|
||||||
cmd + shift - 5 : yabai -m window --space 5
|
# cmd + shift - 5 : yabai -m window --space 5
|
||||||
cmd + shift - 6 : yabai -m window --space 6
|
# cmd + shift - 6 : yabai -m window --space 6
|
||||||
cmd + shift - 7 : yabai -m window --space 7
|
# cmd + shift - 7 : yabai -m window --space 7
|
||||||
cmd + shift - 8 : yabai -m window --space 8
|
# cmd + shift - 8 : yabai -m window --space 8
|
||||||
cmd + shift - 9 : yabai -m window --space 9
|
# cmd + shift - 9 : yabai -m window --space 9
|
||||||
cmd + shift - 0 : yabai -m window --space 10
|
# cmd + shift - 0 : yabai -m window --space 10
|
||||||
|
|
||||||
# Switch to spaces (workspaces)
|
# Switch to spaces (workspaces)
|
||||||
cmd - 1 : yabai -m space --focus 1
|
# cmd - 1 : yabai -m space --focus 1
|
||||||
cmd - 2 : yabai -m space --focus 2
|
# cmd - 2 : yabai -m space --focus 2
|
||||||
cmd - 3 : yabai -m space --focus 3
|
# cmd - 3 : yabai -m space --focus 3
|
||||||
cmd - 4 : yabai -m space --focus 4
|
# cmd - 4 : yabai -m space --focus 4
|
||||||
cmd - 5 : yabai -m space --focus 5
|
# cmd - 5 : yabai -m space --focus 5
|
||||||
cmd - 6 : yabai -m space --focus 6
|
# cmd - 6 : yabai -m space --focus 6
|
||||||
cmd - 7 : yabai -m space --focus 7
|
# cmd - 7 : yabai -m space --focus 7
|
||||||
cmd - 8 : yabai -m space --focus 8
|
# cmd - 8 : yabai -m space --focus 8
|
||||||
cmd - 9 : yabai -m space --focus 9
|
# cmd - 9 : yabai -m space --focus 9
|
||||||
cmd - 0 : yabai -m space --focus 10
|
# cmd - 0 : yabai -m space --focus 10
|
||||||
|
|
||||||
# Screenshot (macOS native)
|
# Screenshot (macOS native)
|
||||||
cmd - z : screencapture -i ~/Pictures/Screenshots/$(date +%s).png
|
# cmd - z : screencapture -i ~/Pictures/Screenshots/$(date +%s).png
|
||||||
cmd - u : screencapture ~/Pictures/Screenshots/$(date +%s).png
|
# cmd - u : screencapture ~/Pictures/Screenshots/$(date +%s).png
|
||||||
|
|
||||||
# Launcher (using Raycast or Spotlight as Rofi alternative)
|
# Launcher (using Raycast or Spotlight as Rofi alternative)
|
||||||
cmd - r : open -a "Raycast" || osascript -e 'tell application "System Events" to keystroke space using command down'
|
# cmd - r : open -a "Raycast" || osascript -e 'tell application "System Events" to keystroke space using command down'
|
||||||
|
|
||||||
# Lock screen
|
# Lock screen
|
||||||
cmd - m : pmset displaysleepnow
|
# cmd - m : pmset displaysleepnow
|
||||||
|
|
||||||
# Toggle layout (if using yabai)
|
# Toggle layout (if using yabai)
|
||||||
cmd - j : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "float" else "bsp" end')
|
# cmd - j : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "float" else "bsp" end')
|
||||||
cmd - p : yabai -m window --toggle split
|
# cmd - p : yabai -m window --toggle split
|
||||||
|
|
||||||
# Reload skhd config
|
# Reload skhd config
|
||||||
cmd + shift - r : skhd --reload
|
# cmd + shift - r : skhd --reload
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
inputs.nixvim.homeModules.nixvim
|
inputs.nixvim.homeModules.nixvim
|
||||||
./neovim
|
./neovim
|
||||||
|
./python.nix
|
||||||
|
|
||||||
inputs.nixcord.homeModules.nixcord
|
inputs.nixcord.homeModules.nixcord
|
||||||
./nixcord.nix
|
./nixcord.nix
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
_: {
|
{ pkgs, ... }: {
|
||||||
programs.sketchybar = {
|
programs.sketchybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
configType = "lua";
|
||||||
|
sbarLuaPackage = pkgs.sbarlua;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,9 @@
|
|||||||
./alpha.nix
|
./alpha.nix
|
||||||
./avante.nix
|
./avante.nix
|
||||||
./openscad.nix
|
./openscad.nix
|
||||||
|
./jupytext.nix
|
||||||
|
./live-server.nix
|
||||||
|
./which-key.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
|
|||||||
18
home/neovim/jupytext.nix
Normal file
18
home/neovim/jupytext.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ ... }: {
|
||||||
|
# Jupytext: Execute Jupyter notebooks directly in Neovim
|
||||||
|
programs.nixvim.jupytext = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
custom_language_formatting = {
|
||||||
|
python = {
|
||||||
|
extension = "md";
|
||||||
|
force_ft = "markdown";
|
||||||
|
style = "markdown";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
force_ft = null;
|
||||||
|
output_extension = "auto";
|
||||||
|
style = "light";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
15
home/neovim/live-server.nix
Normal file
15
home/neovim/live-server.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
# Live Server: Auto-reload browser for web development
|
||||||
|
# Uses browser-sync for live reload functionality
|
||||||
|
programs.nixvim = {
|
||||||
|
keymaps = [{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ls";
|
||||||
|
action =
|
||||||
|
"<cmd>terminal browser-sync start --server --files '*.html, *.css, *.js' --no-notify<cr>";
|
||||||
|
options.desc = "Start live server (browser-sync)";
|
||||||
|
}];
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [ nodePackages.browser-sync ];
|
||||||
|
};
|
||||||
|
}
|
||||||
94
home/neovim/which-key.nix
Normal file
94
home/neovim/which-key.nix
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
# Which-key: Display available keybindings in popup
|
||||||
|
# Shows all possible key combinations after pressing leader or other prefix keys
|
||||||
|
programs.nixvim.plugins.which-key = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
delay = 500; # Time in ms before popup shows
|
||||||
|
|
||||||
|
icons = {
|
||||||
|
breadcrumb = "»";
|
||||||
|
separator = "➜";
|
||||||
|
group = "+";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Organize keymaps into named groups
|
||||||
|
spec = [
|
||||||
|
# Leader key groups
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>a";
|
||||||
|
group = "Avante AI";
|
||||||
|
icon = "🤖";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>f";
|
||||||
|
group = "Find/Files/Terminal";
|
||||||
|
icon = "🔍";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>m";
|
||||||
|
group = "Molten (Jupyter)";
|
||||||
|
icon = "📓";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>o";
|
||||||
|
group = "OpenSCAD";
|
||||||
|
icon = "🔧";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Bracket navigation groups
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "[";
|
||||||
|
group = "Previous";
|
||||||
|
icon = "⬅️";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "]";
|
||||||
|
group = "Next";
|
||||||
|
icon = "➡️";
|
||||||
|
}
|
||||||
|
|
||||||
|
# g prefix groups
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "g";
|
||||||
|
group = "Go/LSP";
|
||||||
|
icon = "🎯";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "gr";
|
||||||
|
group = "LSP References/Rename";
|
||||||
|
icon = "🔗";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "gc";
|
||||||
|
group = "Comments";
|
||||||
|
icon = "💬";
|
||||||
|
}
|
||||||
|
|
||||||
|
# l prefix
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>l";
|
||||||
|
group = "Live Server";
|
||||||
|
icon = "🌐";
|
||||||
|
}
|
||||||
|
|
||||||
|
# z prefix
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "z";
|
||||||
|
group = "Folds/Spell";
|
||||||
|
icon = "📋";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Hide specific mappings to reduce clutter
|
||||||
|
disable = {
|
||||||
|
builtin_keys = {
|
||||||
|
# Hide these default vim keys from which-key
|
||||||
|
i = [ "<C-R>" "<C-W>" ];
|
||||||
|
n = [ "<C-W>" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
ripgrep
|
ripgrep
|
||||||
gh # Move to git
|
gh # Move to git
|
||||||
zoxide # Move to fish
|
zoxide # Move to fish
|
||||||
|
unrar
|
||||||
|
|
||||||
# programming languages
|
# programming languages
|
||||||
#mise # node, deno, bun, rust, python, etc.
|
#mise # node, deno, bun, rust, python, etc.
|
||||||
|
|||||||
26
home/python.nix
Normal file
26
home/python.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# Python 3.13 (newest stable)
|
||||||
|
python313
|
||||||
|
python313Packages.pip
|
||||||
|
python313Packages.virtualenv
|
||||||
|
|
||||||
|
# Additional useful tools
|
||||||
|
python313Packages.pipx # Install Python apps in isolated environments
|
||||||
|
uv # Fast Python package installer (alternative to pip)
|
||||||
|
];
|
||||||
|
|
||||||
|
# Set up default Python version
|
||||||
|
home.sessionVariables = { PYTHON = "${pkgs.python313}/bin/python3"; };
|
||||||
|
|
||||||
|
# Shell aliases for convenience
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
venv = "python3 -m venv";
|
||||||
|
activate = "source venv/bin/activate";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish.shellAliases = {
|
||||||
|
venv = "python3 -m venv";
|
||||||
|
activate = "source venv/bin/activate.fish";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -7,6 +7,9 @@
|
|||||||
tree
|
tree
|
||||||
fastfetch # system stats
|
fastfetch # system stats
|
||||||
tabiew # Table viewer
|
tabiew # Table viewer
|
||||||
|
glow # MD Viewer
|
||||||
|
|
||||||
|
llm # LLM in the Terminal
|
||||||
|
|
||||||
# Fun stuff
|
# Fun stuff
|
||||||
lolcat
|
lolcat
|
||||||
@@ -87,7 +90,12 @@
|
|||||||
"sudo darwin-rebuild switch --flake ~/.config/nix#cyper-mac";
|
"sudo darwin-rebuild switch --flake ~/.config/nix#cyper-mac";
|
||||||
};
|
};
|
||||||
|
|
||||||
initContent = "fastfetch";
|
initContent = ''
|
||||||
|
fastfetch
|
||||||
|
ai() {
|
||||||
|
llm -m groq/groq/compound "$@" | glow
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
@@ -109,6 +117,12 @@
|
|||||||
fastfetch
|
fastfetch
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
functions.ai = {
|
||||||
|
body = ''
|
||||||
|
llm -m groq/groq/compound $argv | glow
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
|
|||||||
Reference in New Issue
Block a user