intra-back/shell.nix
2025-07-24 16:17:56 +02:00

32 lines
681 B
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
openjdk21
maven
nodejs_24
docker
docker-compose
postgresql_16
git
curl
jq
pgcli
];
JAVA_HOME = "${pkgs.openjdk21}/lib/openjdk";
DOCKER_BUILDKIT = "1";
shellHook = ''
echo "Quarkus dev environment ready!"
echo "Java: $(java -version 2>&1 | head -n 1)"
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
dockerd-rootless
# Fix Docker socket
if [ ! -S /var/run/docker.sock ]; then
echo " Docker not started. Run:"
echo " sudo systemctl start docker"
echo " sudo usermod -aG docker $USER"
fi
'';
}