Jump to content

Overview of the Nix Language: Difference between revisions

From NixOS Wiki
imported>Danbst
No edit summary
Mayer (talk | contribs)
Marked this version for translation
 
(95 intermediate revisions by 43 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<!--T:1-->
The Nix language is designed for conveniently creating and composing <i>derivations</i> – precise descriptions of how contents of existing files are used to derive new files.


{{Expansion|This article is incomplete.}}
<!--T:2-->
{{Note|Check the [https://nixos.org/manual/nix/stable/language/ Nix Reference Manual on the Nix Language] for up-to-date documentation and [https://nix.dev/tutorials/nix-language Nix language basics] for a gentle introduction.}}
The .nix files are written in the Nix language. While being a NixOS user doesn't demand complete mastery of Nix, customizing code snippets is necessary.


This [[:Category:Discussion|discussion]] article covers the syntax, semantics, typing, compilation, tooling and libraries of the Nix Expression Language.
<!--T:3-->
== See also ==
* [[Nix Expression Language: Learning resources|Learning resources]]
* [[Editor Modes for Nix Files]]
* [[Nix Language: Tips & Tricks]]
* [[Nix Language Quirks]]


== Learning the Nix language ==
<!--T:4-->
 
[[Category:Pedias]]
The [https://nixos.org/nix/manual/#ch-expression-language manual] provides a reference of the Nix language.
 
[https://medium.com/@MrJamesFisher/nix-by-example-a0063a1a4c55 Nix By Example] is a step-by-step tutorial.
 
== Syntax Highlighting/IDE Support ==
Nix language has decent syntax highlighting (SH) support among popular code editors, but refactoring/autocomplete is still rare.
=== Terminal editors ===
* [https://github.com/seitz/nanonix nano] - simple SH
* vim ?
* emacs ?
 
=== Code Editors ===
* [https://atom.io/packages/nix Atom Nix plugin] - SH
* [https://marketplace.visualstudio.com/items?itemName=bbenoist.Nix VSCode Nix plugin] - SH
* [https://packagecontrol.io/packages/Nix Sublime Text]
 
=== IDEs ===
* IntelliJ Idea ?
* [https://github.com/NixOS/nix-eclipse Eclipse Nix plugin] - development stopped in 2010
* emacs ?
* vim ?
 
[[Category:Discussion]]
[[Category:Nix Language]]
[[Category:Nix Language]]
[[Category:Incomplete]]
</translate>

Latest revision as of 12:44, 25 February 2025

The Nix language is designed for conveniently creating and composing derivations – precise descriptions of how contents of existing files are used to derive new files.

Note: Check the Nix Reference Manual on the Nix Language for up-to-date documentation and Nix language basics for a gentle introduction.

The .nix files are written in the Nix language. While being a NixOS user doesn't demand complete mastery of Nix, customizing code snippets is necessary.

See also