From 9fb580b6eeba2bbd79658f9777000cabb2ebdaed Mon Sep 17 00:00:00 2001 From: Jelle Besseling Date: Sun, 20 Feb 2022 22:53:04 +0100 Subject: [PATCH] Add nix installation instructions --- README.md | 16 ++++++++++++++++ flake.nix | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index 182dccf31..bb3faa10e 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,22 @@ name = "Martin von Zweigbergk" email = "martinvonz@google.com" ``` +### Nix OS + +If you're on Nix OS you can use the flake for this repository. +For example, if you want to run `jj` loaded from the flake, use: + +```shell script +nix run 'github:martinvonz/jj' +``` + +You can also add this flake url to your system input flakes. Or you can +install the flake to your user profile: + +```shell script +nix profile install 'github:martinvonz/jj' +``` + ## Getting started diff --git a/flake.nix b/flake.nix index 1be745ac8..68edc0c5e 100644 --- a/flake.nix +++ b/flake.nix @@ -111,6 +111,10 @@ }; packages.${system}.jujutsu = pkgs.jujutsu; defaultPackage.${system} = self.packages.${system}.jujutsu; + defaultApp.${system} = { + type = "app"; + program = "${pkgs.jujutsu}/bin/jj"; + }; checks.${system}.jujutsu = pkgs.jujutsu.overrideAttrs ({ ... }: { cargoBuildType = "debug"; cargoCheckType = "debug";