40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{
|
|
description = "Hugo static site development environment";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
hugo
|
|
marksman # Markdown LSP server
|
|
nodePackages.prettier # Format markdown and other files
|
|
markdownlint-cli
|
|
aspell
|
|
aspellDicts.en
|
|
];
|
|
|
|
shellHook = ''
|
|
# export ASPELL_CONF="dict-dir ${pkgs.aspellDicts.en}/lib/aspell"
|
|
|
|
# Auto-install git hooks if not already installed
|
|
if [ ! -L .git/hooks/pre-commit ]; then
|
|
bash scripts/install_hooks.sh
|
|
fi
|
|
|
|
echo "Hugo development environment loaded"
|
|
echo "Hugo version: $(hugo version)"
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|