diff --git a/docs/nix-flakes.adoc b/docs/nix-flakes.adoc index 34b8b0f0..2a0e1da3 100644 --- a/docs/nix-flakes.adoc +++ b/docs/nix-flakes.adoc @@ -13,12 +13,24 @@ The support is still experimental and may change in backwards incompatible ways. * Enable experimental features `nix-command` and `flakes`. + -Either set in `nix.conf` +** When using NixOS, add the following to your `configuration.nix` and rebuild your system. ++ +[source,nix] +nix = { + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + ''; +}; ++ +** If you are not using NixOS, add the following to `nix.conf` (located at `~/.config/nix/` or `/etc/nix/nix.conf`). + [source,bash] experimental-features = nix-command flakes + -or pass them to `nix` and `home-manager` by +You may need to restart the Nix daemon with, for example, `sudo systemctl restart nix-daemon.service`. ++ +** Alternatively, you can enable flakes on a per-command basis with the following additional flags to `nix` and `home-manager`: + [source,console] ----