Skip to content

๐Ÿš€ Declarative NixOS module to provision Neovim with a Lua-based config scaffold, Catppuccin mocha green theme and essential plugins

License

Notifications You must be signed in to change notification settings

typovrak/nixos-nvim

Repository files navigation

NixOS 24.11+ License MIT Buy me a coffee Portal Discord join us

๐Ÿš€ NixOS Nvim

Declarative NixOS module to provision Neovim with a Lua-based config scaffold, Catppuccin mocha green theme and essential plugins.

๐Ÿงฉ Part of the Typovrak NixOS ecosystem

This module is part of Typovrak NixOS, a fully modular and declarative operating system configuration built entirely with :

  • ๐Ÿงฑ 30+ standalone modules : Each managing a specific tool, feature or aesthetic like zsh, i3, lighdm, polybar, gtk and more.
  • ๐ŸŽจ Catppuccin Mocha : The default theme across terminal, GUI, and login interfaces.
  • ๐Ÿ›ก๏ธ 100% FOSS compliant : No proprietary software included unless explicitly chosen.
  • ๐Ÿง‘โ€๐Ÿ’ป Built for developers : Optimized for speed, keyboard-centric workflows and expressive CLI tooling.

Explore the full system : ๐Ÿ‘‰ github.com/typovrak/nixos

Caution

This module is opinionated, it may override, replace, or remove files and settings without prompt. To avoid unexpected changes, back up your existing files or fork this module to take full control. Follow this documentation to avoid any of this problem.

๐Ÿ“ฆ Features

  • ๐Ÿ”’ Secure config scaffold : Creates ~/.config/nvim and subdirectories with 700/600 permissions.
  • ๐ŸŽจ Catppuccin mocha green : Deploys catppuccin.lua theme in lua/plugins.
  • โš™๏ธ Plugin templates : Includes starter configs for blink, conform, gitsigns, lazydev, LSP, treesitter, telescope, todo-comments, which-key and more.
  • ๐Ÿš€ Language support : Installs go, rustup, python3, ruby for LSP and tooling.
  • ๐Ÿ“‹ Clipboard integration : Adds xclip and copyq for system clipboard support.
  • ๐Ÿ”„ Idempotent : Safe to run on every nixos-rebuild, preserves and updates config files.
  • ๐Ÿ”ฎ Evolving : Configuration is under active developmentโ€”expect frequent improvements.
  • ๐Ÿ’พ Manual backups : Backup commands are provided in the documentation to preserve existing files before changes if needed.

๐Ÿ“‚ Repository structure

โฏ tree -a -I ".git*"
.
โ”œโ”€โ”€ blink.lua           # auto completion and word suggestions
โ”œโ”€โ”€ catppuccin.lua      # catppuccin mocha green theme
โ”œโ”€โ”€ configuration.nix   # module configuration
โ”œโ”€โ”€ conform.lua         # code formatter
โ”œโ”€โ”€ gitsigns.lua        # git integration
โ”œโ”€โ”€ init.lua            # main entry point of the configuration
โ”œโ”€โ”€ lazydev.lua         # lazy loading for dev tools and lsp
โ”œโ”€โ”€ LICENSE.md          # MIT license
โ”œโ”€โ”€ nvim-lspconfig.lua  # base configuration for lsp servers
โ”œโ”€โ”€ nvim-treesitter.lua # syntax highlighting and parsing via treesitter
โ”œโ”€โ”€ README.md           # this documentation
โ”œโ”€โ”€ telescope.lua       # fuzzy finder and navigation
โ”œโ”€โ”€ todo-comments.lua   # highlights todo, fixme and related comments
โ””โ”€โ”€ which-key.lua       # popup help for keybindings

1 directory, 14 files

โš™๏ธ Prerequisites

1. NixOS version

Requires NixOS 24.11 or newer.

2. User validation

The target user must be defined in config.username. See typovrak main nixos configuration for more details.

