nixd brings Nix evaluation into the language server
Nix language server, based on nix libraries [maintainer=@inclyc,@takeokunn,@Aleksanaa]
At a glance
- What is it?
- nixd is a C++ Nix language server built by linking with Nix libraries. It is aimed at editor users who need Nixpkgs-aware completion, cross-file navigation, and evaluation backed by shared caches, although the README does not include installation commands.
- Who is it for?
- nixd fits Nix users who want their editor to understand Nixpkgs options and cross-file definitions through the same Nix libraries used on their system. It is less suitable for editors or workflows that require only lightweight parsing without evaluation, or for users who cannot supply the relevant Nix environment.
- Can I use it commercially?
- Yes, with conditions. LGPL-3.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 4 days ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Star history
- nix-community/nixd1,502 ★ · +3
| Repository | 2026-10-16 | 2026-10-23 |
|---|---|---|
| nix-community/nixd | 1.5k | 1.5k |
3 Stars in the last 7 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Why nixd targets Nix editor analysis
nixd addresses a specific gap in editor support for Nix: language tooling that can work with Nix semantics rather than treating every `.nix` file as isolated text. The README describes it as a "feature-rich nix language server" that interoperates with C++ Nix libraries. Its intended audience is therefore fairly clear: people editing NixOS modules, home-manager configurations, flake parts, and other Nix expressions in editors that can communicate through the Language Server Protocol.
The project is not presented as a general-purpose formatter, package manager client, or replacement for Nix itself. Its value comes from giving an editor a backend that knows about Nix expressions and Nixpkgs data. That distinction matters because editor completion and navigation can be poor when a tool cannot resolve names, understand option declarations, or move from a project file into imported definitions. The repository topics include `language-server-protocol`, `nix`, and `nixos`, matching that editor integration purpose.
For teams, the relevant adoption question is whether editor feedback should reflect the same libraries and evaluation context as the machine running Nix. nixd says that it shares evaluation caches with the system's Nix and can use Nixpkgs information across files. That approach favors semantic accuracy over a server that starts quickly with no dependency on Nix evaluation.
The library-backed architecture behind nixd
The README identifies C++ Nix libraries as the architectural basis. It lists Nixpkgs option support across NixOS, home-manager, and flake-parts option systems, as well as a complete, lazily evaluated Nixpkgs package set. Those capabilities indicate that nixd delegates substantial language and evaluation work to Nix libraries rather than reproducing Nix behavior in a separate editor parser.
Evaluation is lazy. That is important for a language server because opening a file should not require eagerly computing every possible package or expression. The README specifically calls the package set "lazily evaluated," which describes when work occurs without claiming a measured startup time or resource result. The editor can request information about relevant expressions while avoiding immediate evaluation of unrelated values.
The server also uses shared caches for flakes and files with the system's Nix. Based on the README wording, this reduces duplicated evaluation work by allowing the language server and Nix installation to reuse cached results. Cross-file analysis follows from that architecture. The documented "goto definition" capability can point to locations in nixpkgs, so navigation is intended to cross the boundary between a user's file and package or option definitions.
The top-level repository layout contains `libnixf/`, `libnixt/`, and `nixd/`. This structure separates reusable library areas from the language-server component. The repository files do not expose enough detail here to describe internal APIs or the exact LSP request flow, so claims about individual request handlers would go beyond the documented design.
Nixpkgs-aware features and their boundaries
The strongest documented differentiator is Nixpkgs awareness. nixd supports option systems used by NixOS, home-manager, and flake-parts, rather than limiting its model to syntax and local declarations. That matters for configuration-heavy repositories because module options often resolve through imported Nixpkgs modules and evaluation context. A definition request can therefore lead into nixpkgs, according to the README.
Package data is also available through the Nixpkgs package set. The README says this set is complete and lazily evaluated. That combination suggests broad package-oriented editor information with deferred evaluation, but it does not establish how current the package metadata will be for an arbitrary checkout. Users still need a coherent Nix installation and the project inputs that their editor is configured to evaluate.
The README does not enumerate every supported LSP feature. It names option support, package support, shared caches, and cross-file "goto definition," but it does not state which completion fields are provided, how diagnostics are prioritized, or how errors from incomplete edits are represented. Those omissions prevent a firm comparison of nixd with lighter parsers. The defensible conclusion is narrower: nixd is designed to use Nix evaluation and nixpkgs metadata for editor requests, not merely parse Nix syntax.
Trying nixd and completing editor setup
The README says nixd can be tried without installation and points to a documented set of reproducible editor environments. It also links to `nixd/docs/editors/editors.md` and `nixd/docs/editor-setup.md`. Those are the appropriate first references because the README contains no executable installation command, package-manager invocation, editor-specific command, or configuration file contents. Inventing one would risk giving readers a setup that the project does not document there.
A short first-use process can still be stated without pretending that a command is available. First, open the editor setup documentation and select an environment matching the editor and operating system. Next, configure that environment to start or connect to nixd as an LSP server. Finally, open a Nix file that imports or evaluates content from the intended Nixpkgs input, then request completion or "goto definition" on a documented Nixpkgs symbol. The expected result described by the README is editor awareness of cross-file locations and supported option information.
The configuration documentation is also the place to check which evaluation settings are tunable. The README does not reproduce those keys, so it would be inaccurate to provide a configuration snippet. The first-use verification should therefore focus on whether the editor starts the server, whether it uses the intended Nix environment, and whether a cross-file request reaches nixpkgs. If any of those checks fail, the setup file named by the project is more relevant than guessing at an editor configuration.
Trade-offs against lightweight Nix parsers
nixd is a different kind of tool from a lightweight Nix parser or an editor extension that performs text-based completion. A parser is primarily concerned with recognizing syntax and local structure. nixd links with Nix libraries and documents Nix evaluation, Nixpkgs packages, option systems, and shared caches. Its approach can answer questions that require semantic context, but it also brings a closer dependency on the Nix evaluation environment.
That dependency is a trade-off, not a defect stated by the project. Semantic results require data from Nixpkgs and must remain consistent with the Nix installation used by the developer. The README does not provide resource measurements, cold-start figures, or a policy for disconnected operation, so those cannot be used to claim that nixd is faster or lighter. Its documented design is better understood as evaluation-aware editor assistance.
Another boundary is configuration scope. The README confirms NixOS, home-manager, and flake-parts option support, but it does not enumerate support for every editor, Nix command, module system, or remote development arrangement. The linked editor documentation would need to settle those compatibility questions. nixd is the wrong choice when the desired feature is syntax-only editing with minimal evaluation coupling, or when the user's Nix environment cannot supply the inputs required for semantic analysis.
Maintenance, releases, and the LGPL-3.0 boundary
The repository is not archived, and its recorded last push was on 2026-10-12. Recent releases listed for the project are 2.9.3 on 2026-09-19, 2.9.2 on 2026-07-14, and 2.9.1 on 2026-04-28. This is evidence of recent repository activity and published versions, not evidence that every editor integration or every Nixpkgs configuration is stable.
nixd is licensed under `LGPL-3.0`. That identifier is relevant when an organization reviews redistribution, modification, or linking obligations. This article does not provide legal advice or interpret how a particular deployment satisfies the license. The project's `LICENSE` file and the applicable distribution model should be checked by the responsible party.
The C++ implementation and its relationship with Nix libraries also make upgrades more than a matter of changing an editor plugin. The README does not document a compatibility matrix for Nix library versions, Nixpkgs revisions, or editor clients. Those are practical upgrade questions for adopters, but the repository excerpt does not answer them. The repository's recent push and release history should not be substituted for such compatibility documentation.
Editorial conclusion
nixd fits Nix users who want their editor to understand Nixpkgs options and cross-file definitions through the same Nix libraries used on their system. It is less suitable for editors or workflows that require only lightweight parsing without evaluation, or for users who cannot supply the relevant Nix environment. Before adoption, verify the exact editor setup, supported Nix evaluation paths, and behavior against the Nixpkgs inputs used by your own project.
Frequently asked questions
What is nixd used for?
nixd is a Nix language server for editor integration. The README documents Nixpkgs option support, Nixpkgs package information, shared evaluation caches, and cross-file analysis such as "goto definition" into nixpkgs.
Can nixd be tried without installing it?
The README says nixd can be tried without installation and links to reproducible editor environments in `nixd/docs/editors/editors.md`. It also provides an editor setup guide at `nixd/docs/editor-setup.md`.
Does nixd support NixOS and home-manager options?
Yes. The README specifically lists option support for NixOS, home-manager, and flake-parts. It also says that cross-file analysis can direct "goto definition" requests to locations in nixpkgs.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/nix-community-nixd)Star history chart for your README
[](https://hysenlabs.com/projects/nix-community-nixd)Was this useful?