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";