2021-05-28 18:22:52 +02:00
|
|
|
{
|
|
|
|
description = "Ambroisie's blog";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
futils = {
|
|
|
|
type = "github";
|
|
|
|
owner = "numtide";
|
|
|
|
repo = "flake-utils";
|
|
|
|
ref = "master";
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
type = "github";
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
2021-08-08 16:04:44 +02:00
|
|
|
ref = "nixpkgs-unstable";
|
2021-05-28 18:22:52 +02:00
|
|
|
};
|
2021-05-31 22:01:28 +02:00
|
|
|
|
|
|
|
pre-commit-hooks = {
|
|
|
|
type = "github";
|
|
|
|
owner = "cachix";
|
|
|
|
repo = "pre-commit-hooks.nix";
|
|
|
|
ref = "master";
|
|
|
|
inputs = {
|
|
|
|
flake-utils.follows = "futils";
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
2021-05-28 18:22:52 +02:00
|
|
|
};
|
|
|
|
|
2021-05-31 22:01:28 +02:00
|
|
|
outputs = { self, futils, nixpkgs, pre-commit-hooks } @ inputs:
|
|
|
|
futils.lib.eachDefaultSystem (system:
|
2021-05-28 18:22:52 +02:00
|
|
|
let
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in
|
|
|
|
{
|
2021-05-31 22:01:28 +02:00
|
|
|
checks = {
|
|
|
|
pre-commit = pre-commit-hooks.lib.${system}.run {
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
hooks = {
|
|
|
|
nixpkgs-fmt = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2021-05-31 22:45:13 +02:00
|
|
|
|
|
|
|
markdown-lint = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
name = "Lint each post's markdown";
|
|
|
|
|
|
|
|
entry =
|
|
|
|
let
|
|
|
|
pkg = pkgs.nodePackages.markdownlint-cli;
|
|
|
|
in
|
|
|
|
"${pkg}/bin/markdownlint";
|
|
|
|
|
|
|
|
types = [ "markdown" ];
|
|
|
|
};
|
2021-05-31 22:01:28 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-05-28 18:22:52 +02:00
|
|
|
devShell = pkgs.mkShell {
|
|
|
|
name = "blog";
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
gnumake
|
|
|
|
hugo
|
|
|
|
];
|
2021-05-31 22:01:28 +02:00
|
|
|
|
|
|
|
inherit (self.checks.${system}.pre-commit) shellHook;
|
2021-05-28 18:22:52 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|