From d10a9bc6deb385a3a60b6074c78f780edf04452d Mon Sep 17 00:00:00 2001 From: Don Williams Date: Mon, 2 Mar 2026 04:24:20 -0500 Subject: [PATCH] Fixed gpu profile detection code wasn't building for vm but for AMD On branch main Your branch is up to date with 'origin/main'. Changes to be committed: modified: modules/home/scripts/zcli.nix --- modules/home/scripts/zcli.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/home/scripts/zcli.nix b/modules/home/scripts/zcli.nix index ec31bdf..9d14cfd 100644 --- a/modules/home/scripts/zcli.nix +++ b/modules/home/scripts/zcli.nix @@ -17,6 +17,13 @@ ICON_ROCKET="🚀" # --- Helper Functions --- + get_flake_profile() { + local flake_profile="" + if [ -f "$FLAKE_NIX_PATH" ]; then + flake_profile=$(${pkgs.gnugrep}/bin/grep -E '^[[:space:]]*profile[[:space:]]*=' "$FLAKE_NIX_PATH" | ${pkgs.gnused}/bin/sed 's/.*=[[:space:]]*"\([^"]*\)".*/\1/') + fi + echo "$flake_profile" + } print_status() { echo echo "--- $ICON_INFO $1 ---" @@ -130,7 +137,7 @@ in # --- Configuration --- PROJECT="zaneyos" #ddubos or zaneyos - PROFILE="${profile}" + PROFILE_DEFAULT="${profile}" BACKUP_FILES_STR="${backupFilesString}" VERSION="1.0.2" FLAKE_NIX_PATH="$HOME/$PROJECT/flake.nix" @@ -341,6 +348,10 @@ in } # --- Main Logic --- + PROFILE="$(get_flake_profile)" + if [ -z "$PROFILE" ]; then + PROFILE="$PROFILE_DEFAULT" + fi if [ "$#" -eq 0 ]; then echo "Error: No command provided." >&2 print_help