mirror of
https://github.com/BalrajSinghGidda/nixos-dotfiles.git
synced 2026-04-07 09:27:23 +00:00
Finalizing everything ... before gruvbox appears.
This commit is contained in:
86
README.md
86
README.md
@@ -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?
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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";
|
||||
@@ -29,9 +35,12 @@
|
||||
# Import host-specific configuration
|
||||
./hosts/nixos-btw
|
||||
|
||||
# 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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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,12 +24,16 @@
|
||||
|
||||
# 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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
./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)
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,57 +1,72 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# 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 = {
|
||||
viAlias = true;
|
||||
vimAlias = false;
|
||||
# Command aliases for backwards compatibility
|
||||
viAlias = true; # Map 'vi' command to nvim
|
||||
vimAlias = false; # Keep 'vim' separate
|
||||
|
||||
syntaxHighlighting = true;
|
||||
|
||||
# Tab bar at the top showing open buffers
|
||||
tabline.nvimBufferline.enable = true;
|
||||
|
||||
# Fuzzy finder and file navigation
|
||||
telescope.enable = true;
|
||||
|
||||
# System clipboard integration
|
||||
clipboard.enable = true;
|
||||
clipboard.providers.xclip.enable = true;
|
||||
clipboard.registers = "unnamedplus";
|
||||
clipboard.registers = "unnamedplus"; # Use '+' register for clipboard
|
||||
|
||||
# Persistent undo across sessions
|
||||
undoFile.enable = true;
|
||||
|
||||
# Auto-completion engine
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
|
||||
# Debug Adapter Protocol support
|
||||
debugger.nvim-dap.enable = true;
|
||||
|
||||
ui = {
|
||||
colorizer.enable = true;
|
||||
illuminate.enable = true;
|
||||
colorizer.enable = true; # Highlight color codes
|
||||
illuminate.enable = true; # Highlight word under cursor
|
||||
};
|
||||
|
||||
utility = {
|
||||
mkdir.enable = true;
|
||||
yazi-nvim.enable = true;
|
||||
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;
|
||||
tabstop = 4;
|
||||
shiftwidth = 4; # Indent with 4 spaces
|
||||
tabstop = 4; # Tab displays as 4 spaces
|
||||
};
|
||||
|
||||
# Language support configuration
|
||||
languages = {
|
||||
enableTreesitter = true;
|
||||
enableFormat = true;
|
||||
enableDAP = true;
|
||||
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;
|
||||
clang.enable = true; # C/C++
|
||||
bash.enable = true;
|
||||
css.enable = true;
|
||||
go.enable = true;
|
||||
@@ -59,58 +74,68 @@
|
||||
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;
|
||||
markview-nvim.enable = true; # Live markdown preview
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Language Server Protocol configuration
|
||||
lsp = {
|
||||
enable = true;
|
||||
formatOnSave = true;
|
||||
lspconfig.enable = true;
|
||||
nvim-docs-view.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;
|
||||
neogit.enable = true; # Magit-like Git interface
|
||||
};
|
||||
|
||||
# Terminal integration
|
||||
terminal.toggleterm = {
|
||||
enable = true;
|
||||
lazygit.enable = true;
|
||||
lazygit.enable = true; # TUI for Git
|
||||
mappings = {
|
||||
open = ",";
|
||||
open = ","; # Open terminal with comma key
|
||||
};
|
||||
};
|
||||
|
||||
# Dashboard on startup
|
||||
dashboard.alpha = {
|
||||
enable = true;
|
||||
theme = "dashboard";
|
||||
};
|
||||
|
||||
# File tree explorer
|
||||
filetree.nvimTree = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
|
||||
Reference in New Issue
Block a user