diff --git a/bin/develop b/bin/develop new file mode 100755 index 0000000..b54724c --- /dev/null +++ b/bin/develop @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Starts a project using the appropriate Docker Compose or Nix Flake command. + +set -euo pipefail + +if [[ -f docker-compose.yml ]]; then + docker compose up -d "${@}" + exit 0 +fi + +if [[ -f docker-compose.yaml ]]; then + docker compose up -d "${@}" + exit 0 +fi + +if [[ -f flake.nix ]]; then + nix develop -c "$SHELL" + exit 0 +fi + +echo "No docker-compose.yaml or flake.nix file found." +exit 1 diff --git a/home-manager/modules/zsh.nix b/home-manager/modules/zsh.nix index d36d46e..4001026 100644 --- a/home-manager/modules/zsh.nix +++ b/home-manager/modules/zsh.nix @@ -76,6 +76,7 @@ bindkey -M isearch " " magic-space ialias cs="create-script" + ialias dev="develop" ialias fetch="git fetch --all --jobs=4 --progress --prune" ialias run="./run" ialias pull="git pull --autostash --jobs=4 --summary origin"