Skip to content
Nix expression for running Emacs Magit without installing it on your system
Nix Emacs Lisp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.org
default.nix
init.el

README.org

Running Magit inside Nix-Shell

This is a Nix expression that runs Emacs with Magit, a Git porcelain inside Emacs. It is inspired by magit-docker (or Dockerized Magit) but uses Nix instead of Docker.

Prerequisites

Since this program requires Nix, your operating system must support Nix. At present, Linux and Mac are supported, but Windows is not. However, you can install Nix on Windows Subsystem for Linux (WSL).

Installation

Install Nix package manager, if you haven’t already:

curl https://nixos.org/nix/install | sh

For details, see the Nix manual.

Usage

Inside a Git repository, run the following command:

nix-shell https://github.com/akirak/nix-magit/archive/master.tar.gz

Then Emacs starts and Magit displays the status of your Git repository.

It would be a good idea to define an alias for the command:

alias magit='nix-shell https://github.com/akirak/nix-magit/archive/master.tar.gz'

License

MIT License

You can’t perform that action at this time.