Complete NixOS rewrite: Transform Omarchy from Arch to declarative NixOS
- Replace shell script-based Arch installation with declarative NixOS configuration - Implement flake-based architecture for reproducible builds - Add modular system with feature flags (Docker, gaming, development, etc.) - Create declarative theme system with Tokyo Night and Catppuccin - Convert utility scripts to Nix packages with proper derivations - Add comprehensive development environments (Rust, Go, Python, Node.js, C/C++) - Implement Home Manager integration for user environment management - Add interactive installer with theme selection and feature configuration - Update documentation for NixOS-specific workflows and commands - Provide atomic updates with rollback capability This maintains all aesthetic and functional benefits of original Omarchy while gaining NixOS power: reproducibility, version control, and atomic updates. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
91
boot.sh
91
boot.sh
@@ -1,39 +1,80 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Set install mode to online since boot.sh is used for curl installations
|
||||
export OMARCHY_ONLINE_INSTALL=true
|
||||
# Omarchy NixOS Bootstrap Script
|
||||
# Downloads and installs Omarchy on a fresh NixOS system
|
||||
|
||||
ansi_art=' ▄▄▄
|
||||
▄█████▄ ▄███████████▄ ▄███████ ▄███████ ▄███████ ▄█ █▄ ▄█ █▄
|
||||
set -e
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
show_banner() {
|
||||
echo -e "${BLUE}"
|
||||
cat << 'EOF'
|
||||
▄▄▄
|
||||
▄█████▄ ▄███████████▄ ▄███████ ▄███████ ▄███████ ▄█ █▄ ▄█ █▄
|
||||
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
|
||||
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ █▀ ███ ███ ███ ███
|
||||
███ ███ ███ ███ ███ ▄███▄▄▄███ ▄███▄▄▄██▀ ███ ▄███▄▄▄███▄ ███▄▄▄███
|
||||
███ ███ ███ ███ ███ ▀███▀▀▀███ ▀███▀▀▀▀ ███ ▀▀███▀▀▀███ ▀▀▀▀▀▀███
|
||||
███ ███ ███ ███ ███ ███ ███ ██████████ ███ █▄ ███ ███ ▄██ ███
|
||||
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
|
||||
▀█████▀ ▀█ ███ █▀ ███ █▀ ███ ███ ███████▀ ███ █▀ ▀█████▀
|
||||
███ █▀ '
|
||||
▀█████▀ ▀█ ███ █▀ ███ █▀ ███ ███ ███████▀ ███ █▀ ▀█████▀
|
||||
███ █▀
|
||||
|
||||
clear
|
||||
echo -e "\n$ansi_art\n"
|
||||
NixOS Edition
|
||||
Bootstrap Installer
|
||||
EOF
|
||||
echo -e "${NC}"
|
||||
}
|
||||
|
||||
sudo pacman -Syu --noconfirm --needed git
|
||||
check_nixos() {
|
||||
if [ ! -f /etc/NIXOS ]; then
|
||||
echo -e "${RED}Error: This script must be run on NixOS${NC}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Use custom repo if specified, otherwise default to basecamp/omarchy
|
||||
OMARCHY_REPO="${OMARCHY_REPO:-basecamp/omarchy}"
|
||||
main() {
|
||||
show_banner
|
||||
|
||||
echo -e "\nCloning Omarchy from: https://github.com/${OMARCHY_REPO}.git"
|
||||
rm -rf ~/.local/share/omarchy/
|
||||
git clone "https://github.com/${OMARCHY_REPO}.git" ~/.local/share/omarchy >/dev/null
|
||||
echo -e "${BLUE}Welcome to Omarchy NixOS Bootstrap!${NC}"
|
||||
echo
|
||||
check_nixos
|
||||
|
||||
# Use custom branch if instructed, otherwise default to master
|
||||
OMARCHY_REF="${OMARCHY_REF:-master}"
|
||||
if [[ $OMARCHY_REF != "master" ]]; then
|
||||
echo -e "\e[32mUsing branch: $OMARCHY_REF\e[0m"
|
||||
cd ~/.local/share/omarchy
|
||||
git fetch origin "${OMARCHY_REF}" && git checkout "${OMARCHY_REF}"
|
||||
cd -
|
||||
fi
|
||||
# Install git if not present
|
||||
if ! command -v git &> /dev/null; then
|
||||
echo -e "${YELLOW}Installing git...${NC}"
|
||||
nix-shell -p git --run true
|
||||
fi
|
||||
|
||||
echo -e "\nInstallation starting..."
|
||||
source ~/.local/share/omarchy/install.sh
|
||||
# Use custom repo if specified, otherwise default
|
||||
OMARCHY_REPO="${OMARCHY_REPO:-yourusername/omarchy-nixos}"
|
||||
OMARCHY_REF="${OMARCHY_REF:-main}"
|
||||
|
||||
echo -e "${BLUE}Cloning Omarchy from: https://github.com/${OMARCHY_REPO}.git${NC}"
|
||||
|
||||
# Remove existing directory
|
||||
rm -rf ~/.local/share/omarchy-nixos/
|
||||
|
||||
# Clone repository
|
||||
git clone "https://github.com/${OMARCHY_REPO}.git" ~/.local/share/omarchy-nixos
|
||||
|
||||
# Use custom branch if specified
|
||||
if [[ $OMARCHY_REF != "main" ]]; then
|
||||
echo -e "${GREEN}Using branch: $OMARCHY_REF${NC}"
|
||||
cd ~/.local/share/omarchy-nixos
|
||||
git fetch origin "${OMARCHY_REF}" && git checkout "${OMARCHY_REF}"
|
||||
fi
|
||||
|
||||
cd ~/.local/share/omarchy-nixos
|
||||
|
||||
echo -e "${BLUE}Starting installation...${NC}"
|
||||
./install.sh
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user