From 2f8965928976d19dbddd4aff86129786dd79a291 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 8 Nov 2023 13:53:34 +0800 Subject: [PATCH] Add custom `site` output attribute for flake It is meant to be used for my other projects that will make use of the site as a template like in the personal NixOS configuration site. --- flake.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 937fb21..77c22d3 100644 --- a/flake.nix +++ b/flake.nix @@ -16,8 +16,16 @@ pkgs = nixpkgs.legacyPackages."${system}"; in { + packages.asciidoctor = with pkgs; writeShellScriptBin "asciidoctor" '' + asciidoctor -T ${self.site.asciidoctor-templates} $@ + ''; devShells.default = import ./shell.nix { inherit pkgs; }; formatter = pkgs.treefmt; - }); + }) // { + site = { + asciidoctor-templates = ./templates; + assets = ./assets; + }; + }; }