From 1cd4ed136a76f8c5342168ff86e8af93f7eb5e45 Mon Sep 17 00:00:00 2001 From: Pacman99 Date: Sat, 24 Apr 2021 08:14:58 -0700 Subject: [PATCH] mkFlakeDoc: move to packages output the packages output allows us to do `nix build .#nixosOptionsDoc`. theres also already an instantiated nixpkgs available there. --- flake.lock | 2 +- lib/flake.nix | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 00b0728..23e6089 100644 --- a/flake.lock +++ b/flake.lock @@ -81,7 +81,7 @@ "utils": "utils_2" }, "locked": { - "narHash": "sha256-LvO5VwFNFzb2xbmgw+fWhkrRY1KMlp5vxqQU/BqS0H8=", + "narHash": "sha256-eZJ8p2u56dkLPxF7GiQLbQ6YRKHP6DoOM52G/p+M/3w=", "path": "./lib", "type": "path" }, diff --git a/lib/flake.nix b/lib/flake.nix index c9bd99a..6c7484a 100644 --- a/lib/flake.nix +++ b/lib/flake.nix @@ -81,6 +81,14 @@ lib = nixpkgs.lib // lib; }; }; + packages = { + mkFlakeDoc = pkgs.writeText "mkFlakeOptions.md" + ( + pkgs.nixosOptionsDoc { + inherit (lib.mkFlake.evalArgs { nixos = "nixos"; args = { }; }) options; + } + ).optionsMDDoc; + }; } );