From 4c0ca5afda2cfd469b32a941af7f97766a0ad1a3 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Wed, 30 Aug 2023 16:11:59 +0200 Subject: [PATCH] update README --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 2d2af20..ad49ebe 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,26 @@ Remove old generations from EFI: sudo /run/current-system/bin/switch-to-configuration boot ``` +## Evaluate configuration.nix to JSON + +TODO: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-show-config.html + +* https://discourse.nixos.org/t/can-i-run-nix-instantiate-eval-strict-on-my-configuration-nix/7105/4?u=langfingaz + +This evaluates `configuration.nix` (single module): + +```shell +NIXPKGS_ALLOW_UNFREE=1 nix-instantiate --strict --json --eval -E ' +import ./yodaTab/configuration.nix { + config = {}; + pkgs = import {}; + lib = import ; +} +' > evaluated-config.json +``` + +Then open [evaluated-config.json](evaluated-config.json). + ## Install Home Manager with niv niv: