From 4dcd91f18f1d063ca01e22ecdda533fa1b545c12 Mon Sep 17 00:00:00 2001 From: t56k Date: Wed, 13 Mar 2024 09:06:12 +1100 Subject: [PATCH] chore: update README.md with Nix flake instructions --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 2b72b651d6..13bf9cba8a 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,29 @@ The latest release is available Download the archive that is appropriate for your platform and extract the binary into your `$PATH`. A common valid path location is `/usr/local/bin`. +#### Using Nix flakes +To build from `master` on flaked Nix platforms add this repo to your inputs: + +``` +inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + gitu.url = "github:altsem/gitu"; + gitu.inputs.nixpkgs.follows = "nixpkgs"; +}; +``` + +Then wherever you install your packages (i.e., `home-manager`): + +``` +{ inputs, pkgs, lib, system, ... }: +{ +home.packages = with pkgs; + [ + inputs.gitu.packages.${system}.default + ]; +} +``` + ### Configuration The environment variables `GIT_EDITOR`, `VISUAL` or `EDITOR` (checked in this order) dictate which editor Gitu will open.