From 71dc57b7d52eb818d45135dfe781eb8953c4c089 Mon Sep 17 00:00:00 2001
From: Valentin Gagarin <valentin@gagarin.work>
Date: Thu, 7 Nov 2024 03:16:58 +0100
Subject: [PATCH] add resulting Nix value to default.nix outputs

this is practical for debugging and demonstration purposes
---
 default.nix | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/default.nix b/default.nix
index a750d3bc..daad6a00 100644
--- a/default.nix
+++ b/default.nix
@@ -15,25 +15,22 @@ let
     new // { types = prev.recursiveUpdate prev.types new.types; };
   lib'' = lib.extend lib';
 in
-{
+rec {
   lib = import ./lib.nix { inherit lib; };
+  result = lib''.evalModules {
+    modules = [
+      ./structure
+      ./content
+      ./presentation
+      {
+        _module.args = {
+          inherit pkgs;
+        };
+      }
+    ];
+  };
 
-  build =
-    let
-      result = lib''.evalModules {
-        modules = [
-          ./structure
-          ./content
-          ./presentation
-          {
-            _module.args = {
-              inherit pkgs;
-            };
-          }
-        ];
-      };
-    in
-    result.config.build;
+  inherit (result.config) build;
 
   shell = pkgs.mkShellNoCC {
     packages = with pkgs; [