From e73105bc66d509e59fc867cb3c24f5d88e9e37ac Mon Sep 17 00:00:00 2001 From: kalipso Date: Thu, 24 Oct 2024 23:27:06 +0200 Subject: [PATCH] [doc] add app doc to serve doc 'nix run .#doc' will open documentaion in browser and update on filechange --- outputs.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/outputs.nix b/outputs.nix index e28f168e..042216db 100644 --- a/outputs.nix +++ b/outputs.nix @@ -37,6 +37,16 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems ''; }; }; + + apps = { + docs = { + type = "app"; + program = builtins.toString (pkgs.writeScript "docs" '' + ${pkgs.mdbook}/bin/mdbook serve --open ./doc + ''); + }; + }; + })) // rec { nixosConfigurations = import ./machines/configuration.nix (inputs // { inherit inputs;