From be8d5b75b35881f033ae71b0da00e5c036cddd8e Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sun, 17 Jan 2021 15:24:37 +0100 Subject: [PATCH] README: change flake example for on-device building --- README.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f4f4076..7bc13b7 100644 --- a/README.md +++ b/README.md @@ -159,21 +159,33 @@ you shouldn't need a binary cache for that. ## Nix flakes -Example, to use with nix flakes: +Note that nix flake support is experimental at the moment. +Still, there's some minimal usage example. +You can build an activation package by procuring flake-powered nix +(`nix run nixpkgs.nixFlakes`, + `echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf`) +writing a `flake.nix`: ```nix { description = "nix-on-droid configuration"; - inputs.nix-on-droid.url = "/home/bbigras/src/nix-on-droid"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/release-20.09"; + nix-on-droid.url = "github:t184256/nix-on-droid/master"; + nix-on-droid.inputs.nixpkgs.follows = "nixpkgs"; + }; outputs = { nix-on-droid, ... }: { - nix-on-droid = (nix-on-droid.lib.aarch64-linux.nix-on-droid { config = ./your_config.nix; } ).activationPackage; + nix-on-droid = (nix-on-droid.lib.aarch64-linux.nix-on-droid { + config = ./.config/nixpkgs/nix-on-droid.nix; + }).activationPackage; }; } ``` -Build with `nix build .#nix-on-droid --impure`. +building it with `nix build .#nix-on-droid --impure` +and activating it with `result/activate`. ## Tips