website/flake.nix

32 lines
884 B
Nix
Raw Permalink Normal View History

2022-03-01 10:00:18 +00:00
{
description = "Basic flake template for setting up this project.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2022-03-01 10:00:18 +00:00
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs@{ self, nixpkgs, ... }:
let
2023-03-06 16:35:19 +00:00
systems = inputs.flake-utils.lib.defaultSystems;
overlays = [ inputs.ruby-nix.overlays.ruby ];
in
inputs.flake-utils.lib.eachSystem systems (system:
let
2023-10-28 09:48:20 +00:00
pkgs = nixpkgs.legacyPackages."${system}";
2023-03-06 16:35:19 +00:00
in
{
packages.asciidoctor = with pkgs; writeShellScriptBin "asciidoctor" ''
asciidoctor -T ${self.site.asciidoctor-templates} $@
'';
2023-03-06 16:35:19 +00:00
devShells.default = import ./shell.nix { inherit pkgs; };
2023-03-06 16:35:19 +00:00
formatter = pkgs.treefmt;
}) // {
site = {
asciidoctor-templates = ./templates;
assets = ./assets;
};
};
2022-03-01 10:00:18 +00:00
}