From 3f1e0f85687260574d7ff72071151b9d9b2ebc41 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 21 Feb 2024 21:38:44 +0100 Subject: [PATCH] Use a simper way to enable flakes --- configuration.nix | 8 ++------ guides/installation.md | 10 +++------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/configuration.nix b/configuration.nix index 8685e80..a8e5349 100644 --- a/configuration.nix +++ b/configuration.nix @@ -97,11 +97,7 @@ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.11"; # Did you read the comment? - nix = { - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; + nix.package = pkgs.nixUnstable; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; } diff --git a/guides/installation.md b/guides/installation.md index 0d472a7..6642212 100644 --- a/guides/installation.md +++ b/guides/installation.md @@ -34,15 +34,11 @@ nano configuration.nix In there, change the `environment.systemPackages = with pkgs; [];` like, and include `git` and `vim`. -After that, let's enable flakes, by adding the following at the end of your `configuration.nix` (but still within the function body - before the last `}`): +After that, let's enable flakes, by adding the following anywhere in your `configuration.nix`: ```nix -nix = { - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - '' -}; +nix.package = pkgs.nixUnstable; +nix.settings.experimental-features = [ "nix-command" "flakes" ]; ``` Now you can save the changes and rebuild the system: