Skip to content

Commit

Permalink
chore(config/infra/nix): add ascii art
Browse files Browse the repository at this point in the history
  • Loading branch information
MFarabi619 committed Feb 14, 2025
1 parent 21b45a0 commit a5fb42c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions infra/shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ pkgs ? import <nixpkgs> {}, DB ? "" }:

let
logoPath = "../libs/shared/assets/logos/cuHacking/logo-icon-wordmark-gradient-green.png";
teamLogoPath = "../libs/shared/assets/logos/cuHacking/team-logos.png";
pgPort = "5432";
pgUser = "postgres";
pgDatabase = "postgres";
Expand All @@ -12,6 +14,7 @@ in pkgs.mkShell {
name = "cuhacking-2025-dev-db";

buildInputs = [
pkgs.ascii-image-converter
pkgs.postgresql
];

Expand Down Expand Up @@ -56,15 +59,19 @@ in pkgs.mkShell {
echo "DATABASE_URI=postgres://${pgUser}:${pgPassword}@${pgHost}:${pgPort}/${pgDatabase}"
echo "***************************************************"
echo ""
ascii-image-converter ${logoPath} --color -f -b
echo "Leave None Behind Regardless of Our Development Cost πŸ’šβŒ¨πŸ§πŸš€πŸ”₯"
}
stop_db() {
echo "Stopping PostgreSQL..."
if pg_ctl status -D "$PGDATA" > /dev/null 2>&1; then
pg_ctl stop -D "$PGDATA"
echo "PostgreSQL stopped."
ascii-image-converter ${teamLogoPath} --color -f -b
echo "PostgreSQL stopped. πŸ’€πŸ›Œ"
else
echo "PostgreSQL is not running."
ascii-image-converter ${teamLogoPath} --color -f -b
echo "PostgreSQL is not running. πŸ’€πŸ›Œ"
fi
}
Expand Down

0 comments on commit a5fb42c

Please sign in to comment.