{"id":14967842,"url":"https://github.com/nixos/nix-mode","last_synced_at":"2025-04-05T05:09:26.649Z","repository":{"id":11324282,"uuid":"65940763","full_name":"NixOS/nix-mode","owner":"NixOS","description":"An Emacs major mode for editing Nix expressions.","archived":false,"fork":false,"pushed_at":"2024-06-25T16:56:44.000Z","size":561,"stargazers_count":298,"open_issues_count":42,"forks_count":76,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-10-29T14:37:32.800Z","etag":null,"topics":["emacs","major-mode","nix","nixpkgs","syntax-highlighting"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NixOS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"nixos"}},"created_at":"2016-08-17T20:46:39.000Z","updated_at":"2024-10-24T20:56:52.000Z","dependencies_parsed_at":"2023-02-11T10:45:15.467Z","dependency_job_id":"4170bb0d-0166-4582-b5a5-920084697b75","html_url":"https://github.com/NixOS/nix-mode","commit_stats":{"total_commits":471,"total_committers":41,"mean_commits":"11.487804878048781","dds":"0.44798301486199577","last_synced_commit":"719feb7868fb567ecfe5578f6119892c771ac5e5"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fnix-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fnix-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fnix-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fnix-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NixOS","download_url":"https://codeload.github.com/NixOS/nix-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289429,"owners_count":20914464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","major-mode","nix","nixpkgs","syntax-highlighting"],"created_at":"2024-09-24T13:38:42.045Z","updated_at":"2025-04-05T05:09:26.629Z","avatar_url":"https://github.com/NixOS.png","language":"Emacs Lisp","funding_links":["https://opencollective.com/nixos"],"categories":[],"sub_categories":[],"readme":"# nix-mode\n\n[![MELPA](https://melpa.org/packages/nix-mode-badge.svg)](https://melpa.org/#/nix-mode)\n[![MELPA Stable](https://stable.melpa.org/packages/nix-mode-badge.svg)](https://stable.melpa.org/#/nix-mode)\n[![Build Status](https://travis-ci.com/NixOS/nix-mode.svg?branch=master)](https://travis-ci.com/NixOS/nix-mode)\n\nAn Emacs major mode for editing Nix expressions. There is also a\nmanual available at [nix-mode.org](./nix-mode.org).\n\n## Submodes\n\nA quick list of what is provided.\n\n### nix-mode.el\n\nThis is the main usage of nix-mode. This provides basic handling of\n.nix files. Syntax highlighting and indentation support using SMIE are\nprovided. nix-mode can be used with the following snippet:\n\n~~~\n(require 'nix-mode)\n(add-to-list 'auto-mode-alist '(\"\\\\.nix\\\\'\" . nix-mode))\n~~~\n\nor with use-package:\n\n~~~\n(use-package nix-mode\n  :mode \"\\\\.nix\\\\'\")\n~~~\n\n### nix.el\n\nnix.el contains some miscellaneous tools for Nix developers.\nInteractive functions include:\n\n- nix-unpack - unpack source of a Nix attribute.\n\n  To use this just type:\n\n  M-x nix-unpack\u003cRET\u003e\n\n  Followed by your Nix path \u0026 attribute path.\n\n- nix-build - build a Nix derivation.\n\n  This is meant to work similarly to M-x compile. It will use your\n  current directory \u0026 build it if there is a default.nix there.\n\nnix.el also provides some basic functions for interfacing with Nix.\nSome variables are provided to point to the Nix binaries that can be\nused in Lisp code:\n\n- nix-executable\n- nix-build-executable\n- nix-instantiate-executable\n- nix-store-executable\n- nix-shell-executable\n\nOther useful functions for Lisp scripts are provided:\n\n- nix-system - Get the current system, detected by Nix\n\n### nix-flake.el\n\nnix-flake.el provides support for flake commands.\nThese commands are experimental as of Nix 2.4.\n\nIt uses transient.el to provide a magit-like interface.\nTo run a command on the current flake, type:\n\nM-x nix-flake\u003cRET\u003e\n\nYou can also initialize a flake from a template:\n\nM-x nix-flake-init\u003cRET\u003e\n\n### nix-repl.el\n\nnix-repl.el has two purposes.\n\nFirst, it provides an interface for completion, used by nix-company.el.\n\nSecond, it provides an interactive function to open a repl. You can\nopen this with:\n\nM-x nix-repl\u003cRET\u003e\n\n### nix-store.el\n\nThis file provides a command `M-x nix-store-show-path`. The command displays an\noverview of a store path. The information it shows is the realisation status,\nthe hash and the size of the store path. Also it shows lists of derivers,\nreferences, referrers and requisites of the respective path.\n\nYou can change the order in which that information is shown. See the\ndocumentation of the function `nix-store-show-path` for more information.\n\nWhen viewing a store buffer, the command `M-x nix-store-show-log`\nopens a local log file associated with a derivation.\n\n### nix-prettify-mode.el\n\nWhen nix-prettify-mode is enabled, hash-parts of the Nix store file names are\nprettified, i.e. displayed as `nix-prettify-char` character (`…` by default.).\n\nThis is based on a similar mode for Guix: [Prettify Mode (Emacs-Guix Reference Manual)](https://emacs-guix.gitlab.io/website/manual/0.4/html_node/Prettify-Mode.html).\n\n## Origins\n\nThis repository is based off of the nix-mode.el file originally located in\nthe [Nix repository](https://github.com/NixOS/nix)\nat\n[misc/emacs/nix-mode.el](https://github.com/NixOS/nix/blob/master/misc/emacs/nix-mode.el).\nPlease see [the CHANGELOG file](https://github.com/NixOS/nix-mode/blob/master/CHANGELOG.md) for a list of changes.\n\n## Other Emacs packages\n\n@shlevy has an excellent package for integrating nix-shell into emacs. It is available at [shlevy/nix-buffer](https://github.com/shlevy/nix-buffer). \n\n@travisbhartwell also has some package dealing with Nix. They are available at [travisbhartwell/nix-emacs](https://github.com/travisbhartwell/nix-emacs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixos%2Fnix-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnixos%2Fnix-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixos%2Fnix-mode/lists"}