add nix development environment

Provide a direnv-loaded Laravel and future Vue toolchain with isolated worktree ports and a process-compose stack. Use PostgreSQL for local runtime services while retaining in-memory SQLite for PHPUnit.
This commit is contained in:
Yisroel Baum 2026-07-30 22:54:20 +03:00
parent 2d25c28596
commit 83ca2cf43c
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
12 changed files with 345 additions and 13 deletions

54
flake.nix Normal file
View file

@ -0,0 +1,54 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
utils,
}:
utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
php = pkgs.php.buildEnv {
extraConfig = ''
memory_limit = "1G";
upload_max_filesize = "10M";
post_max_size = "25M";
'';
};
in
{
formatter = pkgs.nixfmt-tree;
devShells.default = pkgs.mkShell {
packages = with pkgs; [
bash
onefetch
just
php
phpPackages.composer
phpPackages.php-codesniffer
vscode-langservers-extracted
nodejs
nixfmt
nixfmt-tree
cypress
yaml-language-server
typescript
postgresql
mailpit
process-compose
mkcert
caddy
];
shellHook = builtins.readFile ./nix/shell-hook.sh;
};
}
);
}