# Define list of directories you want to stow CONFIG_DIRS := btop doom hypr kitty exokortex nvim rclone starship tmux wallpapers waybar wireplumber wofi yazi zsh # Default target for a fully-equipped workstation all: stow_all stow_rclone stow_exokortex wal -i ~/.config/wallpapers/green_yellow_forest.jpg -o ~/.config/waybar/launch.sh fastfetch # Base configurations common to ALL hosts (excludes host-specific network/system automation) stow_all: $(filter-out rclone exokortex, $(CONFIG_DIRS)) @echo "Removing legacy shell symlinks if they exist..." @if [ -L $$HOME/.zshrc ]; then rm $$HOME/.zshrc; fi @if [ -L $$HOME/.tmux.conf ]; then rm $$HOME/.tmux.conf; fi @echo "Stowing baseline configurations..." @$(foreach dir,$(filter-out rclone exokortex, $(CONFIG_DIRS)), $(MAKE) stow_$(dir);) # Generic atomic stow command using Restow (-R) for clean tracking stow_%: @echo "Stowing package: $*" stow -R -v -t $(HOME) $* # Dedicated target for rclone (Omit this target on hosts that don't need it) stow_rclone: @echo "Stowing rclone securely..." stow -R -v -t $(HOME) rclone @echo "Running post-installation script for rclone" @bash $(CURDIR)/scripts/rclone_post_install.sh # Dedicated target for exokortex (Omit this target on sterile servers if needed) stow_exokortex: @echo "Stowing exokortex automation layers..." stow -R -v -t $(HOME) exokortex @echo "Running post-installation script for exokortex" @bash $(CURDIR)/scripts/exokortex_post_install.sh # Optional: Global cleanup target you only run manually when you want a deep system purge prune_dead_links: @echo "Purging all broken symlinks across core configuration profiles..." find ~/.config -xtype l -delete -print find ~/.local/bin -xtype l -delete -print