2
0
Fork 0
This commit is contained in:
Emery Hemingway 2020-04-09 02:32:19 +05:30
parent 7a04959417
commit 5229395e9a
1 changed files with 18 additions and 19 deletions

View File

@ -68,13 +68,21 @@ of Nix tooling. The flakes capable Nix frontend is available from Nixpkgs as
## Switching to flakes
All users regardless of distro must add the following to
*~/.config/nix/nix.conf* to enable flakes:
Non-NixOS users may install Nix using the following shell commands:
```sh
$ curl https://nixos.org/nix/install | sh
$ nix-env -iA nixpkgs.nixFlakes
```
Those with IPv6 will want to the following to their */etc/nix/nix.conf* file:
```
experimental-features = nix-command flakes ca-references
substituters = https://cache.nixos.org/ https://cache.server7.hq.c3d2.de/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.server7.hq.c3d2.de:x8JLRG26zRZ8ysYZLEkPxuAYuK1VSJi/aMAEIs2Lv+U=
```
NixOS users may switch to flakes using the following configuration:
```nix
@ -82,7 +90,7 @@ NixOS users may switch to flakes using the following configuration:
{
nix.package = pkgs.nixFlakes;
# The following enables the use of a binary cache
# The following enables the use of a binary cache (IPv6 only)
nix.binaryCaches = [ "https://cache.server7.hq.c3d2.de" ];
nix.binaryCachePublicKeys = [
"cache.server7.hq.c3d2.de:x8JLRG26zRZ8ysYZLEkPxuAYuK1VSJi/aMAEIs2Lv+U="
@ -90,21 +98,13 @@ NixOS users may switch to flakes using the following configuration:
}
```
Non-NixOS users may install flakes using the following shell commands:
```sh
$ curl https://nixos.org/nix/install | sh
$ nix-env -iA nixpkgs.nixFlakes
```
Add will want to add this to their */etc/nix/nix.conf* file:
All users regardless of distro must add the following to
*~/.config/nix/nix.conf* to enable flakes:
```
substituters = https://cache.nixos.org/ https://cache.server7.hq.c3d2.de/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.server7.hq.c3d2.de:x8JLRG26zRZ8ysYZLEkPxuAYuK1VSJi/aMAEIs2Lv+U=
experimental-features = nix-command flakes ca-references
```
## Building from flakes
### As a user
@ -144,7 +144,7 @@ Hydra.
# Testing
Tests are performed using QEMU and a test driver similiar to what is used by
Tests are performed using QEMU and a test driver similar to what is used by
NixOS (ours has not been ported to Python however). The test artifacts are built
as follows:
@ -159,7 +159,7 @@ nix build .#checks.x86_64-linux-x86_64-genode.nova-solo5-net.iso
nix build .#checks.x86_64-linux-x86_64-genode.nova-solo5-net.sotest
```
# FAQ
# Tips and tricks
## How to build a Genode make target?
@ -215,11 +215,10 @@ this must now be added to the port definitions.
Should the port preparation fail do to missing utilities, these must be added to
the port definition using a `nativeBuildInputs` attribute.
Note that the hash checked into `ports.nix` is an *output hashe*. The port hash
Note that the hash checked into `ports.nix` is an *output hash*. The port hash
within the Genode source tree is an *explicit input hash* and the output of
the port preparation is non-deterministic.
# Tips and tricks
## Render a Dhall Init configuration to XML