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:
parent
2d25c28596
commit
83ca2cf43c
12 changed files with 345 additions and 13 deletions
54
flake.nix
Normal file
54
flake.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue