Add Nix dev shell with local MariaDB and dev orchestration script
This commit is contained in:
1 parent
6f8c8d7dfa
commit
c8b08fe258
5 files changed
+245
No files matched your search
@@ -0,0 +1,33 @@
|
||||
{
|
||||
description = "Dev shell for think.greaterchiangmai.com (frontend + backend Laravel apps)";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forAll = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
|
||||
in
|
||||
{
|
||||
devShells = forAll (pkgs:
|
||||
let
|
||||
php = pkgs.php83;
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
php
|
||||
php.packages.composer
|
||||
pkgs.mariadb
|
||||
pkgs.nodejs_22
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export DEV_ROOT="$PWD"
|
||||
export PATH="$DEV_ROOT/dev:$PATH"
|
||||
echo "think-greaterchiangmai dev shell — run 'dev help'"
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user