Use a simper way to enable flakes

This commit is contained in:
ItsDrike 2024-02-21 21:38:44 +01:00
parent 6b3200bbb1
commit 3f1e0f8568
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
2 changed files with 5 additions and 13 deletions

View file

@ -97,11 +97,7 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
nix = { nix.package = pkgs.nixUnstable;
package = pkgs.nixUnstable; nix.settings.experimental-features = [ "nix-command" "flakes" ];
extraOptions = ''
experimental-features = nix-command flakes
'';
};
} }

View file

@ -34,15 +34,11 @@ nano configuration.nix
In there, change the `environment.systemPackages = with pkgs; [];` like, and include `git` and `vim`. 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
nix = { nix.package = pkgs.nixUnstable;
package = pkgs.nixUnstable; nix.settings.experimental-features = [ "nix-command" "flakes" ];
extraOptions = ''
experimental-features = nix-command flakes
''
};
``` ```
Now you can save the changes and rebuild the system: Now you can save the changes and rebuild the system: