Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ elm-stuff/
*.zip
packged/
out-tsc/
.direnv/
.corepack/
43 changes: 43 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
description = "wolfcola-devtools development environment";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
};

outputs =
{
nixpkgs,
systems,
...
}:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
devShells = eachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
packages = with pkgs; [
nodejs_24
corepack
lefthook
];

shellHook = ''
corepack enable --install-directory "$PWD/.corepack" >/dev/null 2>&1
export PATH="$PWD/.corepack:$PATH"

if [ ! -d node_modules ]; then
echo "node_modules missing — running pnpm install..."
pnpm install
elif [ pnpm-lock.yaml -nt node_modules ]; then
echo "pnpm-lock.yaml is newer than node_modules — running pnpm install..."
pnpm install
fi
'';
};
}
);

formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt);
};
}
Loading