Added flake with dev deps and git hooks
This commit is contained in:
@@ -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"
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user