Skip to content

Commit fe1b17c

Browse files
authored
Merge pull request #636 from onekey-sec/flake-nix-config
Advertise binary cache for flake users
2 parents 49cd963 + 79ed6cd commit fe1b17c

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

docs/installation.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,21 @@ The Nix derivation installs all 3rd party dependencies.
7171
1. _Optional_: enable the experimental features so that you don't need to pass
7272
`--extra-experimental-features "nix-command flakes"` to `nix` command invocations:
7373

74+
mkdir -p ~/.config/nix
7475
cat > ~/.config/nix/nix.conf <<EOF
7576
experimental-features = nix-command flakes
7677
EOF
7778

78-
1. _Optional_: use pre-built binaries from GitHub using [cachix](https://app.cachix.org/cache/unblob):
79-
80-
nix-env -iA cachix -f https://cachix.org/api/v1/install
81-
cachix use unblob
82-
8379
1. Install unblob:
8480

85-
nix profile install github:onekey-sec/unblob
81+
$ nix profile install github:onekey-sec/unblob
82+
do you want to allow configuration setting 'extra-substituters' to be set to 'https://unblob.cachix.org' (y/N)? y
83+
do you want to permanently mark this value as trusted (y/N)? y
84+
do you want to allow configuration setting 'extra-trusted-public-keys' to be set to
85+
'unblob.cachix.org-1:5kWA6DwOg176rSqU8TOTBXWxsDB4LoCMfGfTgL5qCAE=' (y/N)? y
86+
do you want to permanently mark this value as trusted (y/N)? y
87+
88+
Using and trusting substituter (binary cache) and its public key is optional but greatly speeds up installation.
8689

8790
- Check that everything works correctly:
8891

flake.nix

+7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
flake = false;
2121
};
2222

23+
nixConfig = {
24+
extra-substituters = [ "https://unblob.cachix.org" ];
25+
extra-trusted-public-keys = [
26+
"unblob.cachix.org-1:5kWA6DwOg176rSqU8TOTBXWxsDB4LoCMfGfTgL5qCAE="
27+
];
28+
};
29+
2330
outputs = { self, nixpkgs, filter, unblob-native, pyperscan, sasquatch, ... }:
2431
let
2532
# System types to support.

0 commit comments

Comments
 (0)