Theme System: - Move all theme app configs to apps/ subdirectory (20 themes) - Add theme-loader.nix for dynamic theme config deployment - Simplify stylix.nix to focus on base theming only Override System: - Add overrides.nix for file-based config overrides - Add behavior-configs.nix for non-visual configuration - Split hypr/nomarchy.conf into behavior vs visual sections Module Improvements: - Add lib.mkDefault to all customizable settings - Add modules/lib/ with shared utilities and state schema - Update all home and system modules for downstream overridability Installer: - New minimal TTY installer (installer/install.sh) - Golden path: BTRFS + LUKS2 (disko-golden.nix) - New installer-iso.nix for TTY-only installation - Keep graphical installer as installerIsoGraphical option Cleanup: - Remove obsolete install.sh, disko-ext4.nix, install-nomarchy.sh - Update live-iso.nix references - Add .claude/ to .gitignore for local IDE settings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
48 lines
1.4 KiB
Bash
Executable File
48 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Toggle dedicated vs integrated GPU mode via supergfxd (for hybrid gpu laptops, like Asus G14).
|
|
# Declarative enablement + Runtime mode switching for Nomarchy NixOS.
|
|
|
|
STATE_FILE="/etc/nixos/state.json"
|
|
|
|
# Check if supergfxd is enabled in config
|
|
if [[ $(sudo jq -r '.features.hybridGPU // false' "$STATE_FILE") != "true" ]]; then
|
|
if gum confirm "Hybrid GPU support is not enabled. Enable it now? (Requires sys-update)"; then
|
|
sudo jq '.features.hybridGPU = true' "$STATE_FILE" > /tmp/state.json && sudo mv /tmp/state.json "$STATE_FILE"
|
|
echo "Hybrid GPU support enabled in configuration. Applying changes..."
|
|
sudo sys-update
|
|
echo "Please run this command again after the update."
|
|
exit 0
|
|
fi
|
|
exit 1
|
|
fi
|
|
|
|
if ! command -v supergfxctl &> /dev/null; then
|
|
echo "supergfxctl not found. Is the system updated?"
|
|
exit 1
|
|
fi
|
|
|
|
gpu_mode=$(supergfxctl -g)
|
|
echo "Current GPU mode: $gpu_mode"
|
|
|
|
case "$gpu_mode" in
|
|
"Integrated")
|
|
if gum confirm "Switch to Hybrid mode (enables dGPU) and reboot?"; then
|
|
supergfxctl -m Hybrid
|
|
echo "Switching to Hybrid mode..."
|
|
nomarchy-system-reboot
|
|
fi
|
|
;;
|
|
"Hybrid")
|
|
if gum confirm "Switch to Integrated mode (disables dGPU) and reboot?"; then
|
|
supergfxctl -m Integrated
|
|
echo "Switching to Integrated mode..."
|
|
nomarchy-system-reboot
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Hybrid GPU in unknown mode: $gpu_mode. Try 'supergfxctl -m Hybrid' manually."
|
|
exit 1
|
|
;;
|
|
esac
|