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
This commit is contained in:
parent
39b8117fcf
commit
d10a9bc6de
1 changed files with 12 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue