mirror of
https://github.com/nix-community/home-manager
synced 2024-11-22 12:43:14 +00:00
docs: explain how to enable flakes on NixOS
Since `nix.conf` is generated when using NixOS, it cannot be edited. Instead we add the instructions described by Xe in https://xeiaso.net/blog/nix-flakes-1-2022-02-21
This commit is contained in:
parent
68ea28d330
commit
9da6c0232e
1 changed files with 14 additions and 2 deletions
|
@ -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]
|
||||
----
|
||||
|
|
Loading…
Reference in a new issue