Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akirak/nix-magit

Use Magit from anywhere without configuring Emacs
https://github.com/akirak/nix-magit

magit

Last synced: 7 days ago
JSON representation

Use Magit from anywhere without configuring Emacs

Awesome Lists containing this project

README

        

* Running Magit as a Nix App
This is a Nix flake runs Emacs with [[https://magit.vc/][Magit]], a Git porcelain inside Emacs.
It is inspired by [[https://github.com/vlandeiro/magit-docker][magit-docker]] (or [[https://www.reddit.com/r/emacs/comments/d0qnbf/dockerized_magit/][Dockerized Magit]]) but uses Nix instead of Docker.
** Prerequisites
This flake is supported on the following platforms:

- Linux: =x86_64-linux=​ and =aarch64-linux=​
- MacOS: =aarch64-darwin=​ and =x86_64-darwin=​

You also need Nix package manager, which you can install by following the instructions from here: https://nixos.org/download.html
** Usage
This project is provided as a Nix flake, so you can run it directly without installation.

If you have already installed Nix with flakes enabled, you can start magit by running the following command inside a Git repository:

#+begin_src bash
nix run github:akirak/nix-magit --no-write-lock-file
#+end_src

If you haven't enabled flakes, you can temporarily enable the feature:

#+begin_src bash
nix run github:akirak/nix-magit --no-write-lock-file \
--extra-experimental-features nix-command \
--extra-experimental-features flakes
#+end_src

There is also an evil version (i.e. vi keybindings):

#+begin_src bash
nix run github:akirak/nix-magit#evil --no-write-lock-file
#+end_src

You could define an alias for the command:

#+begin_src shell
alias magit='nix run github:akirak/nix-magit --no-write-lock-file'
#+end_src
** License
MIT License