Kieran's opinionated (and probably slightly dumb) nix config

chore: fix crush

dunkirk.sh 1bd028b6 61c577d4

verified
+18
+18
modules/home/system/shell.nix
··· 518 518 IS_EXISTING_DIR=false 519 519 IS_GIT_REPO=false 520 520 HAS_COMMITS=false 521 + 522 + # Check if we're already in a git repo with the same name 523 + CURRENT_REPO_NAME="" 524 + if ${pkgs.git}/bin/git rev-parse --is-inside-work-tree &>/dev/null; then 525 + CURRENT_REPO_NAME=$(basename "$(${pkgs.git}/bin/git rev-parse --show-toplevel)") 526 + fi 527 + 528 + # If NAME was provided and we're not in a matching git repo, create/enter the directory 529 + if [[ -n "$NAME" ]] && [[ "$CURRENT_REPO_NAME" != "$NAME" ]]; then 530 + if [[ -d "$NAME" ]]; then 531 + cd "$NAME" 532 + else 533 + mkdir -p "$NAME" 534 + cd "$NAME" 535 + fi 536 + fi 537 + 521 538 if ${pkgs.git}/bin/git rev-parse --is-inside-work-tree &>/dev/null; then 522 539 IS_GIT_REPO=true 523 540 IS_EXISTING_DIR=true ··· 542 559 else 543 560 ${pkgs.git}/bin/git init -b "$BRANCH" 544 561 IS_GIT_REPO=true 562 + ${pkgs.gum}/bin/gum style --foreground 35 "✓ Initialized git repository" 545 563 fi 546 564 fi 547 565