-
Notifications
You must be signed in to change notification settings - Fork 50
/
flake.nix
43 lines (40 loc) · 953 Bytes
/
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
{
description = "An environment for the Hugo static site generator ";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
};
outputs = { self, nixpkgs, ... }:
let
system = "x86_64-linux";
in
{
devShells."${system}".default =
let
pkgs = import nixpkgs {
inherit system;
};
in
pkgs.mkShell {
packages = with pkgs; [
hugo
yarn
lychee
];
shellHook = ''
PROJECTDIR=`pwd`
hugo-deploy() {
echo "This doesn't do anything, but maybe it will one day."
}
hugo-server() {
hugo server --disableFastRender -verbose
}
check-links() {
cd $PROJECTDIR/content && lychee . && cd $PROJECTDIR
}
# hugo-server
'';
};
};
}