diff --git a/README.md b/README.md index 9d5babfb..5d58b8ad 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,58 @@ # Setup -## Flakes +## Install Nix Flakes -Nix with flakes support is required. Run this in a shell… -``` -# Enter a temporary shell with flakes support: +A Nix environment with Nix Flakes support is required. + +### (temporary) Shell with Nix Flakes + + +Set up an environment (with the common command [nix-shell](https://nixos.org/manual/nix/unstable/command-ref/nix-shell.html)) in which the [package *nixFlakes*](https://search.nixos.org/packages?query=nixflakes) (for Nix Flakes) is available and jump into it + +```bash nix-shell --packages nixFlakes +``` -# Set some configuration (do this only once): +Nix Flakes ist gegenwärtig bei Nix (Version 20.09) noch keine standardmäßige Funktionalität für Nix. Die Bereitstellung der Kommandos für Nix Flakes müssen als experimentelle Funktionalität für das Kommando ''nix'' festgelegt werden, um sie verfügbar zu machen. + + +Set some configuration (do this only once) + +```bash echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf +``` -# Add this repository to your local flake registry: +Add this repository to your local flake registry: +```bash nix registry add c3d2 git+https://gitea.c3d2.de/C3D2/nix-config ``` -…or set this to your NixOS configuration: -``` +### (permanent) System with Nix Flakes + +set this to your NixOS configuration: +```nix { pkgs, ... }: { +``` +```nix nix = { +``` +```nix package = pkgs.nixFlakes; extraOptions = "experimental-features = nix-command flakes"; +``` +```nix }; +``` +```nix } ``` + And add this repository to your local flake registry: -``` +```bash nix registry add c3d2 git+https://gitea.c3d2.de/C3D2/nix-config ```