Finalizing everything ... before gruvbox appears.

This commit is contained in:
BalrajSinghGidda
2026-03-22 02:51:18 +05:30
parent 84a269dc32
commit 89779526ae
9 changed files with 256 additions and 168 deletions

View File

@@ -4,6 +4,16 @@
Welcome to my NixOS configuration! This is my personal setup running on a Dell Latitude 7490, featuring a sleek Qtile window manager with a Tokyo Night theme aesthetic. Built for coding, gaming, and general tech tinkering.
## 🆕 Recent Updates (March 2026)
### Major Changes:
- **Neovim Migration to nvf**: Switched from manual Lua configuration to the nvf (Neovim framework) for declarative Neovim setup
- **nix-alien Integration**: Added support for running unpatched binaries with automatic library detection
- **Enhanced nix-ld**: Configured with 40+ common libraries for better non-NixOS binary compatibility
- **Removed config/nvim/**: All Neovim configuration now lives in `modules/nixos/nvf.nix`
See the [CHANGELOG.md](CHANGELOG.md) for detailed version history.
## 📚 Documentation
New to this repo? Start here:
@@ -27,19 +37,23 @@ nixos-dotfiles/
├── modules/ # Reusable configuration modules
│ ├── nixos/ # System-level (requires sudo)
│ │ ├── core.nix # Boot, networking, users
│ │ ├── core.nix # Boot, networking, users, nix-ld
│ │ ├── packages.nix # System packages & fonts
│ │ ├── services.nix # System services
│ │ ├── nvf.nix # Neovim (via nvf framework)
│ │ └── wallpapers.nix # Custom wallpapers
│ │
│ └── home-manager/ # User-level (no sudo)
│ ├── apps.nix # User packages
│ ├── cli-tools.nix # CLI utilities
│ ├── gui-apps.nix # GUI applications
│ ├── dev-tools.nix # Development tools
│ ├── git.nix # Git configuration
│ ├── shell.nix # Bash configuration
│ └── devshell-scripts.nix # Dev environment scripts
│ └── programs/ # Program-specific configs
│ ├── gemini-cli.nix
│ └── nix-alien.nix
├── config/ # Application dotfiles
│ ├── nvim/ # Neovim configuration
│ ├── qtile/ # Qtile WM configuration
│ ├── rofi/ # Rofi launcher
│ ├── picom/ # Compositor
@@ -66,19 +80,22 @@ nixos-dotfiles/
- 🎯 **Declarative Configuration**: Everything is version-controlled and reproducible
- 🌊 **Flakes-Based**: Modern Nix flakes for dependency management
- 🏠 **Home Manager Integration**: User-level package and config management
- 🔧 **LSP-Powered Neovim**: Pre-configured for Lua, PHP, TypeScript, Rust, Zig, C/C++, Nix, Haskell, and more
- 🔧 **nvf-Powered Neovim**: Declaratively configured via NixOS (no Mason, no manual Lua!)
- 🎨 **Consistent Theming**: Tokyo Night colors across all applications
-**Performance Optimized**: Lightweight and snappy on a Dell Latitude 7490
- 🐳 **Docker Ready**: Rootless Docker setup included
- 👽 **nix-alien Support**: Run unpatched binaries with automatic library detection
- 📦 **nix-ld Integration**: 40+ system libraries for non-NixOS executables
## 📦 Key Applications
### Development
- **Neovim** with LSP, Treesitter, Telescope, and Harpoon
- **Neovim** configured via **nvf** (Neovim framework) with LSP, Treesitter, Telescope
- Language support: Python, TypeScript, C/C++, Go, Java, Bash, Nix, HTML, CSS, SQL, YAML, Markdown
- **Kitty** terminal with custom Tokyo Night theme
- **Git** + **Lazygit** + **GitHub CLI**
- Language servers for multiple languages (no Mason, pure system packages!)
- **Zellij** and **Tmux** for terminal multiplexing
- **nix-alien** for running non-NixOS binaries (aliases: `na`, `nald`)
### Productivity
- **Firefox** as default browser
@@ -136,40 +153,29 @@ cd # Smart directory jumping with zoxide
## ⌨️ Neovim Keybinds
My Neovim setup is highly customized. Here are some key bindings:
My Neovim is configured via **nvf** (Neovim framework). Configuration is in `modules/nixos/nvf.nix`.
**Leader key:** `<Space>`
**Key features:**
- File tree: nvim-tree
- Fuzzy finder: Telescope
- Git integration: Neogit + Lazygit
- Terminal: toggleterm (open with `,`)
- Auto-completion: nvim-cmp
- LSP with format-on-save
### Essential Binds
- `<leader>cd` - Open file explorer
- `<leader>ff` - Find files (Telescope)
- `<leader>fg` - Live grep
- `<leader>fb` - Browse buffers
- `<leader>a` - Add file to Harpoon
- `<C-e>` - Toggle Harpoon menu
- `<leader>u` - Toggle Undotree
### LSP
- `gd` - Go to definition
- `gr` - Show references
- `K` - Hover documentation
- `<F2>` - Rename symbol
- `<F3>` - Format code
- `<F4>` - Code actions
Check `config/nvim/README.md` for the complete keybind list!
To customize keybinds or add plugins, edit `modules/nixos/nvf.nix` and rebuild.
## 🎨 Theme Customization
The Tokyo Night theme is applied consistently across:
- Qtile status bar and window decorations
- Kitty terminal colors
- Neovim syntax highlighting
- Neovim (via nvf configuration)
- Rofi launcher
Want to change themes? Update the color schemes in:
- `config/kitty/kitty.conf`
- `config/nvim/lua/plugins/colors.lua`
- `modules/nixos/nvf.nix` (search for "tokyonight")
- `config/rofi/tokyonight.rasi`
- `config/qtile/config.py`
@@ -198,14 +204,22 @@ My setup runs on:
sudo nixos-rebuild switch --flake ~/nixos-dotfiles/#nixos-btw --show-trace
```
### LSP not working?
Check if language servers are installed:
```bash
# Example for Lua
which lua-language-server
### Neovim LSP not working?
Neovim is configured via nvf. Check language settings in `modules/nixos/nvf.nix`.
# Example for PHP
which intelephense
Language servers are installed automatically. To verify:
```bash
which lua-language-server
which nil # Nix LSP
```
### nix-alien not working?
Check if it's available:
```bash
nix-alien --version
# Or use aliases
na --version
nald --help
```
### Home Manager conflicts?

View File

@@ -9,6 +9,16 @@ This directory contains dotfiles for various applications, managed by Home Manag
- **picom/** - Picom compositor settings
- **kitty/** - Kitty terminal emulator configuration
## Important Note: Neovim Configuration
**Neovim is no longer configured through this directory.**
As of March 2026, Neovim configuration has been migrated to the **nvf** framework:
- Configuration location: `modules/nixos/nvf.nix`
- All plugins, LSP servers, and settings are managed declaratively through NixOS
- The previous `config/nvim/` directory with Lua files has been removed
- To customize Neovim, edit `modules/nixos/nvf.nix` instead
## How It Works
These configurations are symlinked to `~/.config/` by Home Manager.

View File

@@ -12,7 +12,13 @@
# Ensure Home Manager uses the same nixpkgs as system
inputs.nixpkgs.follows = "nixpkgs";
};
# nix-alien: Tool for running unpatched binaries on NixOS
# Provides dynamic library loading for non-NixOS executables
nix-alien.url = "github:thiagokokada/nix-alien";
# nvf: Neovim configuration framework
# Replaces manual Neovim config with declarative NixOS configuration
nvf = {
url = "github:NotAShelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
@@ -28,10 +34,13 @@
modules = [
# Import host-specific configuration
./hosts/nixos-btw
nvf.nixosModules.default
# Enable nvf (Neovim framework) as a NixOS module
# Configuration in modules/nixos/nvf.nix
nvf.nixosModules.default
# Add nix-alien to system packages
# Enables running unpatched binaries with automatic library detection
({ pkgs, ... }: {
environment.systemPackages = [
nix-alien.packages.x86_64-linux.nix-alien

View File

@@ -11,6 +11,7 @@ User-level configuration modules (no `sudo` required).
### Programs
- **programs/gemini-cli.nix** - Gemini AI CLI configuration
- **programs/nix-alien.nix** - nix-alien shell aliases (`na`, `nald`)
### Core Configuration
- **git.nix** - Git and GitHub CLI setup
@@ -20,6 +21,15 @@ User-level configuration modules (no `sudo` required).
- **devshell-scripts.nix** - Custom development environment creation scripts
- **devshell-scripts/** - Script implementations
## Recent Changes
### nix-alien Integration (March 2026)
Added convenience aliases for running unpatched binaries:
- `na` - Short alias for `nix-alien`
- `nald` - Short alias for `nix-alien-ld`
The nix-alien package is installed at the system level, but user-friendly aliases are provided here.
## Making Changes
After editing any module, rebuild:

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
# Bash shell configuration
programs.bash = {
enable = true;
@@ -12,7 +10,7 @@
nc = "nvim ~/nixos-dotfiles/."; # Quick edit dotfiles
btw = "echo I use NixOS, btw"; # Because we have to let everyone know
nrs = "sudo nixos-rebuild switch --flake ~/nixos-dotfiles/#nixos-btw"; # Rebuild system
collect-garbage = "sudo nix-collect-garbage -d";
collect-garbage = "sudo nix-collect-garbage -d"; # Garbage collect the system
# Config editing shortcuts
edit-nixos = "nvim ~/nixos-dotfiles/modules/nixos/";
@@ -26,31 +24,35 @@
# Utilities
bm = "bashmount"; # Mount/unmount utility
install-copilot = "curl -fsSL https://gh.io/copilot-install | bash"; # Manual installation of Github Copilot CLI
copilot = "~/.local/bin/copilot"; # Github Copilot CLI (downloaded manually)
};
# Don't save these commands in history
historyIgnore = [
"ls"
"exit"
"collect-garbage"
"nrs"
];
# Additional bash configuration
bashrcExtra = ''
# Custom prompt: cyan user@host, green directory, light blue prompt
export PS1="\[\e[38;5;75m\]\u@\h \[\e[38;5;113m\]\w \[\e[38;5;189m\]\$ \[\e[0m\]"
# Use Neovim as manpage viewer
export MANPAGER="nvim +Man!"
# Use fd for faster file searching in fzf
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow'
# Initialize direnv (per-directory environments)
eval "$(direnv hook bash)"
# Initialize zoxide (smart cd)
eval "$(zoxide init bash)"
# Show system info on shell startup
nitch
'';

View File

@@ -4,11 +4,26 @@ System-level configuration modules that require `sudo` to modify.
## Modules
- **core.nix** - Essential system settings (boot, networking, users, timezone)
- **core.nix** - Essential system settings (boot, networking, users, timezone, nix-ld)
- **packages.nix** - System-wide packages and fonts
- **services.nix** - System services (X11, audio, Bluetooth, Docker, etc.)
- **nvf.nix** - Neovim configuration using the nvf framework
- **wallpapers.nix** - Custom wallpapers package
## Recent Changes
### Neovim Migration (March 2026)
The Neovim configuration has been migrated from manual Lua configuration to the **nvf** (Neovim configuration framework):
- Removed `config/nvim/` directory with Lua files
- Added `nvf.nix` module for declarative Neovim configuration
- All plugins and LSP servers now managed through NixOS
- Configuration is more maintainable and reproducible
### nix-ld Enhancement
The `core.nix` module now includes extensive nix-ld library support:
- 40+ common libraries for running non-NixOS binaries
- Graphics, audio, SSL/TLS, and development libraries included
## Making Changes
After editing any module, rebuild the system:

View File

@@ -20,9 +20,12 @@
programs.bash.blesh.enable = true; # Bash Line Editor SHell
# Enable nix-ld for running unpatched binaries
# nix-ld provides a dynamic linker and common libraries for non-NixOS executables
# This is essential for running downloaded binaries, AppImages, and proprietary software
programs.nix-ld = {
enable = true;
# Add common libraries that non-NixOS binaries might need
# These libraries are symlinked to /run/current-system/sw/share/nix-ld/lib/
libraries = with pkgs; [
# C/C++ standard libraries
stdenv.cc.cc.lib
@@ -39,11 +42,11 @@
openssl
# X11 and graphics
libX11
libxext
libXrender
libXtst
libXi
xorg.libX11
xorg.libXext
xorg.libXrender
xorg.libXtst
xorg.libXi
libglvnd
mesa

View File

@@ -2,9 +2,9 @@
# This file imports all system-level configuration modules
{
imports = [
./core.nix # Core system settings (boot, networking, users)
./core.nix # Core system settings (boot, networking, users)
./packages.nix # System packages and fonts
./services.nix # System services and daemons
./nvf.nix # Neovim
./nvf.nix # Neovim configuration (via nvf framework)
];
}

View File

@@ -1,126 +1,151 @@
{ pkgs, ... }:
{
programs.nvf = {
enable = true;
settings = {
vim = {
viAlias = true;
vimAlias = false;
# Neovim configuration using nvf (Neovim configuration framework)
# nvf provides a declarative way to configure Neovim within NixOS
# This replaces the previous manual Lua-based configuration
programs.nvf = {
enable = true;
settings = {
vim = {
# Command aliases for backwards compatibility
viAlias = true; # Map 'vi' command to nvim
vimAlias = false; # Keep 'vim' separate
syntaxHighlighting = true;
syntaxHighlighting = true;
tabline.nvimBufferline.enable = true;
# Tab bar at the top showing open buffers
tabline.nvimBufferline.enable = true;
telescope.enable = true;
# Fuzzy finder and file navigation
telescope.enable = true;
clipboard.enable = true;
clipboard.providers.xclip.enable = true;
clipboard.registers = "unnamedplus";
# System clipboard integration
clipboard.enable = true;
clipboard.providers.xclip.enable = true;
clipboard.registers = "unnamedplus"; # Use '+' register for clipboard
undoFile.enable = true;
# Persistent undo across sessions
undoFile.enable = true;
autocomplete.nvim-cmp.enable = true;
# Auto-completion engine
autocomplete.nvim-cmp.enable = true;
debugger.nvim-dap.enable = true;
# Debug Adapter Protocol support
debugger.nvim-dap.enable = true;
ui = {
colorizer.enable = true;
illuminate.enable = true;
};
utility = {
mkdir.enable = true;
yazi-nvim.enable = true;
};
theme = {
enable = true;
name = "tokyonight";
style = "night";
};
options = {
shiftwidth = 4;
tabstop = 4;
};
languages = {
enableTreesitter = true;
enableFormat = true;
enableDAP = true;
python.enable = true;
clang.enable = true;
bash.enable = true;
css.enable = true;
go.enable = true;
java.enable = true;
sql.enable = true;
yaml.enable = true;
ts = {
enable = true;
extraDiagnostics.enable = true;
};
nix = {
enable = true;
extraDiagnostics.enable = true;
};
html = {
enable = true;
extraDiagnostics.enable = true;
};
markdown = {
enable = true;
extensions = {
markview-nvim.enable = true;
};
};
};
lsp = {
enable = true;
formatOnSave = true;
lspconfig.enable = true;
nvim-docs-view.enable = true;
};
statusline.lualine = {
enable = true;
};
git = {
enable = true;
neogit.enable = true;
};
terminal.toggleterm = {
enable = true;
lazygit.enable = true;
mappings = {
open = ",";
};
};
dashboard.alpha = {
enable = true;
theme = "dashboard";
};
filetree.nvimTree = {
enable = true;
setupOpts = {
git.enable = true;
modified.enable = true;
renderer.highlight_git = true;
renderer.highlight_modified = "icon";
};
};
};
ui = {
colorizer.enable = true; # Highlight color codes
illuminate.enable = true; # Highlight word under cursor
};
utility = {
mkdir.enable = true; # Auto-create directories on save
yazi-nvim.enable = true; # Terminal file manager integration
};
# Tokyo Night color theme
theme = {
enable = true;
name = "tokyonight";
style = "night";
};
# Editor options
options = {
shiftwidth = 4; # Indent with 4 spaces
tabstop = 4; # Tab displays as 4 spaces
};
# Language support configuration
languages = {
enableTreesitter = true; # Syntax highlighting and parsing
enableFormat = true; # Auto-formatting support
enableDAP = true; # Debug support for languages
# Enable language servers and tools
python.enable = true;
clang.enable = true; # C/C++
bash.enable = true;
css.enable = true;
go.enable = true;
java.enable = true;
sql.enable = true;
yaml.enable = true;
# TypeScript with enhanced diagnostics
ts = {
enable = true;
extraDiagnostics.enable = true;
};
# Nix language support with enhanced diagnostics
nix = {
enable = true;
extraDiagnostics.enable = true;
};
# HTML with enhanced diagnostics
html = {
enable = true;
extraDiagnostics.enable = true;
};
# Markdown with preview support
markdown = {
enable = true;
extensions = {
markview-nvim.enable = true; # Live markdown preview
};
};
};
# Language Server Protocol configuration
lsp = {
enable = true;
formatOnSave = true; # Auto-format on save
lspconfig.enable = true; # LSP configurations
nvim-docs-view.enable = true; # Documentation viewer
};
# Status line at the bottom
statusline.lualine = {
enable = true;
};
# Git integration
git = {
enable = true;
neogit.enable = true; # Magit-like Git interface
};
# Terminal integration
terminal.toggleterm = {
enable = true;
lazygit.enable = true; # TUI for Git
mappings = {
open = ","; # Open terminal with comma key
};
};
# Dashboard on startup
dashboard.alpha = {
enable = true;
theme = "dashboard";
};
# File tree explorer
filetree.nvimTree = {
enable = true;
setupOpts = {
git.enable = true;
modified.enable = true;
renderer.highlight_git = true;
renderer.highlight_modified = "icon";
};
};
};
};
};
}