Added flake with dev deps and git hooks

This commit is contained in:
2025-09-30 23:50:11 -06:00
parent 51abefb9b4
commit f202c5b3eb
7 changed files with 202 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
{
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 = ''
echo "Hugo development environment loaded"
echo "Hugo version: $(hugo version)"
# 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"
'';
};
}
);
}