-
Notifications
You must be signed in to change notification settings - Fork 14
/
flake.nix
52 lines (44 loc) · 1.51 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
description = "Dev environment for mtlynch.io";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
# 18.14.1 release
nodejs-nixpkgs.url = "github:NixOS/nixpkgs/6adf48f53d819a7b6e15672817fa1e78e5f4e84f";
# 0.9.0
markdown-lint-nixpkgs.url = "github:NixOS/nixpkgs/12bdeb01ff9e2d3917e6a44037ed7df6e6c3df9d";
# 5.0.8 release
html-proofer-nixpkgs.url = "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269";
# 0.139.3 release
hugo-nixpkgs.url = "github:NixOS/nixpkgs/dd51f52372a20a93c219e8216fe528a648ffcbf4";
};
outputs = {
self,
flake-utils,
nodejs-nixpkgs,
markdown-lint-nixpkgs,
html-proofer-nixpkgs,
hugo-nixpkgs,
} @ inputs:
flake-utils.lib.eachDefaultSystem (system: let
hugo = hugo-nixpkgs.legacyPackages.${system}.hugo;
nodejs = nodejs-nixpkgs.legacyPackages.${system}.nodejs-18_x;
html-proofer = html-proofer-nixpkgs.legacyPackages.${system}.html-proofer;
markdownlint = markdown-lint-nixpkgs.legacyPackages.${system}.markdownlint-cli2;
in {
devShells.default = hugo-nixpkgs.legacyPackages.${system}.mkShell {
packages = [
hugo
nodejs
markdownlint
html-proofer
];
shellHook = ''
echo "htmlproofer" "$(htmlproofer --version)"
markdownlint-cli2 | head -n 1
echo "node" "$(node --version)"
hugo version
'';
};
formatter = hugo-nixpkgs.legacyPackages.${system}.alejandra;
});
}