3. Backup

Before proceeding, back up existing configuration if needed

cp ~/.config/nvim{,.bak}

โฌ‡๏ธ Installation

๐Ÿš€ Method 1 : Out-of-the-box

Fetch the module directly in your main nixos configuration at /etc/nixos/configuration.nix using fetchGit

# /etc/nixos/configuration.nix

let
  nixos-nvim = fetchGit {
    url = "https://github.com/typovrak/nixos-nvim.git";
    ref = "main";
    rev = "eea0e1d5fb671859b6729c2c788fad3d68de4eea"; # update to the desired commit
  };
in
{
  imports = [
    /etc/nixos/hardware-configuration.nix # system hardware settings
    /etc/nixos/variables.nix # defines config.username and other variables, see https://github.com/typovrak/nixos for more details
    (import "${nixos-nvim}/configuration.nix")
  ];
}

Once imported, rebuild your system to apply changes

sudo nixos-rebuild switch

๐Ÿด Method 2 : Fork

Want to personalize this module ?

Fork it and add this custom module in your main nixos configuration at /etc/nixos/configuration.nix using fetchGit

let
  nixos-nvim = fetchGit {
    url = "https://github.com/<YOUR_USERNAME>/nixos-nvim.git";
    ref = "main";
    rev = "<COMMIT>"; # see below
  };
in {
  imports = [
    /etc/nixos/hardware-configuration.nix # system hardware settings
    /etc/nixos/variables.nix # defines config.username and other variables, see https://github.com/typovrak/nixos for more details
    (import "${nixos-nvim}/configuration.nix")
  ];
}

Get the latest commit hash by executing

git clone https://github.com/<YOUR_USERNAME>/nixos-nvim.git &&
cd nixos-nvim &&
git log -1 --pretty=format:"%H"

๐ŸŽฌ Usage

Start coding now with nvim !

๐Ÿ“š Learn more

  • ๐Ÿ“˜ Neovim Lua guide : Learn how to write idiomatic Lua configurations for Neovim.
  • ๐Ÿง  Awesome Neovim : Curated list of plugins, configurations and resources.
  • ๐Ÿ› ๏ธ Neovim documentation : Official reference for all built-in functions and features.
  • ๐ŸŒˆ Catppuccin for Neovim : Theme used in this module.
  • ๐Ÿš€ lazy.nvim : Fast and modern plugin manager used in this setup.

๐ŸŒ Discover my NixOS system portal

Dive into typovrak.tv/nixos Catppuccin mocha green themed gateway to my GitHub and NixOS setup.

Browse every module, example and config in a sleek with an interactive interface that feels just like your desktop.

โค๏ธ Support

If this module saved you time, please โญ๏ธ the repo and share feedback.
You can also support me on โ˜• Buy me a coffee

๐Ÿ’ฌ Join the Typovrak community on Discord ๐Ÿ‡ซ๐Ÿ‡ท

If you've ever rm -rfed your config by mistake or rebuilt for the 42nd time because a semicolon was missingโ€ฆ

You're not alone, Welcome home !

๐ŸŽฏ Join us on Discord ยป

๐Ÿงญ What youโ€™ll find is :

  • ๐Ÿ’ป #nixos-setup - get help with modules, rebuilds and configs.
  • ๐ŸŒ #web-dev - talk JS, TypeScript, React, Node and more.
  • ๐Ÿง  #open-source - share your repos, contribute to others and discuss FOSS culture.
  • โŒจ๏ธ #typing - layouts, mechanical keyboards and speed goals.
  • ๐ŸŽจ #ricing - dotfiles, theming tips and desktop screenshots.

Everyone's welcome no matter how many times you've broken your system (except for Windows users) ๐Ÿ˜„


Made with ๐Ÿ’œ by typovrak

About

๐Ÿš€ Declarative NixOS module to provision Neovim with a Lua-based config scaffold, Catppuccin mocha green theme and essential plugins

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project