This commit is contained in:
36
flake.nix
Normal file
36
flake.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
description = "Bennos Private Hugo Page";
|
||||
nixConfig.bash-prompt = "gohugo";
|
||||
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
flake-compat = {
|
||||
url = "github:edolstra/flake-compat";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, flake-utils }: {
|
||||
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.hugo
|
||||
pkgs.nodejs_20
|
||||
pkgs.tailwindcss
|
||||
];
|
||||
shellHook = ''
|
||||
echo "Hugo + Tailwind dev environment ready!"
|
||||
# Optionally install npm dependencies if you use a package.json
|
||||
if [ -f package.json ]; then
|
||||
npm install
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user