add flake.nix

Co-authored-by: Tobias Happ <Gerschtli@users.noreply.github.com>
This commit is contained in:
Bruno Bigras 2021-01-13 09:58:34 -05:00 committed by Alexander Sosedkin
parent abf7f56cb6
commit 9c7c0a9672
6 changed files with 61 additions and 5 deletions

View file

@ -157,7 +157,23 @@ if you are planning to maintain a long-term fork that users can update from.
In case you only care about updates through wiping the data,
you shouldn't need a binary cache for that.
## Nix flakes
Example, to use with nix flakes:
```nix
{
description = "nix-on-droid configuration";
inputs.nix-on-droid.url = "/home/bbigras/src/nix-on-droid";
outputs = { nix-on-droid, ... }: {
nix-on-droid = (nix-on-droid.lib.aarch64-linux.nix-on-droid { config = ./your_config.nix; } ).activationPackage;
};
}
```
Build with `nix build .#nix-on-droid --impure`.
## Tips