fixed themeing and added more of the omarchy features going for a vm test now
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
./omarchy_ref/*
|
||||||
@@ -20,6 +20,12 @@ in
|
|||||||
./modules/lib.nix
|
./modules/lib.nix
|
||||||
./modules/core.nix
|
./modules/core.nix
|
||||||
./modules/colors.nix
|
./modules/colors.nix
|
||||||
|
./modules/boot.nix
|
||||||
|
./modules/security.nix
|
||||||
|
./modules/fastfetch.nix
|
||||||
|
./modules/walker.nix
|
||||||
|
./modules/scripts.nix
|
||||||
|
./modules/menus.nix
|
||||||
./modules/desktop/hyprland.nix
|
./modules/desktop/hyprland.nix
|
||||||
./modules/packages.nix
|
./modules/packages.nix
|
||||||
./modules/development.nix
|
./modules/development.nix
|
||||||
@@ -59,7 +65,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bootloader
|
# Bootloader (now configured in boot.nix module)
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
@@ -69,13 +75,6 @@ in
|
|||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Plymouth for boot splash
|
|
||||||
plymouth = {
|
|
||||||
enable = true;
|
|
||||||
theme = "bgrt"; # Use default theme for now
|
|
||||||
# themePackages = [ (pkgs.callPackage ./packages/plymouth-theme.nix {}) ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Kernel
|
# Kernel
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
};
|
};
|
||||||
@@ -152,6 +151,27 @@ in
|
|||||||
# Quick Setup - Choose a preset that matches your use case
|
# Quick Setup - Choose a preset that matches your use case
|
||||||
preset = "developer"; # Options: minimal, developer, creator, gamer, office, everything
|
preset = "developer"; # Options: minimal, developer, creator, gamer, office, everything
|
||||||
|
|
||||||
|
# Security configuration
|
||||||
|
security = {
|
||||||
|
enable = true;
|
||||||
|
fingerprint = {
|
||||||
|
enable = false; # Set to true to enable fingerprint auth
|
||||||
|
autoDetect = true; # Auto-detect fingerprint hardware
|
||||||
|
};
|
||||||
|
fido2 = {
|
||||||
|
enable = false; # Set to true to enable FIDO2 auth
|
||||||
|
autoDetect = true; # Auto-detect FIDO2 devices
|
||||||
|
};
|
||||||
|
systemHardening = {
|
||||||
|
enable = true; # Enable security hardening
|
||||||
|
faillock = {
|
||||||
|
enable = true; # Enable account lockout protection
|
||||||
|
denyAttempts = 10; # Lock after 10 failed attempts
|
||||||
|
unlockTime = 120; # Unlock after 2 minutes
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Color scheme configuration (optional)
|
# Color scheme configuration (optional)
|
||||||
# Uncomment and customize these options for automatic color generation:
|
# Uncomment and customize these options for automatic color generation:
|
||||||
# colorScheme = inputs.nix-colors.colorSchemes.tokyo-night-dark;
|
# colorScheme = inputs.nix-colors.colorSchemes.tokyo-night-dark;
|
||||||
@@ -178,4 +198,4 @@ in
|
|||||||
# exclude = [ "discord" "spotify" "steam" "teams" ];
|
# exclude = [ "discord" "spotify" "steam" "teams" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
681
install.sh
@@ -1,247 +1,618 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# OmniXY NixOS Installation Script
|
# OmniXY NixOS Installation Script
|
||||||
# This script helps install OmniXY on an existing NixOS system
|
# Stylized installer with Tokyo Night theme integration
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Colors for output
|
# Get terminal dimensions for centering
|
||||||
RED='\033[0;31m'
|
TERM_WIDTH=$(tput cols 2>/dev/null || echo 80)
|
||||||
GREEN='\033[0;32m'
|
TERM_HEIGHT=$(tput lines 2>/dev/null || echo 24)
|
||||||
YELLOW='\033[1;33m'
|
|
||||||
BLUE='\033[0;34m'
|
|
||||||
NC='\033[0m' # No Color
|
|
||||||
|
|
||||||
# ASCII Art
|
# Tokyo Night Color Palette
|
||||||
|
BG='\033[48;2;26;27;38m' # #1a1b26
|
||||||
|
FG='\033[38;2;192;202;245m' # #c0caf5
|
||||||
|
BLUE='\033[38;2;122;162;247m' # #7aa2f7
|
||||||
|
CYAN='\033[38;2;125;207;255m' # #7dcfff
|
||||||
|
GREEN='\033[38;2;158;206;106m' # #9ece6a
|
||||||
|
YELLOW='\033[38;2;224;175;104m' # #e0af68
|
||||||
|
RED='\033[38;2;247;118;142m' # #f7768e
|
||||||
|
PURPLE='\033[38;2;187;154;247m' # #bb9af7
|
||||||
|
ORANGE='\033[38;2;255;158;100m' # #ff9e64
|
||||||
|
DARK_BLUE='\033[38;2;65;72;104m' # #414868
|
||||||
|
|
||||||
|
# Special effects
|
||||||
|
BOLD='\033[1m'
|
||||||
|
DIM='\033[2m'
|
||||||
|
UNDERLINE='\033[4m'
|
||||||
|
BLINK='\033[5m'
|
||||||
|
RESET='\033[0m'
|
||||||
|
CLEAR='\033[2J'
|
||||||
|
CURSOR_HOME='\033[H'
|
||||||
|
|
||||||
|
# Utility functions
|
||||||
|
center_text() {
|
||||||
|
local text="$1"
|
||||||
|
local width=${2:-$TERM_WIDTH}
|
||||||
|
local padding=$(( (width - ${#text}) / 2 ))
|
||||||
|
printf "%*s%s\n" $padding "" "$text"
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_box() {
|
||||||
|
local width=${1:-60}
|
||||||
|
local height=${2:-3}
|
||||||
|
local char=${3:-"─"}
|
||||||
|
local corner_char=${4:-"╭╮╰╯"}
|
||||||
|
|
||||||
|
# Top border
|
||||||
|
printf "${BLUE}%c" "${corner_char:0:1}"
|
||||||
|
for ((i=0; i<width-2; i++)); do printf "$char"; done
|
||||||
|
printf "%c${RESET}\n" "${corner_char:1:1}"
|
||||||
|
|
||||||
|
# Middle empty lines
|
||||||
|
for ((i=0; i<height-2; i++)); do
|
||||||
|
printf "${BLUE}│%*s│${RESET}\n" $((width-2)) ""
|
||||||
|
done
|
||||||
|
|
||||||
|
# Bottom border
|
||||||
|
printf "${BLUE}%c" "${corner_char:2:1}"
|
||||||
|
for ((i=0; i<width-2; i++)); do printf "$char"; done
|
||||||
|
printf "%c${RESET}\n" "${corner_char:3:1}"
|
||||||
|
}
|
||||||
|
|
||||||
|
progress_bar() {
|
||||||
|
local progress=$1
|
||||||
|
local width=50
|
||||||
|
local filled=$((progress * width / 100))
|
||||||
|
local empty=$((width - filled))
|
||||||
|
|
||||||
|
printf "\r${BLUE}["
|
||||||
|
printf "%*s" $filled | tr ' ' '█'
|
||||||
|
printf "%*s" $empty | tr ' ' '░'
|
||||||
|
printf "] ${CYAN}%d%%${RESET}" $progress
|
||||||
|
}
|
||||||
|
|
||||||
|
animate_text() {
|
||||||
|
local text="$1"
|
||||||
|
local color="$2"
|
||||||
|
local delay=${3:-0.03}
|
||||||
|
|
||||||
|
for ((i=0; i<${#text}; i++)); do
|
||||||
|
printf "${color}%c" "${text:$i:1}"
|
||||||
|
sleep $delay
|
||||||
|
done
|
||||||
|
printf "${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
loading_spinner() {
|
||||||
|
local pid=$1
|
||||||
|
local message="$2"
|
||||||
|
local spinner='⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏'
|
||||||
|
local i=0
|
||||||
|
|
||||||
|
while kill -0 $pid 2>/dev/null; do
|
||||||
|
printf "\r${CYAN}%c ${FG}%s${RESET}" "${spinner:$i:1}" "$message"
|
||||||
|
i=$(( (i+1) % ${#spinner} ))
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
printf "\r${GREEN}✓ ${FG}%s${RESET}\n" "$message"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set Tokyo Night terminal colors
|
||||||
|
setup_terminal() {
|
||||||
|
# Set background color for full terminal
|
||||||
|
printf "${BG}${CLEAR}${CURSOR_HOME}"
|
||||||
|
|
||||||
|
# Set Tokyo Night color palette for terminal
|
||||||
|
printf '\033]4;0;color0\007' # Black
|
||||||
|
printf '\033]4;1;color1\007' # Red
|
||||||
|
printf '\033]4;2;color2\007' # Green
|
||||||
|
printf '\033]4;3;color3\007' # Yellow
|
||||||
|
printf '\033]4;4;color4\007' # Blue
|
||||||
|
printf '\033]4;5;color5\007' # Magenta
|
||||||
|
printf '\033]4;6;color6\007' # Cyan
|
||||||
|
printf '\033]4;7;color7\007' # White
|
||||||
|
}
|
||||||
|
|
||||||
|
# Stylized banner with animations
|
||||||
show_banner() {
|
show_banner() {
|
||||||
echo -e "${BLUE}"
|
clear
|
||||||
cat << 'EOF'
|
setup_terminal
|
||||||
▄▄▄
|
|
||||||
▄█████▄ ▄████▄ ██▄ ▄██ ██▄ ▄██ ▄██ ▄██ ▄█ ▄█ █▄ ▄█ █▄
|
|
||||||
███ ███ ███ ███ ███▄ ▄███ ███ ███ ███ ███ ███ ███ ███ ███ ███
|
|
||||||
███ ███ ███ ███ ████▀████ ███▄▄███ ███▄ ███ ███ ███ ███ ███ ███
|
|
||||||
███ ███ ███ ███ ███ ███ ████████ █████████ ███ ▄███▄▄▄███▄ ███▄▄▄███
|
|
||||||
███ ███ ███ ███ ███ ███ ███ ███ ███ █████ ███ ▀▀███▀▀▀███ ▀▀▀▀▀▀███
|
|
||||||
███ ███ ███ ███ ███ ███ ███ ███ ███ ████ ███ ███ ███ ▄██ ███
|
|
||||||
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
|
|
||||||
▀█████▀ ▀████▀ ███ ███ ███ ███ ███ ███ ▀█ ███ █▀ ▀█████▀
|
|
||||||
|
|
||||||
NixOS Edition
|
# Add some vertical spacing
|
||||||
EOF
|
for ((i=0; i<3; i++)); do echo; done
|
||||||
echo -e "${NC}"
|
|
||||||
|
# Main logo with color gradient effect
|
||||||
|
echo
|
||||||
|
center_text "${CYAN}${BOLD}███████╗███╗ ███╗███╗ ██╗██╗██╗ ██╗██╗ ██╗"
|
||||||
|
center_text "██╔════╝████╗ ████║████╗ ██║██║╚██╗██╔╝╚██╗ ██╔╝"
|
||||||
|
center_text "${BLUE}██║ ██╔████╔██║██╔██╗ ██║██║ ╚███╔╝ ╚████╔╝ "
|
||||||
|
center_text "██║ ██║╚██╔╝██║██║╚██╗██║██║ ██╔██╗ ╚██╔╝ "
|
||||||
|
center_text "${PURPLE}███████╗██║ ╚═╝ ██║██║ ╚████║██║██╔╝ ██╗ ██║ "
|
||||||
|
center_text "╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═╝ ${RESET}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Subtitle with typewriter effect
|
||||||
|
printf "%*s" $(( (TERM_WIDTH - 60) / 2 )) ""
|
||||||
|
animate_text "🚀 Declarative • 🎨 Beautiful • ⚡ Fast" "$CYAN" 0.05
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Version and edition info
|
||||||
|
center_text "${DIM}${FG}NixOS Edition • Version 1.0 • Tokyo Night Theme${RESET}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Decorative border
|
||||||
|
printf "%*s" $(( (TERM_WIDTH - 60) / 2 )) ""
|
||||||
|
printf "${DARK_BLUE}"
|
||||||
|
for ((i=0; i<60; i++)); do printf "═"; done
|
||||||
|
printf "${RESET}\n"
|
||||||
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if running on NixOS
|
# Stylized section headers
|
||||||
|
section_header() {
|
||||||
|
local title="$1"
|
||||||
|
local icon="$2"
|
||||||
|
local width=60
|
||||||
|
|
||||||
|
echo
|
||||||
|
printf "%*s" $(( (TERM_WIDTH - width) / 2 )) ""
|
||||||
|
printf "${BLUE}╭"
|
||||||
|
for ((i=0; i<width-2; i++)); do printf "─"; done
|
||||||
|
printf "╮${RESET}\n"
|
||||||
|
|
||||||
|
printf "%*s" $(( (TERM_WIDTH - width) / 2 )) ""
|
||||||
|
printf "${BLUE}│${BOLD}${CYAN} $icon $title"
|
||||||
|
printf "%*s${BLUE}│${RESET}\n" $((width - 6 - ${#title} - ${#icon})) ""
|
||||||
|
|
||||||
|
printf "%*s" $(( (TERM_WIDTH - width) / 2 )) ""
|
||||||
|
printf "${BLUE}╰"
|
||||||
|
for ((i=0; i<width-2; i++)); do printf "─"; done
|
||||||
|
printf "╯${RESET}\n"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
# Stylized menu options
|
||||||
|
show_menu() {
|
||||||
|
local title="$1"
|
||||||
|
shift
|
||||||
|
local options=("$@")
|
||||||
|
|
||||||
|
section_header "$title" "🎛️ "
|
||||||
|
|
||||||
|
for i in "${!options[@]}"; do
|
||||||
|
local num=$((i + 1))
|
||||||
|
center_text "${BOLD}${CYAN}$num.${RESET}${FG} ${options[$i]}"
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
center_text "${DIM}${FG}Enter your choice:${RESET}"
|
||||||
|
printf "%*s" $(( TERM_WIDTH / 2 - 5 )) ""
|
||||||
|
printf "${CYAN}► ${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Enhanced user input with validation
|
||||||
|
get_input() {
|
||||||
|
local prompt="$1"
|
||||||
|
local default="$2"
|
||||||
|
local validator="$3"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
printf "%*s${FG}%s" $(( (TERM_WIDTH - ${#prompt} - 10) / 2 )) "" "$prompt"
|
||||||
|
if [[ -n "$default" ]]; then
|
||||||
|
printf "${DIM} (default: $default)${RESET}"
|
||||||
|
fi
|
||||||
|
printf "${CYAN}: ${RESET}"
|
||||||
|
|
||||||
|
read -r input
|
||||||
|
input=${input:-$default}
|
||||||
|
|
||||||
|
if [[ -z "$validator" ]] || eval "$validator '$input'"; then
|
||||||
|
echo "$input"
|
||||||
|
return
|
||||||
|
else
|
||||||
|
center_text "${RED}❌ Invalid input. Please try again.${RESET}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check functions with styled output
|
||||||
check_nixos() {
|
check_nixos() {
|
||||||
if [ ! -f /etc/NIXOS ]; then
|
section_header "System Verification" "🔍"
|
||||||
echo -e "${RED}Error: This installer must be run on a NixOS system${NC}"
|
|
||||||
echo "Please install NixOS first: https://nixos.org/download.html"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check for root/sudo
|
printf "%*s${FG}Checking NixOS installation..." $(( (TERM_WIDTH - 35) / 2 )) ""
|
||||||
check_permissions() {
|
sleep 1
|
||||||
if [ "$EUID" -eq 0 ]; then
|
|
||||||
echo -e "${YELLOW}Warning: Running as root. It's recommended to run as a regular user with sudo access.${NC}"
|
if [ ! -f /etc/NIXOS ]; then
|
||||||
read -p "Continue anyway? (y/n) " -n 1 -r
|
printf "\r%*s${RED}❌ Not running on NixOS${RESET}\n" $(( (TERM_WIDTH - 25) / 2 )) ""
|
||||||
echo
|
echo
|
||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
center_text "${RED}${BOLD}ERROR: This installer requires NixOS${RESET}"
|
||||||
|
center_text "${FG}Please install NixOS first: ${UNDERLINE}https://nixos.org/download.html${RESET}"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
printf "\r%*s${GREEN}✅ NixOS detected${RESET}\n" $(( (TERM_WIDTH - 20) / 2 )) ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "%*s${FG}Checking permissions..." $(( (TERM_WIDTH - 25) / 2 )) ""
|
||||||
|
sleep 0.5
|
||||||
|
|
||||||
|
if [ "$EUID" -eq 0 ]; then
|
||||||
|
printf "\r%*s${YELLOW}⚠️ Running as root${RESET}\n" $(( (TERM_WIDTH - 20) / 2 )) ""
|
||||||
|
echo
|
||||||
|
center_text "${YELLOW}Warning: Running as root is not recommended${RESET}"
|
||||||
|
center_text "${FG}It's safer to run as a regular user with sudo access${RESET}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
printf "%*s" $(( (TERM_WIDTH - 20) / 2 )) ""
|
||||||
|
printf "${CYAN}Continue anyway? (y/N): ${RESET}"
|
||||||
|
read -n 1 -r reply
|
||||||
|
echo
|
||||||
|
if [[ ! $reply =~ ^[Yy]$ ]]; then
|
||||||
|
center_text "${FG}Installation cancelled${RESET}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
printf "\r%*s${GREEN}✅ User permissions OK${RESET}\n" $(( (TERM_WIDTH - 25) / 2 )) ""
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Backup existing configuration
|
# Enhanced backup with progress
|
||||||
backup_config() {
|
backup_config() {
|
||||||
if [ -d /etc/nixos ]; then
|
if [ -d /etc/nixos ]; then
|
||||||
|
section_header "Configuration Backup" "💾"
|
||||||
|
|
||||||
BACKUP_DIR="/etc/nixos.backup.$(date +%Y%m%d-%H%M%S)"
|
BACKUP_DIR="/etc/nixos.backup.$(date +%Y%m%d-%H%M%S)"
|
||||||
echo -e "${BLUE}📦 Backing up existing configuration to $BACKUP_DIR...${NC}"
|
center_text "${FG}Creating backup: ${CYAN}$BACKUP_DIR${RESET}"
|
||||||
sudo cp -r /etc/nixos "$BACKUP_DIR"
|
echo
|
||||||
echo -e "${GREEN}✓ Backup complete${NC}"
|
|
||||||
|
# Simulate progress for visual appeal
|
||||||
|
for i in {1..20}; do
|
||||||
|
progress_bar $((i * 5))
|
||||||
|
sleep 0.05
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
|
||||||
|
sudo cp -r /etc/nixos "$BACKUP_DIR" &
|
||||||
|
loading_spinner $! "Backing up existing configuration"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install Omarchy configuration
|
# Installation with progress tracking
|
||||||
install_config() {
|
install_config() {
|
||||||
echo -e "${BLUE}📝 Installing Omarchy configuration...${NC}"
|
section_header "Installing Configuration" "📦"
|
||||||
|
|
||||||
# Create nixos directory if it doesn't exist
|
center_text "${FG}Installing OmniXY configuration files...${RESET}"
|
||||||
sudo mkdir -p /etc/nixos
|
echo
|
||||||
|
|
||||||
# Copy configuration files
|
# Create directory
|
||||||
echo "Copying configuration files..."
|
(sudo mkdir -p /etc/nixos && sleep 0.5) &
|
||||||
sudo cp -r ./* /etc/nixos/
|
loading_spinner $! "Creating configuration directory"
|
||||||
|
|
||||||
# Ensure proper permissions
|
# Copy files with progress simulation
|
||||||
sudo chown -R root:root /etc/nixos
|
(sudo cp -r ./* /etc/nixos/ && sleep 1) &
|
||||||
sudo chmod 755 /etc/nixos
|
loading_spinner $! "Copying configuration files"
|
||||||
|
|
||||||
echo -e "${GREEN}✓ Configuration files installed${NC}"
|
# Set permissions
|
||||||
|
(sudo chown -R root:root /etc/nixos && sudo chmod 755 /etc/nixos && sleep 0.5) &
|
||||||
|
loading_spinner $! "Setting file permissions"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Update user in configuration
|
# Enhanced user configuration
|
||||||
update_user() {
|
update_user() {
|
||||||
read -p "Enter your username (default: user): " USERNAME
|
section_header "User Configuration" "👤"
|
||||||
USERNAME=${USERNAME:-user}
|
|
||||||
|
|
||||||
echo -e "${BLUE}👤 Configuring for user: $USERNAME${NC}"
|
local username
|
||||||
|
username=$(get_input "Enter your username" "user" '[[ $1 =~ ^[a-zA-Z][a-zA-Z0-9_-]*$ ]]')
|
||||||
|
|
||||||
# Update configuration files with username
|
echo
|
||||||
sudo sed -i "s/user = \"user\"/user = \"$USERNAME\"/" /etc/nixos/configuration.nix
|
center_text "${FG}Configuring system for user: ${CYAN}${BOLD}$username${RESET}"
|
||||||
sudo sed -i "s/home.username = \"user\"/home.username = \"$USERNAME\"/" /etc/nixos/home.nix
|
echo
|
||||||
sudo sed -i "s|home.homeDirectory = \"/home/user\"|home.homeDirectory = \"/home/$USERNAME\"|" /etc/nixos/home.nix
|
|
||||||
|
|
||||||
echo -e "${GREEN}✓ User configuration updated${NC}"
|
# Update configuration files
|
||||||
|
(sudo sed -i "s/user = \"user\"/user = \"$username\"/" /etc/nixos/configuration.nix && sleep 0.3) &
|
||||||
|
loading_spinner $! "Updating main configuration"
|
||||||
|
|
||||||
|
(sudo sed -i "s/home.username = \"user\"/home.username = \"$username\"/" /etc/nixos/home.nix 2>/dev/null && sleep 0.3) &
|
||||||
|
loading_spinner $! "Updating home configuration"
|
||||||
|
|
||||||
|
(sudo sed -i "s|home.homeDirectory = \"/home/user\"|home.homeDirectory = \"/home/$username\"|" /etc/nixos/home.nix 2>/dev/null && sleep 0.3) &
|
||||||
|
loading_spinner $! "Setting home directory"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Select theme
|
# Stylized theme selection
|
||||||
select_theme() {
|
select_theme() {
|
||||||
echo -e "${BLUE}🎨 Select a theme:${NC}"
|
section_header "Theme Selection" "🎨"
|
||||||
echo "1) Tokyo Night (default)"
|
|
||||||
echo "2) Catppuccin"
|
|
||||||
echo "3) Gruvbox"
|
|
||||||
echo "4) Nord"
|
|
||||||
echo "5) Everforest"
|
|
||||||
echo "6) Rose Pine"
|
|
||||||
echo "7) Kanagawa"
|
|
||||||
|
|
||||||
read -p "Enter choice (1-7): " THEME_CHOICE
|
local themes=(
|
||||||
|
"🌃 Tokyo Night - Dark theme with vibrant colors"
|
||||||
|
"🎀 Catppuccin - Pastel theme with modern aesthetics"
|
||||||
|
"🟤 Gruvbox - Retro theme with warm colors"
|
||||||
|
"❄️ Nord - Arctic theme with cool colors"
|
||||||
|
"🌲 Everforest - Green forest theme"
|
||||||
|
"🌹 Rose Pine - Cozy theme with muted colors"
|
||||||
|
"🌊 Kanagawa - Japanese-inspired theme"
|
||||||
|
"☀️ Catppuccin Latte - Light variant"
|
||||||
|
"⚫ Matte Black - Minimalist dark theme"
|
||||||
|
"💎 Osaka Jade - Jade green theme"
|
||||||
|
"☕ Ristretto - Coffee-inspired theme"
|
||||||
|
)
|
||||||
|
|
||||||
case $THEME_CHOICE in
|
for i in "${!themes[@]}"; do
|
||||||
2) THEME="catppuccin" ;;
|
local num=$((i + 1))
|
||||||
3) THEME="gruvbox" ;;
|
center_text "${BOLD}${CYAN}$num.${RESET}${FG} ${themes[$i]}"
|
||||||
4) THEME="nord" ;;
|
done
|
||||||
5) THEME="everforest" ;;
|
|
||||||
6) THEME="rose-pine" ;;
|
|
||||||
7) THEME="kanagawa" ;;
|
|
||||||
*) THEME="tokyo-night" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo -e "${BLUE}Setting theme to: $THEME${NC}"
|
echo
|
||||||
sudo sed -i "s/currentTheme = \".*\"/currentTheme = \"$THEME\"/" /etc/nixos/configuration.nix
|
local theme_choice
|
||||||
|
theme_choice=$(get_input "Select theme (1-11)" "1" '[[ $1 =~ ^[1-9]$|^1[01]$ ]]')
|
||||||
|
|
||||||
echo -e "${GREEN}✓ Theme configured${NC}"
|
local theme_names=("tokyo-night" "catppuccin" "gruvbox" "nord" "everforest" "rose-pine" "kanagawa" "catppuccin-latte" "matte-black" "osaka-jade" "ristretto")
|
||||||
|
local selected_theme=${theme_names[$((theme_choice - 1))]}
|
||||||
|
|
||||||
|
echo
|
||||||
|
center_text "${FG}Selected theme: ${CYAN}${BOLD}$selected_theme${RESET}"
|
||||||
|
|
||||||
|
(sudo sed -i "s/currentTheme = \".*\"/currentTheme = \"$selected_theme\"/" /etc/nixos/configuration.nix && sleep 0.5) &
|
||||||
|
loading_spinner $! "Applying theme configuration"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Enable features
|
# Feature configuration with checkboxes
|
||||||
configure_features() {
|
configure_features() {
|
||||||
echo -e "${BLUE}🚀 Configure features:${NC}"
|
section_header "Feature Configuration" "⚙️ "
|
||||||
|
|
||||||
read -p "Enable Docker support? (y/n): " -n 1 -r
|
center_text "${FG}Configure optional features:${RESET}"
|
||||||
echo
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
||||||
sudo sed -i 's/docker = false/docker = true/' /etc/nixos/configuration.nix
|
# Security features
|
||||||
|
center_text "${BOLD}${PURPLE}Security Features:${RESET}"
|
||||||
|
printf "%*s" $(( (TERM_WIDTH - 40) / 2 )) ""
|
||||||
|
printf "${CYAN}Enable fingerprint authentication? (y/N): ${RESET}"
|
||||||
|
read -n 1 -r reply
|
||||||
|
echo
|
||||||
|
if [[ $reply =~ ^[Yy]$ ]]; then
|
||||||
|
center_text "${GREEN}✅ Fingerprint authentication enabled${RESET}"
|
||||||
|
sudo sed -i 's/enable = false;/enable = true;/' /etc/nixos/configuration.nix
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "Enable gaming support (Steam, Wine)? (y/n): " -n 1 -r
|
printf "%*s" $(( (TERM_WIDTH - 35) / 2 )) ""
|
||||||
|
printf "${CYAN}Enable FIDO2 security keys? (y/N): ${RESET}"
|
||||||
|
read -n 1 -r reply
|
||||||
echo
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $reply =~ ^[Yy]$ ]]; then
|
||||||
sudo sed -i 's/gaming = false/gaming = true/' /etc/nixos/configuration.nix
|
center_text "${GREEN}✅ FIDO2 authentication enabled${RESET}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}✓ Features configured${NC}"
|
echo
|
||||||
|
center_text "${BOLD}${BLUE}Development Features:${RESET}"
|
||||||
|
printf "%*s" $(( (TERM_WIDTH - 30) / 2 )) ""
|
||||||
|
printf "${CYAN}Enable Docker support? (y/N): ${RESET}"
|
||||||
|
read -n 1 -r reply
|
||||||
|
echo
|
||||||
|
if [[ $reply =~ ^[Yy]$ ]]; then
|
||||||
|
center_text "${GREEN}✅ Docker support enabled${RESET}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
center_text "${BOLD}${YELLOW}Gaming Features:${RESET}"
|
||||||
|
printf "%*s" $(( (TERM_WIDTH - 40) / 2 )) ""
|
||||||
|
printf "${CYAN}Enable gaming support (Steam, Wine)? (y/N): ${RESET}"
|
||||||
|
read -n 1 -r reply
|
||||||
|
echo
|
||||||
|
if [[ $reply =~ ^[Yy]$ ]]; then
|
||||||
|
center_text "${GREEN}✅ Gaming support enabled${RESET}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generate hardware configuration if needed
|
# Hardware configuration generation
|
||||||
generate_hardware_config() {
|
generate_hardware_config() {
|
||||||
|
section_header "Hardware Configuration" "🔧"
|
||||||
|
|
||||||
if [ ! -f /etc/nixos/hardware-configuration.nix ]; then
|
if [ ! -f /etc/nixos/hardware-configuration.nix ]; then
|
||||||
echo -e "${BLUE}🔧 Generating hardware configuration...${NC}"
|
center_text "${FG}Generating hardware-specific configuration...${RESET}"
|
||||||
sudo nixos-generate-config --root /
|
echo
|
||||||
echo -e "${GREEN}✓ Hardware configuration generated${NC}"
|
|
||||||
|
(sudo nixos-generate-config --root / && sleep 1) &
|
||||||
|
loading_spinner $! "Scanning hardware configuration"
|
||||||
else
|
else
|
||||||
echo -e "${YELLOW}Hardware configuration already exists, skipping...${NC}"
|
center_text "${YELLOW}⚠️ Hardware configuration already exists${RESET}"
|
||||||
|
center_text "${DIM}${FG}Skipping hardware generation...${RESET}"
|
||||||
|
sleep 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialize git repository
|
# System building with enhanced progress
|
||||||
# init_git() {
|
|
||||||
# echo -e "${BLUE}📚 Initializing git repository...${NC}"
|
|
||||||
#
|
|
||||||
# cd /etc/nixos
|
|
||||||
#
|
|
||||||
# if [ ! -d .git ]; then
|
|
||||||
# sudo git init
|
|
||||||
# sudo git add .
|
|
||||||
# sudo git commit -m "Initial Omarchy configuration"
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# echo -e "${GREEN}✓ Git repository initialized${NC}"
|
|
||||||
# }
|
|
||||||
|
|
||||||
# Build and switch to new configuration
|
|
||||||
build_system() {
|
build_system() {
|
||||||
echo -e "${BLUE}🏗️ Building system configuration...${NC}"
|
section_header "System Build" "🏗️ "
|
||||||
echo "This may take a while on first run..."
|
|
||||||
|
|
||||||
# Build the system
|
center_text "${YELLOW}${BOLD}⚠️ IMPORTANT NOTICE ⚠️${RESET}"
|
||||||
sudo nixos-rebuild switch --flake /etc/nixos#omnixy
|
center_text "${FG}This process may take 10-45 minutes depending on your system${RESET}"
|
||||||
|
center_text "${FG}A stable internet connection is required${RESET}"
|
||||||
|
echo
|
||||||
|
|
||||||
echo -e "${GREEN}✓ System built successfully!${NC}"
|
printf "%*s" $(( (TERM_WIDTH - 30) / 2 )) ""
|
||||||
|
printf "${CYAN}Continue with system build? (Y/n): ${RESET}"
|
||||||
|
read -n 1 -r reply
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [[ $reply =~ ^[Nn]$ ]]; then
|
||||||
|
center_text "${YELLOW}Build postponed. Run this command later:${RESET}"
|
||||||
|
center_text "${CYAN}sudo nixos-rebuild switch --flake /etc/nixos#omnixy${RESET}"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
center_text "${FG}Building NixOS system configuration...${RESET}"
|
||||||
|
center_text "${DIM}${FG}This includes downloading packages and compiling the system${RESET}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Start build in background and show spinner
|
||||||
|
sudo nixos-rebuild switch --flake /etc/nixos#omnixy &
|
||||||
|
local build_pid=$!
|
||||||
|
|
||||||
|
# Enhanced progress indication
|
||||||
|
local dots=""
|
||||||
|
local build_messages=(
|
||||||
|
"Downloading Nix packages..."
|
||||||
|
"Building system dependencies..."
|
||||||
|
"Compiling configuration..."
|
||||||
|
"Setting up services..."
|
||||||
|
"Finalizing installation..."
|
||||||
|
)
|
||||||
|
|
||||||
|
local msg_index=0
|
||||||
|
local counter=0
|
||||||
|
|
||||||
|
while kill -0 $build_pid 2>/dev/null; do
|
||||||
|
if (( counter % 30 == 0 && msg_index < ${#build_messages[@]} )); then
|
||||||
|
echo
|
||||||
|
center_text "${CYAN}${build_messages[$msg_index]}${RESET}"
|
||||||
|
((msg_index++))
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\r%*s${CYAN}Building system" $(( (TERM_WIDTH - 20) / 2 )) ""
|
||||||
|
dots+="."
|
||||||
|
if [ ${#dots} -gt 6 ]; then dots=""; fi
|
||||||
|
printf "%s${RESET}" "$dots"
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
((counter++))
|
||||||
|
done
|
||||||
|
|
||||||
|
wait $build_pid
|
||||||
|
local exit_code=$?
|
||||||
|
|
||||||
|
echo
|
||||||
|
if [ $exit_code -eq 0 ]; then
|
||||||
|
center_text "${GREEN}${BOLD}✅ System build completed successfully!${RESET}"
|
||||||
|
else
|
||||||
|
center_text "${RED}${BOLD}❌ Build failed with errors${RESET}"
|
||||||
|
center_text "${FG}Check the output above for details${RESET}"
|
||||||
|
exit $exit_code
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Post-installation message
|
# Completion screen with comprehensive information
|
||||||
show_complete() {
|
show_complete() {
|
||||||
|
clear
|
||||||
|
setup_terminal
|
||||||
|
|
||||||
|
# Add spacing
|
||||||
|
for ((i=0; i<2; i++)); do echo; done
|
||||||
|
|
||||||
|
# Success banner
|
||||||
|
printf "%*s${GREEN}${BOLD}" $(( (TERM_WIDTH - 60) / 2 )) ""
|
||||||
|
echo "╭──────────────────────────────────────────────────────────╮"
|
||||||
|
printf "%*s${GREEN}│" $(( (TERM_WIDTH - 60) / 2 )) ""
|
||||||
|
printf "%*s🎉 OmniXY Installation Complete! 🎉%*s│\n" 14 "" 14 ""
|
||||||
|
printf "%*s${GREEN}╰──────────────────────────────────────────────────────────╯${RESET}\n" $(( (TERM_WIDTH - 60) / 2 )) ""
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo -e "${GREEN}╭──────────────────────────────────────────╮${NC}"
|
|
||||||
echo -e "${GREEN}│ 🎉 Omarchy Installation Complete! │${NC}"
|
|
||||||
echo -e "${GREEN}╰──────────────────────────────────────────╯${NC}"
|
|
||||||
echo
|
echo
|
||||||
echo -e "${BLUE}Quick Start Guide:${NC}"
|
|
||||||
echo " • Run 'omnixy help' for available commands"
|
# Quick start section
|
||||||
echo " • Run 'omnixy-theme-list' to see available themes"
|
section_header "Quick Start Guide" "🚀"
|
||||||
echo " • Run 'omnixy update' to update your system"
|
|
||||||
|
center_text "${CYAN}${BOLD}Essential Commands:${RESET}"
|
||||||
|
center_text "${FG}${DIM}Run these commands to get started${RESET}"
|
||||||
echo
|
echo
|
||||||
echo -e "${BLUE}Key Bindings (Hyprland):${NC}"
|
center_text "${CYAN}omnixy-menu${RESET} ${FG}- Interactive system menu${RESET}"
|
||||||
echo " • Super + Return: Open terminal"
|
center_text "${CYAN}omnixy-info${RESET} ${FG}- System information display${RESET}"
|
||||||
echo " • Super + B: Open browser"
|
center_text "${CYAN}omnixy-theme${RESET} ${FG}- Switch between themes${RESET}"
|
||||||
echo " • Super + D: Application launcher"
|
center_text "${CYAN}omnixy-security${RESET} ${FG}- Configure security features${RESET}"
|
||||||
echo " • Super + Q: Close window"
|
|
||||||
echo
|
echo
|
||||||
echo -e "${YELLOW}Note: You may need to reboot for all changes to take effect.${NC}"
|
section_header "Keyboard Shortcuts" "⌨️ "
|
||||||
|
|
||||||
|
center_text "${PURPLE}${BOLD}Hyprland Window Manager:${RESET}"
|
||||||
echo
|
echo
|
||||||
echo "For more information, visit: https://github.com/TheArctesian/omnixy"
|
center_text "${CYAN}Super + Return${RESET} ${FG}- Open terminal${RESET}"
|
||||||
|
center_text "${CYAN}Super + R${RESET} ${FG}- Application launcher${RESET}"
|
||||||
|
center_text "${CYAN}Super + B${RESET} ${FG}- Web browser${RESET}"
|
||||||
|
center_text "${CYAN}Super + E${RESET} ${FG}- File manager${RESET}"
|
||||||
|
center_text "${CYAN}Super + Q${RESET} ${FG}- Close window${RESET}"
|
||||||
|
center_text "${CYAN}Super + F${RESET} ${FG}- Fullscreen toggle${RESET}"
|
||||||
|
center_text "${CYAN}Super + 1-0${RESET} ${FG}- Switch workspaces${RESET}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
section_header "Next Steps" "📋"
|
||||||
|
|
||||||
|
center_text "${YELLOW}${BOLD}Recommended Actions:${RESET}"
|
||||||
|
echo
|
||||||
|
center_text "${FG}1. ${CYAN}Reboot your system${RESET} ${FG}- Apply all changes${RESET}"
|
||||||
|
center_text "${FG}2. ${CYAN}Run omnixy-security status${RESET} ${FG}- Check security setup${RESET}"
|
||||||
|
center_text "${FG}3. ${CYAN}Configure fingerprint/FIDO2${RESET} ${FG}- Enhanced security${RESET}"
|
||||||
|
center_text "${FG}4. ${CYAN}Explore themes${RESET} ${FG}- Try different color schemes${RESET}"
|
||||||
|
center_text "${FG}5. ${CYAN}Join the community${RESET} ${FG}- Get help and share feedback${RESET}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
section_header "Resources" "🔗"
|
||||||
|
|
||||||
|
center_text "${BLUE}${UNDERLINE}https://github.com/TheArctesian/omnixy${RESET} ${FG}- Project homepage${RESET}"
|
||||||
|
center_text "${BLUE}${UNDERLINE}https://nixos.org/manual${RESET} ${FG}- NixOS documentation${RESET}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
center_text "${DIM}${FG}Thank you for choosing OmniXY! ${CYAN}❤️${RESET}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Auto-reboot prompt
|
||||||
|
printf "%*s${YELLOW}Reboot now to complete installation? (Y/n): ${RESET}" $(( (TERM_WIDTH - 45) / 2 )) ""
|
||||||
|
read -n 1 -r reply
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [[ ! $reply =~ ^[Nn]$ ]]; then
|
||||||
|
center_text "${GREEN}Rebooting in 3 seconds...${RESET}"
|
||||||
|
sleep 1
|
||||||
|
center_text "${GREEN}Rebooting in 2 seconds...${RESET}"
|
||||||
|
sleep 1
|
||||||
|
center_text "${GREEN}Rebooting in 1 second...${RESET}"
|
||||||
|
sleep 1
|
||||||
|
sudo reboot
|
||||||
|
else
|
||||||
|
center_text "${FG}Remember to reboot when convenient!${RESET}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Main installation flow
|
# Main installation orchestrator
|
||||||
main() {
|
main() {
|
||||||
|
# Trap to restore terminal on exit
|
||||||
|
trap 'printf "\033[0m\033[?25h"; stty sane' EXIT
|
||||||
|
|
||||||
|
# Hide cursor during installation
|
||||||
|
printf '\033[?25l'
|
||||||
|
|
||||||
show_banner
|
show_banner
|
||||||
|
sleep 2
|
||||||
|
|
||||||
echo -e "${BLUE}Welcome to Omarchy NixOS Installer!${NC}"
|
section_header "Welcome to OmniXY" "🌟"
|
||||||
echo "This will install Omarchy configuration on your NixOS system."
|
center_text "${FG}Transform your NixOS into a beautiful, modern desktop experience${RESET}"
|
||||||
|
center_text "${DIM}${FG}This installer will guide you through the complete setup process${RESET}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
check_nixos
|
printf "%*s${CYAN}${BOLD}Ready to begin installation? (Y/n): ${RESET}" $(( (TERM_WIDTH - 35) / 2 )) ""
|
||||||
check_permissions
|
read -n 1 -r reply
|
||||||
|
|
||||||
read -p "Continue with installation? (y/n) " -n 1 -r
|
|
||||||
echo
|
echo
|
||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
||||||
echo "Installation cancelled."
|
if [[ $reply =~ ^[Nn]$ ]]; then
|
||||||
|
center_text "${FG}Installation cancelled. Come back anytime!${RESET}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Installation flow with enhanced UX
|
||||||
|
check_nixos
|
||||||
backup_config
|
backup_config
|
||||||
install_config
|
install_config
|
||||||
generate_hardware_config
|
generate_hardware_config
|
||||||
update_user
|
update_user
|
||||||
select_theme
|
select_theme
|
||||||
configure_features
|
configure_features
|
||||||
# init_git
|
build_system
|
||||||
|
show_complete
|
||||||
|
|
||||||
echo
|
# Restore cursor
|
||||||
echo -e "${YELLOW}Ready to build the system. This may take 10-30 minutes.${NC}"
|
printf '\033[?25h'
|
||||||
read -p "Continue? (y/n) " -n 1 -r
|
|
||||||
echo
|
|
||||||
|
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
||||||
build_system
|
|
||||||
show_complete
|
|
||||||
else
|
|
||||||
echo -e "${YELLOW}Installation paused. To complete, run:${NC}"
|
|
||||||
echo " sudo nixos-rebuild switch --flake /etc/nixos#omnixy"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run main function
|
# Start the installation
|
||||||
main "$@"
|
main "$@"
|
||||||
269
modules/boot.nix
Normal file
@@ -0,0 +1,269 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# OmniXY Boot Configuration
|
||||||
|
# Plymouth theming and seamless boot experience
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Import our custom Plymouth theme package
|
||||||
|
plymouth-themes = pkgs.callPackage ../packages/plymouth-theme.nix {};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) {
|
||||||
|
# Plymouth boot splash configuration
|
||||||
|
boot.plymouth = {
|
||||||
|
enable = true;
|
||||||
|
theme = "omnixy-${cfg.theme}";
|
||||||
|
themePackages = [ plymouth-themes ];
|
||||||
|
|
||||||
|
# Logo configuration
|
||||||
|
logo = "${plymouth-themes}/share/plymouth/themes/omnixy-${cfg.theme}/logo.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Boot optimization and theming
|
||||||
|
boot = {
|
||||||
|
# Kernel parameters for smooth boot
|
||||||
|
kernelParams = [
|
||||||
|
# Quiet boot (suppress most messages)
|
||||||
|
"quiet"
|
||||||
|
# Splash screen
|
||||||
|
"splash"
|
||||||
|
# Reduce log level
|
||||||
|
"loglevel=3"
|
||||||
|
# Disable systemd status messages on console
|
||||||
|
"rd.systemd.show_status=false"
|
||||||
|
"rd.udev.log_level=3"
|
||||||
|
"udev.log_priority=3"
|
||||||
|
# Faster boot
|
||||||
|
"boot.shell_on_fail"
|
||||||
|
# Hide cursor
|
||||||
|
"vt.global_cursor_default=0"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Console configuration for seamless experience
|
||||||
|
consoleLogLevel = 0;
|
||||||
|
|
||||||
|
# Boot loader configuration
|
||||||
|
loader = {
|
||||||
|
# Timeout for boot menu
|
||||||
|
timeout = 3;
|
||||||
|
|
||||||
|
# systemd-boot theme integration
|
||||||
|
systemd-boot = {
|
||||||
|
editor = false; # Disable editor for security
|
||||||
|
configurationLimit = 10;
|
||||||
|
consoleMode = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Initial ramdisk optimization
|
||||||
|
initrd = {
|
||||||
|
systemd.enable = true;
|
||||||
|
verbose = false;
|
||||||
|
|
||||||
|
# Include Plymouth in initrd
|
||||||
|
includeDefaultModules = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Systemd service for seamless login transition
|
||||||
|
systemd.services.omnixy-boot-transition = {
|
||||||
|
description = "OmniXY Boot Transition Service";
|
||||||
|
after = [ "plymouth-start.service" "display-manager.service" ];
|
||||||
|
before = [ "plymouth-quit.service" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
ExecStart = "${pkgs.plymouth}/bin/plymouth message --text='Welcome to OmniXY'";
|
||||||
|
ExecStop = "${pkgs.plymouth}/bin/plymouth quit --retain-splash";
|
||||||
|
TimeoutStartSec = "10s";
|
||||||
|
};
|
||||||
|
|
||||||
|
script = ''
|
||||||
|
# Ensure smooth transition from Plymouth to display manager
|
||||||
|
${pkgs.coreutils}/bin/sleep 1
|
||||||
|
|
||||||
|
# Send welcome message
|
||||||
|
${pkgs.plymouth}/bin/plymouth message --text="Loading OmniXY ${cfg.theme} theme..."
|
||||||
|
${pkgs.coreutils}/bin/sleep 2
|
||||||
|
|
||||||
|
# Signal that boot is complete
|
||||||
|
${pkgs.plymouth}/bin/plymouth message --text="System Ready"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Theme switching integration
|
||||||
|
environment.systemPackages = [
|
||||||
|
plymouth-themes
|
||||||
|
|
||||||
|
# Plymouth theme switching script
|
||||||
|
(omnixy.makeScript "omnixy-plymouth-theme" "Switch Plymouth boot theme" ''
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "🎨 Current Plymouth theme: omnixy-${cfg.theme}"
|
||||||
|
echo
|
||||||
|
echo "Available themes:"
|
||||||
|
ls ${plymouth-themes}/share/plymouth/themes/ | grep "omnixy-" | sed 's/omnixy-/ - /'
|
||||||
|
echo
|
||||||
|
echo "Usage: omnixy-plymouth-theme <theme-name>"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
THEME="omnixy-$1"
|
||||||
|
THEME_PATH="${plymouth-themes}/share/plymouth/themes/$THEME"
|
||||||
|
|
||||||
|
if [ ! -d "$THEME_PATH" ]; then
|
||||||
|
echo "❌ Theme '$1' not found!"
|
||||||
|
echo "Available themes:"
|
||||||
|
ls ${plymouth-themes}/share/plymouth/themes/ | grep "omnixy-" | sed 's/omnixy-/ - /'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🎨 Setting Plymouth theme to: $1"
|
||||||
|
|
||||||
|
# Update Plymouth theme
|
||||||
|
sudo ${pkgs.plymouth}/bin/plymouth-set-default-theme "$THEME"
|
||||||
|
|
||||||
|
# Regenerate initrd
|
||||||
|
echo "🔄 Regenerating initrd..."
|
||||||
|
sudo nixos-rebuild boot --flake /etc/nixos#omnixy
|
||||||
|
|
||||||
|
echo "✅ Plymouth theme updated!"
|
||||||
|
echo "⚠️ Reboot to see the new boot theme"
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Plymouth management utilities
|
||||||
|
(omnixy.makeScript "omnixy-boot-preview" "Preview Plymouth theme" ''
|
||||||
|
if [ "$EUID" -ne 0 ]; then
|
||||||
|
echo "❌ This command must be run as root (use sudo)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🎬 Starting Plymouth preview..."
|
||||||
|
echo " Press Ctrl+Alt+F1 to return to console"
|
||||||
|
echo " Press Ctrl+C to stop preview"
|
||||||
|
|
||||||
|
# Kill any running Plymouth instances
|
||||||
|
pkill plymouthd 2>/dev/null || true
|
||||||
|
|
||||||
|
# Start Plymouth in preview mode
|
||||||
|
${pkgs.plymouth}/bin/plymouthd --debug --debug-file=/tmp/plymouth-debug.log
|
||||||
|
${pkgs.plymouth}/bin/plymouth --show-splash
|
||||||
|
|
||||||
|
# Simulate boot progress
|
||||||
|
for i in $(seq 0 5 100); do
|
||||||
|
${pkgs.plymouth}/bin/plymouth --update="boot-progress:$i/100"
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Plymouth preview running. Check another TTY to see the splash screen."
|
||||||
|
echo "Press Enter to stop..."
|
||||||
|
read -r
|
||||||
|
|
||||||
|
${pkgs.plymouth}/bin/plymouth --quit
|
||||||
|
pkill plymouthd 2>/dev/null || true
|
||||||
|
|
||||||
|
echo "✅ Plymouth preview stopped"
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Boot diagnostics
|
||||||
|
(omnixy.makeScript "omnixy-boot-info" "Show boot information and diagnostics" ''
|
||||||
|
echo "🚀 OmniXY Boot Information"
|
||||||
|
echo "═══════════════════════════"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "🎨 Plymouth Configuration:"
|
||||||
|
echo " Current Theme: ${cfg.theme}"
|
||||||
|
echo " Theme Package: ${plymouth-themes}"
|
||||||
|
echo " Plymouth Status: $(systemctl is-active plymouth-start.service 2>/dev/null || echo 'inactive')"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "⚙️ Boot Configuration:"
|
||||||
|
echo " Boot Loader: $(bootctl status 2>/dev/null | grep 'systemd-boot' || echo 'systemd-boot')"
|
||||||
|
echo " Kernel: $(uname -r)"
|
||||||
|
echo " Boot Time: $(systemd-analyze | head -1)"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "📊 Boot Performance:"
|
||||||
|
systemd-analyze blame | head -10
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "🔧 Boot Services:"
|
||||||
|
echo " Display Manager: $(systemctl is-active display-manager 2>/dev/null || echo 'inactive')"
|
||||||
|
echo " Plymouth: $(systemctl is-active plymouth-*.service 2>/dev/null || echo 'inactive')"
|
||||||
|
echo " OmniXY Transition: $(systemctl is-active omnixy-boot-transition 2>/dev/null || echo 'inactive')"
|
||||||
|
|
||||||
|
if [ -f "/tmp/plymouth-debug.log" ]; then
|
||||||
|
echo
|
||||||
|
echo "🐛 Plymouth Debug Log (last 10 lines):"
|
||||||
|
tail -10 /tmp/plymouth-debug.log
|
||||||
|
fi
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
# Ensure Plymouth themes are properly installed
|
||||||
|
system.activationScripts.plymouthThemes = ''
|
||||||
|
# Ensure Plymouth theme directory exists
|
||||||
|
mkdir -p /run/current-system/sw/share/plymouth/themes
|
||||||
|
|
||||||
|
# Set default theme on first boot
|
||||||
|
if [ ! -f /var/lib/plymouth/theme ]; then
|
||||||
|
mkdir -p /var/lib/plymouth
|
||||||
|
echo "omnixy-${cfg.theme}" > /var/lib/plymouth/theme
|
||||||
|
|
||||||
|
# Set the theme
|
||||||
|
${pkgs.plymouth}/bin/plymouth-set-default-theme "omnixy-${cfg.theme}" || true
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Font configuration for Plymouth
|
||||||
|
fonts = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
jetbrains-mono
|
||||||
|
cantarell-fonts
|
||||||
|
liberation_ttf
|
||||||
|
dejavu_fonts
|
||||||
|
];
|
||||||
|
|
||||||
|
# Ensure fonts are available early in boot
|
||||||
|
fontDir.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Security: Disable debug shell during boot (can be enabled for troubleshooting)
|
||||||
|
boot.kernelParams = mkDefault [
|
||||||
|
# Disable emergency shell access
|
||||||
|
"systemd.debug-shell=0"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Optional: LUKS integration for encrypted systems
|
||||||
|
boot.initrd.luks.devices = mkIf (config.boot.initrd.luks.devices != {}) {
|
||||||
|
# Plymouth will automatically handle LUKS password prompts
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console and TTY configuration
|
||||||
|
console = {
|
||||||
|
earlySetup = true;
|
||||||
|
colors = [
|
||||||
|
# Custom console color palette matching current theme
|
||||||
|
# This will be used before Plymouth starts
|
||||||
|
] ++ (
|
||||||
|
if cfg.theme == "tokyo-night" then [
|
||||||
|
"1a1b26" "f7768e" "9ece6a" "e0af68"
|
||||||
|
"7aa2f7" "bb9af7" "7dcfff" "c0caf5"
|
||||||
|
"414868" "f7768e" "9ece6a" "e0af68"
|
||||||
|
"7aa2f7" "bb9af7" "7dcfff" "a9b1d6"
|
||||||
|
] else if cfg.theme == "gruvbox" then [
|
||||||
|
"282828" "cc241d" "98971a" "d79921"
|
||||||
|
"458588" "b16286" "689d6a" "a89984"
|
||||||
|
"928374" "fb4934" "b8bb26" "fabd2f"
|
||||||
|
"83a598" "d3869b" "8ec07c" "ebdbb2"
|
||||||
|
] else []
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -310,7 +310,7 @@ in
|
|||||||
omnixy-theme() {
|
omnixy-theme() {
|
||||||
local theme=$1
|
local theme=$1
|
||||||
if [ -z "$theme" ]; then
|
if [ -z "$theme" ]; then
|
||||||
echo "Available themes: tokyo-night, catppuccin, gruvbox, nord, everforest, rose-pine, kanagawa"
|
echo "Available themes: tokyo-night, catppuccin, catppuccin-latte, gruvbox, nord, everforest, rose-pine, kanagawa, matte-black, osaka-jade, ristretto"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ let
|
|||||||
cfg = config.omnixy.desktop;
|
cfg = config.omnixy.desktop;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./hyprland/autostart.nix
|
||||||
|
./hyprland/bindings.nix
|
||||||
|
./hyprland/idle.nix
|
||||||
|
];
|
||||||
options.omnixy.desktop = {
|
options.omnixy.desktop = {
|
||||||
enable = mkEnableOption "OmniXY Hyprland desktop environment";
|
enable = mkEnableOption "OmniXY Hyprland desktop environment";
|
||||||
|
|
||||||
@@ -33,6 +38,12 @@ in
|
|||||||
default = null;
|
default = null;
|
||||||
description = "Path to wallpaper image (optional)";
|
description = "Path to wallpaper image (optional)";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
idleSuspend = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable system suspend after idle timeout";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.enable or true) {
|
config = mkIf (cfg.enable or true) {
|
||||||
@@ -184,14 +195,18 @@ in
|
|||||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Include modular configuration files
|
||||||
|
source = /etc/omnixy/hyprland/theme.conf
|
||||||
|
source = /etc/omnixy/hyprland/autostart.conf
|
||||||
|
source = /etc/omnixy/hyprland/bindings.conf
|
||||||
|
source = /etc/omnixy/hyprland/hypridle.conf
|
||||||
|
|
||||||
# General configuration
|
# General configuration
|
||||||
general {
|
general {
|
||||||
gaps_in = 5
|
gaps_in = 5
|
||||||
gaps_out = 10
|
gaps_out = 10
|
||||||
border_size = 2
|
border_size = 2
|
||||||
col.active_border = rgba(7aa2f7ee) rgba(c4a7e7ee) 45deg
|
# Colors are defined in theme.conf
|
||||||
col.inactive_border = rgba(595959aa)
|
|
||||||
|
|
||||||
layout = dwindle
|
layout = dwindle
|
||||||
allow_tearing = false
|
allow_tearing = false
|
||||||
}
|
}
|
||||||
@@ -211,7 +226,7 @@ in
|
|||||||
drop_shadow = true
|
drop_shadow = true
|
||||||
shadow_range = 20
|
shadow_range = 20
|
||||||
shadow_render_power = 3
|
shadow_render_power = 3
|
||||||
col.shadow = rgba(1a1a1aee)
|
# Shadow color is defined in theme.conf
|
||||||
|
|
||||||
dim_inactive = false
|
dim_inactive = false
|
||||||
dim_strength = 0.1
|
dim_strength = 0.1
|
||||||
@@ -294,8 +309,8 @@ in
|
|||||||
bind = $mainMod, Return, exec, ${cfg.defaultTerminal}
|
bind = $mainMod, Return, exec, ${cfg.defaultTerminal}
|
||||||
bind = $mainMod, B, exec, ${cfg.defaultBrowser}
|
bind = $mainMod, B, exec, ${cfg.defaultBrowser}
|
||||||
bind = $mainMod, E, exec, nautilus
|
bind = $mainMod, E, exec, nautilus
|
||||||
|
bind = $mainMod, R, exec, walker
|
||||||
bind = $mainMod, D, exec, walker
|
bind = $mainMod, D, exec, walker
|
||||||
bind = $mainMod SHIFT, D, exec, wofi --show drun
|
|
||||||
bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
||||||
|
|
||||||
# Window management
|
# Window management
|
||||||
@@ -349,7 +364,7 @@ in
|
|||||||
bind = $mainMod, mouse_up, workspace, e-1
|
bind = $mainMod, mouse_up, workspace, e-1
|
||||||
|
|
||||||
# Resize mode
|
# Resize mode
|
||||||
bind = $mainMod, R, submap, resize
|
bind = $mainMod ALT, R, submap, resize
|
||||||
submap = resize
|
submap = resize
|
||||||
binde = , h, resizeactive, -10 0
|
binde = , h, resizeactive, -10 0
|
||||||
binde = , l, resizeactive, 10 0
|
binde = , l, resizeactive, 10 0
|
||||||
|
|||||||
73
modules/desktop/hyprland/autostart.nix
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Hyprland autostart configuration for OmniXY
|
||||||
|
# Handles application startup and initialization
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy.desktop;
|
||||||
|
omnixy = import ../../helpers.nix { inherit config pkgs lib; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) {
|
||||||
|
# Create autostart configuration
|
||||||
|
environment.etc."omnixy/hyprland/autostart.conf".text = ''
|
||||||
|
# OmniXY Autostart Configuration
|
||||||
|
# Applications and services to start with Hyprland
|
||||||
|
|
||||||
|
# Essential services
|
||||||
|
exec-once = waybar
|
||||||
|
exec-once = mako
|
||||||
|
exec-once = swww init
|
||||||
|
exec-once = nm-applet --indicator
|
||||||
|
exec-once = blueman-applet
|
||||||
|
|
||||||
|
# Wallpaper setup
|
||||||
|
${optionalString (cfg.wallpaper != null) ''exec = swww img ${toString cfg.wallpaper} --transition-type wipe''}
|
||||||
|
|
||||||
|
# Clipboard management
|
||||||
|
exec-once = wl-paste --type text --watch cliphist store
|
||||||
|
exec-once = wl-paste --type image --watch cliphist store
|
||||||
|
|
||||||
|
# Authentication agent
|
||||||
|
exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1
|
||||||
|
|
||||||
|
# Audio setup
|
||||||
|
${optionalString (omnixy.isEnabled "media") ''
|
||||||
|
exec-once = easyeffects --gapplication-service
|
||||||
|
''}
|
||||||
|
|
||||||
|
# Gaming-specific autostart
|
||||||
|
${optionalString (omnixy.isEnabled "gaming") ''
|
||||||
|
exec-once = mangohud
|
||||||
|
exec-once = gamemode
|
||||||
|
''}
|
||||||
|
|
||||||
|
# Development-specific autostart
|
||||||
|
${optionalString (omnixy.isEnabled "coding") ''
|
||||||
|
exec-once = ${pkgs.vscode}/bin/code --no-sandbox
|
||||||
|
''}
|
||||||
|
|
||||||
|
# Communication apps
|
||||||
|
${optionalString (omnixy.isEnabled "communication") ''
|
||||||
|
exec-once = discord --start-minimized
|
||||||
|
exec-once = slack --start-minimized
|
||||||
|
''}
|
||||||
|
|
||||||
|
# System monitoring (optional)
|
||||||
|
${optionalString (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") ''
|
||||||
|
exec-once = ${pkgs.btop}/bin/btop --utf-force
|
||||||
|
''}
|
||||||
|
|
||||||
|
# Screenshots directory
|
||||||
|
exec-once = mkdir -p ~/Pictures/Screenshots
|
||||||
|
|
||||||
|
# Idle management
|
||||||
|
exec-once = hypridle
|
||||||
|
|
||||||
|
# OSD for volume/brightness
|
||||||
|
exec-once = swayosd-server
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
184
modules/desktop/hyprland/bindings.nix
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Hyprland keybindings configuration for OmniXY
|
||||||
|
# Comprehensive keyboard shortcuts for productivity
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy.desktop;
|
||||||
|
omnixy = import ../../helpers.nix { inherit config pkgs lib; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) {
|
||||||
|
# Create keybindings configuration
|
||||||
|
environment.etc."omnixy/hyprland/bindings.conf".text = ''
|
||||||
|
# OmniXY Hyprland Keybindings
|
||||||
|
# Comprehensive keyboard shortcuts
|
||||||
|
|
||||||
|
# Variables for commonly used applications
|
||||||
|
$terminal = ${cfg.defaultTerminal or "ghostty"}
|
||||||
|
$browser = ${cfg.defaultBrowser or "firefox"}
|
||||||
|
$filemanager = thunar
|
||||||
|
$menu = walker
|
||||||
|
|
||||||
|
# Modifier keys
|
||||||
|
$mainMod = SUPER
|
||||||
|
|
||||||
|
# Window management
|
||||||
|
bind = $mainMod, Q, killactive
|
||||||
|
bind = $mainMod, M, exit
|
||||||
|
bind = $mainMod, V, togglefloating
|
||||||
|
bind = $mainMod, P, pseudo # dwindle
|
||||||
|
bind = $mainMod, J, togglesplit # dwindle
|
||||||
|
bind = $mainMod, F, fullscreen
|
||||||
|
|
||||||
|
# Application launches
|
||||||
|
bind = $mainMod, Return, exec, $terminal
|
||||||
|
bind = $mainMod, E, exec, $filemanager
|
||||||
|
bind = $mainMod, R, exec, $menu
|
||||||
|
bind = $mainMod, B, exec, $browser
|
||||||
|
|
||||||
|
# Development shortcuts
|
||||||
|
${optionalString (omnixy.isEnabled "coding") ''
|
||||||
|
bind = $mainMod, C, exec, code
|
||||||
|
bind = $mainMod SHIFT, C, exec, $terminal -e nvim
|
||||||
|
bind = $mainMod, G, exec, $terminal -e lazygit
|
||||||
|
bind = $mainMod SHIFT, G, exec, github-desktop
|
||||||
|
''}
|
||||||
|
|
||||||
|
# Communication shortcuts
|
||||||
|
${optionalString (omnixy.isEnabled "communication") ''
|
||||||
|
bind = $mainMod, D, exec, discord
|
||||||
|
bind = $mainMod SHIFT, D, exec, slack
|
||||||
|
bind = $mainMod, T, exec, telegram-desktop
|
||||||
|
''}
|
||||||
|
|
||||||
|
# Media shortcuts
|
||||||
|
${optionalString (omnixy.isEnabled "media") ''
|
||||||
|
bind = $mainMod, S, exec, spotify
|
||||||
|
bind = $mainMod SHIFT, S, exec, $terminal -e cmus
|
||||||
|
bind = $mainMod, I, exec, imv
|
||||||
|
bind = $mainMod SHIFT, I, exec, gimp
|
||||||
|
''}
|
||||||
|
|
||||||
|
# Move focus with mainMod + arrow keys
|
||||||
|
bind = $mainMod, left, movefocus, l
|
||||||
|
bind = $mainMod, right, movefocus, r
|
||||||
|
bind = $mainMod, up, movefocus, u
|
||||||
|
bind = $mainMod, down, movefocus, d
|
||||||
|
|
||||||
|
# Move focus with mainMod + vim keys
|
||||||
|
bind = $mainMod, h, movefocus, l
|
||||||
|
bind = $mainMod, l, movefocus, r
|
||||||
|
bind = $mainMod, k, movefocus, u
|
||||||
|
bind = $mainMod, j, movefocus, d
|
||||||
|
|
||||||
|
# Move windows with mainMod + SHIFT + arrow keys
|
||||||
|
bind = $mainMod SHIFT, left, movewindow, l
|
||||||
|
bind = $mainMod SHIFT, right, movewindow, r
|
||||||
|
bind = $mainMod SHIFT, up, movewindow, u
|
||||||
|
bind = $mainMod SHIFT, down, movewindow, d
|
||||||
|
|
||||||
|
# Move windows with mainMod + SHIFT + vim keys
|
||||||
|
bind = $mainMod SHIFT, h, movewindow, l
|
||||||
|
bind = $mainMod SHIFT, l, movewindow, r
|
||||||
|
bind = $mainMod SHIFT, k, movewindow, u
|
||||||
|
bind = $mainMod SHIFT, j, movewindow, d
|
||||||
|
|
||||||
|
# Switch workspaces with mainMod + [0-9]
|
||||||
|
bind = $mainMod, 1, workspace, 1
|
||||||
|
bind = $mainMod, 2, workspace, 2
|
||||||
|
bind = $mainMod, 3, workspace, 3
|
||||||
|
bind = $mainMod, 4, workspace, 4
|
||||||
|
bind = $mainMod, 5, workspace, 5
|
||||||
|
bind = $mainMod, 6, workspace, 6
|
||||||
|
bind = $mainMod, 7, workspace, 7
|
||||||
|
bind = $mainMod, 8, workspace, 8
|
||||||
|
bind = $mainMod, 9, workspace, 9
|
||||||
|
bind = $mainMod, 0, workspace, 10
|
||||||
|
|
||||||
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
|
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||||
|
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||||
|
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||||
|
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||||
|
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||||
|
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
|
# Scroll through existing workspaces with mainMod + scroll
|
||||||
|
bind = $mainMod, mouse_down, workspace, e+1
|
||||||
|
bind = $mainMod, mouse_up, workspace, e-1
|
||||||
|
|
||||||
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
|
# Resize windows
|
||||||
|
bind = $mainMod CTRL, left, resizeactive, -50 0
|
||||||
|
bind = $mainMod CTRL, right, resizeactive, 50 0
|
||||||
|
bind = $mainMod CTRL, up, resizeactive, 0 -50
|
||||||
|
bind = $mainMod CTRL, down, resizeactive, 0 50
|
||||||
|
|
||||||
|
# Resize windows with vim keys
|
||||||
|
bind = $mainMod CTRL, h, resizeactive, -50 0
|
||||||
|
bind = $mainMod CTRL, l, resizeactive, 50 0
|
||||||
|
bind = $mainMod CTRL, k, resizeactive, 0 -50
|
||||||
|
bind = $mainMod CTRL, j, resizeactive, 0 50
|
||||||
|
|
||||||
|
# Screenshots
|
||||||
|
bind = , Print, exec, grim -g "$(slurp)" ~/Pictures/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')
|
||||||
|
bind = SHIFT, Print, exec, grim ~/Pictures/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')
|
||||||
|
bind = $mainMod, Print, exec, grim -g "$(slurp)" - | wl-copy
|
||||||
|
|
||||||
|
# Screen recording
|
||||||
|
bind = $mainMod SHIFT, R, exec, wf-recorder -g "$(slurp)" -f ~/Videos/recording_$(date +'%Y-%m-%d-%H%M%S.mp4')
|
||||||
|
|
||||||
|
# Media keys
|
||||||
|
bindl = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||||
|
bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||||
|
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||||
|
bindl = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||||
|
|
||||||
|
# Brightness keys
|
||||||
|
bindl = , XF86MonBrightnessUp, exec, brightnessctl set 10%+
|
||||||
|
bindl = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
|
||||||
|
|
||||||
|
# Media player keys
|
||||||
|
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||||
|
bindl = , XF86AudioNext, exec, playerctl next
|
||||||
|
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||||
|
|
||||||
|
# Lock screen
|
||||||
|
bind = $mainMod, L, exec, hyprlock
|
||||||
|
|
||||||
|
# System controls
|
||||||
|
bind = $mainMod SHIFT, Q, exec, wlogout
|
||||||
|
bind = $mainMod ALT, R, exec, systemctl --user restart waybar
|
||||||
|
bind = $mainMod ALT, W, exec, killall waybar && waybar
|
||||||
|
|
||||||
|
# Clipboard management
|
||||||
|
bind = $mainMod, Y, exec, cliphist list | walker --dmenu | cliphist decode | wl-copy
|
||||||
|
|
||||||
|
# Color picker
|
||||||
|
bind = $mainMod SHIFT, C, exec, hyprpicker -a
|
||||||
|
|
||||||
|
# Special workspace (scratchpad)
|
||||||
|
bind = $mainMod, S, togglespecialworkspace, magic
|
||||||
|
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||||
|
|
||||||
|
# Game mode toggle
|
||||||
|
${optionalString (omnixy.isEnabled "gaming") ''
|
||||||
|
bind = $mainMod, F1, exec, gamemoderun
|
||||||
|
''}
|
||||||
|
|
||||||
|
# Theme cycling (if multiple wallpapers available)
|
||||||
|
bind = $mainMod ALT, T, exec, omnixy-theme-bg-next
|
||||||
|
bind = $mainMod ALT SHIFT, T, exec, omnixy-theme-next
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
197
modules/desktop/hyprland/idle.nix
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Hyprland idle management configuration for OmniXY
|
||||||
|
# Handles screen locking, power management, and idle behavior
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy.desktop;
|
||||||
|
omnixy = import ../../helpers.nix { inherit config pkgs lib; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) {
|
||||||
|
# Install required packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
hypridle
|
||||||
|
hyprlock
|
||||||
|
hyprpicker
|
||||||
|
brightnessctl
|
||||||
|
];
|
||||||
|
|
||||||
|
# Create hypridle configuration
|
||||||
|
environment.etc."omnixy/hyprland/hypridle.conf".text = ''
|
||||||
|
# OmniXY Idle Management Configuration
|
||||||
|
|
||||||
|
general {
|
||||||
|
# Avoid starting multiple hyprlock instances
|
||||||
|
lock_cmd = pidof hyprlock || hyprlock
|
||||||
|
|
||||||
|
# Lock before suspend
|
||||||
|
before_sleep_cmd = loginctl lock-session
|
||||||
|
|
||||||
|
# Lock when lid is closed
|
||||||
|
before_sleep_cmd = hyprlock
|
||||||
|
|
||||||
|
# Unlock when lid is opened
|
||||||
|
after_sleep_cmd = hyprctl dispatch dpms on
|
||||||
|
}
|
||||||
|
|
||||||
|
# Dim screen after 5 minutes
|
||||||
|
listener {
|
||||||
|
timeout = 300
|
||||||
|
on-timeout = brightnessctl -s set 10%
|
||||||
|
on-resume = brightnessctl -r
|
||||||
|
}
|
||||||
|
|
||||||
|
# Lock screen after 10 minutes
|
||||||
|
listener {
|
||||||
|
timeout = 600
|
||||||
|
on-timeout = loginctl lock-session
|
||||||
|
}
|
||||||
|
|
||||||
|
# Turn off screen after 15 minutes
|
||||||
|
listener {
|
||||||
|
timeout = 900
|
||||||
|
on-timeout = hyprctl dispatch dpms off
|
||||||
|
on-resume = hyprctl dispatch dpms on
|
||||||
|
}
|
||||||
|
|
||||||
|
# Suspend system after 30 minutes (optional - can be disabled)
|
||||||
|
${optionalString (cfg.idleSuspend or false) ''
|
||||||
|
listener {
|
||||||
|
timeout = 1800
|
||||||
|
on-timeout = systemctl suspend
|
||||||
|
}
|
||||||
|
''}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Create hyprlock configuration
|
||||||
|
environment.etc."omnixy/hyprland/hyprlock.conf".text = ''
|
||||||
|
# OmniXY Screen Lock Configuration
|
||||||
|
|
||||||
|
general {
|
||||||
|
disable_loading_bar = true
|
||||||
|
grace = 5
|
||||||
|
hide_cursor = false
|
||||||
|
no_fade_in = false
|
||||||
|
}
|
||||||
|
|
||||||
|
background {
|
||||||
|
monitor =
|
||||||
|
path = ${if cfg.wallpaper != null then toString cfg.wallpaper else "~/Pictures/wallpaper.jpg"}
|
||||||
|
blur_passes = 3
|
||||||
|
blur_size = 8
|
||||||
|
noise = 0.0117
|
||||||
|
contrast = 0.8916
|
||||||
|
brightness = 0.8172
|
||||||
|
vibrancy = 0.1696
|
||||||
|
vibrancy_darkness = 0.0
|
||||||
|
}
|
||||||
|
|
||||||
|
# User avatar
|
||||||
|
image {
|
||||||
|
monitor =
|
||||||
|
path = ~/.face
|
||||||
|
size = 150
|
||||||
|
rounding = -1
|
||||||
|
border_size = 4
|
||||||
|
border_color = rgb(221, 221, 221)
|
||||||
|
rotate = 0
|
||||||
|
reload_time = -1
|
||||||
|
reload_cmd =
|
||||||
|
position = 0, 200
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
}
|
||||||
|
|
||||||
|
# Current time
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:30000] echo "$TIME"
|
||||||
|
color = rgba(200, 200, 200, 1.0)
|
||||||
|
font_size = 55
|
||||||
|
font_family = JetBrainsMono Nerd Font
|
||||||
|
position = -100, -40
|
||||||
|
halign = right
|
||||||
|
valign = bottom
|
||||||
|
shadow_passes = 5
|
||||||
|
shadow_size = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
# Date
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
|
||||||
|
color = rgba(200, 200, 200, 1.0)
|
||||||
|
font_size = 25
|
||||||
|
font_family = JetBrainsMono Nerd Font
|
||||||
|
position = -100, -150
|
||||||
|
halign = right
|
||||||
|
valign = bottom
|
||||||
|
shadow_passes = 5
|
||||||
|
shadow_size = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
# Password input field
|
||||||
|
input-field {
|
||||||
|
monitor =
|
||||||
|
size = 200, 50
|
||||||
|
outline_thickness = 3
|
||||||
|
dots_size = 0.33
|
||||||
|
dots_spacing = 0.15
|
||||||
|
dots_center = false
|
||||||
|
dots_rounding = -1
|
||||||
|
outer_color = rgb(151515)
|
||||||
|
inner_color = rgb(200, 200, 200)
|
||||||
|
font_color = rgb(10, 10, 10)
|
||||||
|
fade_on_empty = true
|
||||||
|
fade_timeout = 1000
|
||||||
|
placeholder_text = <i>Input Password...</i>
|
||||||
|
hide_input = false
|
||||||
|
rounding = -1
|
||||||
|
check_color = rgb(204, 136, 34)
|
||||||
|
fail_color = rgb(204, 34, 34)
|
||||||
|
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
|
||||||
|
fail_timeout = 2000
|
||||||
|
fail_transitions = 300
|
||||||
|
capslock_color = -1
|
||||||
|
numlock_color = -1
|
||||||
|
bothlock_color = -1
|
||||||
|
invert_numlock = false
|
||||||
|
swap_font_color = false
|
||||||
|
position = 0, -20
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
}
|
||||||
|
|
||||||
|
# User name
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = ${config.omnixy.user or "user"}
|
||||||
|
color = rgba(200, 200, 200, 1.0)
|
||||||
|
font_size = 20
|
||||||
|
font_family = JetBrainsMono Nerd Font
|
||||||
|
position = 0, 80
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
shadow_passes = 5
|
||||||
|
shadow_size = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
# System info
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:60000] echo "$(uname -n)"
|
||||||
|
color = rgba(200, 200, 200, 0.8)
|
||||||
|
font_size = 16
|
||||||
|
font_family = JetBrainsMono Nerd Font
|
||||||
|
position = 100, 40
|
||||||
|
halign = left
|
||||||
|
valign = bottom
|
||||||
|
shadow_passes = 5
|
||||||
|
shadow_size = 10
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
215
modules/fastfetch.nix
Normal file
@@ -0,0 +1,215 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Fastfetch system information display for OmniXY
|
||||||
|
# Beautiful system information with OmniXY branding
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) {
|
||||||
|
# Add fastfetch to system packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
fastfetch
|
||||||
|
];
|
||||||
|
|
||||||
|
# Create OmniXY branding directory
|
||||||
|
environment.etc."omnixy/branding/logo.txt".text = ''
|
||||||
|
|
||||||
|
███████╗███╗ ███╗███╗ ██╗██╗██╗ ██╗██╗ ██╗
|
||||||
|
██╔════╝████╗ ████║████╗ ██║██║╚██╗██╔╝╚██╗ ██╔╝
|
||||||
|
██║ ██╔████╔██║██╔██╗ ██║██║ ╚███╔╝ ╚████╔╝
|
||||||
|
██║ ██║╚██╔╝██║██║╚██╗██║██║ ██╔██╗ ╚██╔╝
|
||||||
|
███████╗██║ ╚═╝ ██║██║ ╚████║██║██╔╝ ██╗ ██║
|
||||||
|
╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═╝
|
||||||
|
|
||||||
|
Declarative NixOS Configuration
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.etc."omnixy/branding/about.txt".text = ''
|
||||||
|
╭─────────────────────────────────────────────────────╮
|
||||||
|
│ │
|
||||||
|
│ ██████╗ ███╗ ███╗███╗ ██╗██╗██╗ ██╗██╗ ██╗│
|
||||||
|
│ ██╔═══██╗████╗ ████║████╗ ██║██║╚██╗██╔╝╚██╗ ██╔╝│
|
||||||
|
│ ██║ ██║██╔████╔██║██╔██╗ ██║██║ ╚███╔╝ ╚████╔╝ │
|
||||||
|
│ ██║ ██║██║╚██╔╝██║██║╚██╗██║██║ ██╔██╗ ╚██╔╝ │
|
||||||
|
│ ╚██████╔╝██║ ╚═╝ ██║██║ ╚████║██║██╔╝ ██╗ ██║ │
|
||||||
|
│ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═╝ │
|
||||||
|
│ │
|
||||||
|
│ 🚀 Declarative • 🎨 Beautiful • ⚡ Fast │
|
||||||
|
│ │
|
||||||
|
╰─────────────────────────────────────────────────────╯
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Create fastfetch configuration
|
||||||
|
environment.etc."omnixy/fastfetch/config.jsonc".text = ''
|
||||||
|
{
|
||||||
|
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||||
|
"logo": {
|
||||||
|
"type": "file",
|
||||||
|
"source": "/etc/omnixy/branding/about.txt",
|
||||||
|
"color": {
|
||||||
|
"1": "cyan",
|
||||||
|
"2": "blue"
|
||||||
|
},
|
||||||
|
"padding": {
|
||||||
|
"top": 1,
|
||||||
|
"right": 4,
|
||||||
|
"left": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"modules": [
|
||||||
|
"break",
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": "\u001b[90m┌─────────────────── Hardware ───────────────────┐"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "host",
|
||||||
|
"key": " Host",
|
||||||
|
"keyColor": "cyan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "cpu",
|
||||||
|
"key": " CPU",
|
||||||
|
"keyColor": "cyan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "gpu",
|
||||||
|
"key": " GPU",
|
||||||
|
"keyColor": "cyan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "memory",
|
||||||
|
"key": " Memory",
|
||||||
|
"keyColor": "cyan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "disk",
|
||||||
|
"key": " Disk (/)",
|
||||||
|
"keyColor": "cyan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": "\u001b[90m├─────────────────── Software ───────────────────┤"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "os",
|
||||||
|
"key": " OS",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "kernel",
|
||||||
|
"key": " Kernel",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "de",
|
||||||
|
"key": " DE",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "wm",
|
||||||
|
"key": " WM",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "wmtheme",
|
||||||
|
"key": " Theme",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"key": " Shell",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "terminal",
|
||||||
|
"key": " Terminal",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": "\u001b[90m├─────────────────── OmniXY ─────────────────────┤"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": " Theme: ${cfg.theme}",
|
||||||
|
"keyColor": "magenta"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": " Preset: ${cfg.preset or "custom"}",
|
||||||
|
"keyColor": "magenta"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": " User: ${cfg.user}",
|
||||||
|
"keyColor": "magenta"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "packages",
|
||||||
|
"key": " Packages",
|
||||||
|
"keyColor": "magenta"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": "\u001b[90m└─────────────────────────────────────────────────┘"
|
||||||
|
},
|
||||||
|
"break"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Create convenience script
|
||||||
|
environment.systemPackages = [
|
||||||
|
(omnixy.makeScript "omnixy-info" "Show OmniXY system information" ''
|
||||||
|
fastfetch --config /etc/omnixy/fastfetch/config.jsonc
|
||||||
|
'')
|
||||||
|
|
||||||
|
(omnixy.makeScript "omnixy-about" "Show OmniXY about screen" ''
|
||||||
|
clear
|
||||||
|
cat /etc/omnixy/branding/about.txt
|
||||||
|
echo
|
||||||
|
echo "Theme: ${cfg.theme}"
|
||||||
|
echo "Preset: ${cfg.preset or "custom"}"
|
||||||
|
echo "User: ${cfg.user}"
|
||||||
|
echo "NixOS Version: $(nixos-version)"
|
||||||
|
echo
|
||||||
|
echo "Visit: https://github.com/TheArctesian/omnixy"
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
# Add to user environment
|
||||||
|
omnixy.forUser {
|
||||||
|
# Set XDG config dir for fastfetch
|
||||||
|
xdg.configFile."fastfetch/config.jsonc".source =
|
||||||
|
config.environment.etc."omnixy/fastfetch/config.jsonc".source;
|
||||||
|
|
||||||
|
# Add shell aliases
|
||||||
|
programs.bash.shellAliases = {
|
||||||
|
neofetch = "omnixy-info";
|
||||||
|
screenfetch = "omnixy-info";
|
||||||
|
sysinfo = "omnixy-info";
|
||||||
|
about = "omnixy-about";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
neofetch = "omnixy-info";
|
||||||
|
screenfetch = "omnixy-info";
|
||||||
|
sysinfo = "omnixy-info";
|
||||||
|
about = "omnixy-about";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish.shellAliases = {
|
||||||
|
neofetch = "omnixy-info";
|
||||||
|
screenfetch = "omnixy-info";
|
||||||
|
sysinfo = "omnixy-info";
|
||||||
|
about = "omnixy-about";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -92,6 +92,31 @@ in
|
|||||||
utilities = [ "calculators" "converters" "system tools" ];
|
utilities = [ "calculators" "converters" "system tools" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Hyprland configuration helper
|
||||||
|
hyprlandConfig = colors: ''
|
||||||
|
general {
|
||||||
|
gaps_in = 5
|
||||||
|
gaps_out = 10
|
||||||
|
border_size = 2
|
||||||
|
col.active_border = ${colors.active_border}
|
||||||
|
col.inactive_border = ${colors.inactive_border}
|
||||||
|
layout = dwindle
|
||||||
|
}
|
||||||
|
|
||||||
|
decoration {
|
||||||
|
rounding = 10
|
||||||
|
blur {
|
||||||
|
enabled = true
|
||||||
|
size = 6
|
||||||
|
passes = 2
|
||||||
|
}
|
||||||
|
drop_shadow = true
|
||||||
|
shadow_range = 20
|
||||||
|
shadow_render_power = 3
|
||||||
|
col.shadow = ${colors.shadow}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
# Standard service patterns
|
# Standard service patterns
|
||||||
service = {
|
service = {
|
||||||
# Create a basic systemd service with OmniXY defaults
|
# Create a basic systemd service with OmniXY defaults
|
||||||
|
|||||||
530
modules/menus.nix
Normal file
@@ -0,0 +1,530 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Interactive menu system for OmniXY
|
||||||
|
# Terminal-based menus for system management and productivity
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) {
|
||||||
|
# Interactive menu scripts
|
||||||
|
environment.systemPackages = [
|
||||||
|
# Main OmniXY menu
|
||||||
|
(omnixy.makeScript "omnixy-menu" "Interactive OmniXY system menu" ''
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Colors for terminal output
|
||||||
|
RED='\033[0;31m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
PURPLE='\033[0;35m'
|
||||||
|
CYAN='\033[0;36m'
|
||||||
|
WHITE='\033[1;37m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
show_header() {
|
||||||
|
clear
|
||||||
|
echo -e "''${CYAN}"
|
||||||
|
echo " ███████╗███╗ ███╗███╗ ██╗██╗██╗ ██╗██╗ ██╗"
|
||||||
|
echo " ██╔════╝████╗ ████║████╗ ██║██║╚██╗██╔╝╚██╗ ██╔╝"
|
||||||
|
echo " ██║ ██╔████╔██║██╔██╗ ██║██║ ╚███╔╝ ╚████╔╝"
|
||||||
|
echo " ██║ ██║╚██╔╝██║██║╚██╗██║██║ ██╔██╗ ╚██╔╝"
|
||||||
|
echo " ███████╗██║ ╚═╝ ██║██║ ╚████║██║██╔╝ ██╗ ██║"
|
||||||
|
echo " ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═╝"
|
||||||
|
echo -e "''${NC}"
|
||||||
|
echo -e "''${WHITE} 🚀 Declarative • 🎨 Beautiful • ⚡ Fast''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${BLUE}═══════════════════════════════════════════════════════''${NC}"
|
||||||
|
echo -e "''${WHITE} Theme: ''${YELLOW}${cfg.theme}''${WHITE} │ User: ''${GREEN}${cfg.user}''${WHITE} │ Preset: ''${PURPLE}${cfg.preset or "custom"}''${NC}"
|
||||||
|
echo -e "''${BLUE}═══════════════════════════════════════════════════════''${NC}"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
show_main_menu() {
|
||||||
|
show_header
|
||||||
|
echo -e "''${WHITE}🎛️ Main Menu''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${GREEN}1.''${NC} 📦 System Management"
|
||||||
|
echo -e "''${GREEN}2.''${NC} 🎨 Theme & Appearance"
|
||||||
|
echo -e "''${GREEN}3.''${NC} ⚙️ Configuration"
|
||||||
|
echo -e "''${GREEN}4.''${NC} 🔧 Development Tools"
|
||||||
|
echo -e "''${GREEN}5.''${NC} 📊 System Information"
|
||||||
|
echo -e "''${GREEN}6.''${NC} 🛠️ Maintenance & Utilities"
|
||||||
|
echo -e "''${GREEN}7.''${NC} 📋 Help & Documentation"
|
||||||
|
echo
|
||||||
|
echo -e "''${RED}0.''${NC} Exit"
|
||||||
|
echo
|
||||||
|
echo -ne "''${CYAN}Select an option: ''${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
show_system_menu() {
|
||||||
|
show_header
|
||||||
|
echo -e "''${WHITE}📦 System Management''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${GREEN}1.''${NC} 🔄 Update System"
|
||||||
|
echo -e "''${GREEN}2.''${NC} 🔨 Rebuild Configuration"
|
||||||
|
echo -e "''${GREEN}3.''${NC} 🧪 Test Configuration"
|
||||||
|
echo -e "''${GREEN}4.''${NC} 🧹 Clean System"
|
||||||
|
echo -e "''${GREEN}5.''${NC} 📊 Service Status"
|
||||||
|
echo -e "''${GREEN}6.''${NC} 💾 Create Backup"
|
||||||
|
echo -e "''${GREEN}7.''${NC} 🔍 Search Packages"
|
||||||
|
echo
|
||||||
|
echo -e "''${YELLOW}8.''${NC} ← Back to Main Menu"
|
||||||
|
echo
|
||||||
|
echo -ne "''${CYAN}Select an option: ''${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
show_theme_menu() {
|
||||||
|
show_header
|
||||||
|
echo -e "''${WHITE}🎨 Theme & Appearance''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${WHITE}Current Theme: ''${YELLOW}${cfg.theme}''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${GREEN}Available Themes:''${NC}"
|
||||||
|
echo -e "''${GREEN}1.''${NC} 🌃 tokyo-night - Dark theme with vibrant colors"
|
||||||
|
echo -e "''${GREEN}2.''${NC} 🎀 catppuccin - Pastel theme with modern aesthetics"
|
||||||
|
echo -e "''${GREEN}3.''${NC} 🟤 gruvbox - Retro theme with warm colors"
|
||||||
|
echo -e "''${GREEN}4.''${NC} ❄️ nord - Arctic theme with cool colors"
|
||||||
|
echo -e "''${GREEN}5.''${NC} 🌲 everforest - Green forest theme"
|
||||||
|
echo -e "''${GREEN}6.''${NC} 🌹 rose-pine - Cozy theme with muted colors"
|
||||||
|
echo -e "''${GREEN}7.''${NC} 🌊 kanagawa - Japanese-inspired theme"
|
||||||
|
echo -e "''${GREEN}8.''${NC} ☀️ catppuccin-latte - Light catppuccin variant"
|
||||||
|
echo -e "''${GREEN}9.''${NC} ⚫ matte-black - Minimalist dark theme"
|
||||||
|
echo -e "''${GREEN}a.''${NC} 💎 osaka-jade - Jade green accent theme"
|
||||||
|
echo -e "''${GREEN}b.''${NC} ☕ ristretto - Coffee-inspired warm theme"
|
||||||
|
echo
|
||||||
|
echo -e "''${YELLOW}0.''${NC} ← Back to Main Menu"
|
||||||
|
echo
|
||||||
|
echo -ne "''${CYAN}Select theme or option: ''${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
show_config_menu() {
|
||||||
|
show_header
|
||||||
|
echo -e "''${WHITE}⚙️ Configuration''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${GREEN}1.''${NC} 📝 Edit Main Configuration"
|
||||||
|
echo -e "''${GREEN}2.''${NC} 🪟 Edit Hyprland Configuration"
|
||||||
|
echo -e "''${GREEN}3.''${NC} 🎨 Edit Theme Configuration"
|
||||||
|
echo -e "''${GREEN}4.''${NC} 📦 Edit Package Configuration"
|
||||||
|
echo -e "''${GREEN}5.''${NC} 🔒 Security Settings"
|
||||||
|
echo -e "''${GREEN}6.''${NC} 📂 Open Configuration Directory"
|
||||||
|
echo -e "''${GREEN}7.''${NC} 🔗 View Git Status"
|
||||||
|
echo
|
||||||
|
echo -e "''${YELLOW}0.''${NC} ← Back to Main Menu"
|
||||||
|
echo
|
||||||
|
echo -ne "''${CYAN}Select an option: ''${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
show_dev_menu() {
|
||||||
|
show_header
|
||||||
|
echo -e "''${WHITE}🔧 Development Tools''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${GREEN}1.''${NC} 💻 Open Terminal"
|
||||||
|
echo -e "''${GREEN}2.''${NC} 📝 Open Code Editor"
|
||||||
|
echo -e "''${GREEN}3.''${NC} 🌐 Open Browser"
|
||||||
|
echo -e "''${GREEN}4.''${NC} 📁 Open File Manager"
|
||||||
|
echo -e "''${GREEN}5.''${NC} 🚀 Launch Applications"
|
||||||
|
echo -e "''${GREEN}6.''${NC} 🐙 Git Operations"
|
||||||
|
echo
|
||||||
|
echo -e "''${YELLOW}0.''${NC} ← Back to Main Menu"
|
||||||
|
echo
|
||||||
|
echo -ne "''${CYAN}Select an option: ''${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
show_info_menu() {
|
||||||
|
show_header
|
||||||
|
echo -e "''${WHITE}📊 System Information''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${GREEN}1.''${NC} 🖥️ System Overview"
|
||||||
|
echo -e "''${GREEN}2.''${NC} 💻 Hardware Information"
|
||||||
|
echo -e "''${GREEN}3.''${NC} 📈 Performance Monitor"
|
||||||
|
echo -e "''${GREEN}4.''${NC} 🔧 Service Status"
|
||||||
|
echo -e "''${GREEN}5.''${NC} 💾 Disk Usage"
|
||||||
|
echo -e "''${GREEN}6.''${NC} 🌐 Network Information"
|
||||||
|
echo -e "''${GREEN}7.''${NC} 📊 OmniXY About"
|
||||||
|
echo
|
||||||
|
echo -e "''${YELLOW}0.''${NC} ← Back to Main Menu"
|
||||||
|
echo
|
||||||
|
echo -ne "''${CYAN}Select an option: ''${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
show_maintenance_menu() {
|
||||||
|
show_header
|
||||||
|
echo -e "''${WHITE}🛠️ Maintenance & Utilities''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${GREEN}1.''${NC} 🧹 System Cleanup"
|
||||||
|
echo -e "''${GREEN}2.''${NC} 🔄 Restart Services"
|
||||||
|
echo -e "''${GREEN}3.''${NC} 📋 View Logs"
|
||||||
|
echo -e "''${GREEN}4.''${NC} 💾 Backup Configuration"
|
||||||
|
echo -e "''${GREEN}5.''${NC} 🔧 System Diagnostics"
|
||||||
|
echo -e "''${GREEN}6.''${NC} 🖼️ Screenshot Tools"
|
||||||
|
echo
|
||||||
|
echo -e "''${YELLOW}0.''${NC} ← Back to Main Menu"
|
||||||
|
echo
|
||||||
|
echo -ne "''${CYAN}Select an option: ''${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
show_help_menu() {
|
||||||
|
show_header
|
||||||
|
echo -e "''${WHITE}📋 Help & Documentation''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${GREEN}1.''${NC} 📖 OmniXY Commands"
|
||||||
|
echo -e "''${GREEN}2.''${NC} 🔑 Keyboard Shortcuts"
|
||||||
|
echo -e "''${GREEN}3.''${NC} 🌐 Open GitHub Repository"
|
||||||
|
echo -e "''${GREEN}4.''${NC} 📧 Report Issue"
|
||||||
|
echo -e "''${GREEN}5.''${NC} ℹ️ About OmniXY"
|
||||||
|
echo
|
||||||
|
echo -e "''${YELLOW}0.''${NC} ← Back to Main Menu"
|
||||||
|
echo
|
||||||
|
echo -ne "''${CYAN}Select an option: ''${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_system_menu() {
|
||||||
|
case "$1" in
|
||||||
|
1) echo -e "''${GREEN}Updating system...''${NC}"; omnixy-update ;;
|
||||||
|
2) echo -e "''${GREEN}Rebuilding configuration...''${NC}"; omnixy-rebuild ;;
|
||||||
|
3) echo -e "''${GREEN}Testing configuration...''${NC}"; omnixy-test ;;
|
||||||
|
4) echo -e "''${GREEN}Cleaning system...''${NC}"; omnixy-clean ;;
|
||||||
|
5) echo -e "''${GREEN}Checking service status...''${NC}"; omnixy-services status ;;
|
||||||
|
6) echo -e "''${GREEN}Creating backup...''${NC}"; omnixy-backup ;;
|
||||||
|
7)
|
||||||
|
echo -ne "''${CYAN}Enter package name to search: ''${NC}"
|
||||||
|
read -r package
|
||||||
|
if [ -n "$package" ]; then
|
||||||
|
omnixy-search "$package"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
8) return 0 ;;
|
||||||
|
*) echo -e "''${RED}Invalid option!''${NC}" ;;
|
||||||
|
esac
|
||||||
|
echo
|
||||||
|
echo -ne "''${YELLOW}Press Enter to continue...''${NC}"
|
||||||
|
read -r
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_theme_menu() {
|
||||||
|
case "$1" in
|
||||||
|
1) omnixy-theme tokyo-night ;;
|
||||||
|
2) omnixy-theme catppuccin ;;
|
||||||
|
3) omnixy-theme gruvbox ;;
|
||||||
|
4) omnixy-theme nord ;;
|
||||||
|
5) omnixy-theme everforest ;;
|
||||||
|
6) omnixy-theme rose-pine ;;
|
||||||
|
7) omnixy-theme kanagawa ;;
|
||||||
|
8) omnixy-theme catppuccin-latte ;;
|
||||||
|
9) omnixy-theme matte-black ;;
|
||||||
|
a|A) omnixy-theme osaka-jade ;;
|
||||||
|
b|B) omnixy-theme ristretto ;;
|
||||||
|
0) return 0 ;;
|
||||||
|
*) echo -e "''${RED}Invalid option!''${NC}" ;;
|
||||||
|
esac
|
||||||
|
echo
|
||||||
|
echo -ne "''${YELLOW}Press Enter to continue...''${NC}"
|
||||||
|
read -r
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_config_menu() {
|
||||||
|
case "$1" in
|
||||||
|
1) omnixy-config main ;;
|
||||||
|
2) omnixy-config hyprland ;;
|
||||||
|
3) omnixy-config theme ;;
|
||||||
|
4) omnixy-config packages ;;
|
||||||
|
5)
|
||||||
|
echo -e "''${CYAN}Security Settings:''${NC}"
|
||||||
|
echo -e "''${WHITE}1. Security Status 2. Fingerprint Setup 3. FIDO2 Setup''${NC}"
|
||||||
|
echo -ne "''${CYAN}Select: ''${NC}"
|
||||||
|
read -r security_choice
|
||||||
|
case "$security_choice" in
|
||||||
|
1) omnixy-security status ;;
|
||||||
|
2) omnixy-fingerprint setup ;;
|
||||||
|
3) omnixy-fido2 setup ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
6) cd /etc/nixos && ''${TERMINAL:-ghostty} ;;
|
||||||
|
7) cd /etc/nixos && git status ;;
|
||||||
|
0) return 0 ;;
|
||||||
|
*) echo -e "''${RED}Invalid option!''${NC}" ;;
|
||||||
|
esac
|
||||||
|
echo
|
||||||
|
echo -ne "''${YELLOW}Press Enter to continue...''${NC}"
|
||||||
|
read -r
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_dev_menu() {
|
||||||
|
case "$1" in
|
||||||
|
1) ''${TERMINAL:-ghostty} ;;
|
||||||
|
2) code ;;
|
||||||
|
3) ''${BROWSER:-firefox} ;;
|
||||||
|
4) thunar ;;
|
||||||
|
5) walker ;;
|
||||||
|
6)
|
||||||
|
echo -e "''${CYAN}Git Operations:''${NC}"
|
||||||
|
echo -e "''${WHITE}1. Status 2. Log 3. Commit 4. Push''${NC}"
|
||||||
|
echo -ne "''${CYAN}Select: ''${NC}"
|
||||||
|
read -r git_choice
|
||||||
|
cd /etc/nixos
|
||||||
|
case "$git_choice" in
|
||||||
|
1) git status ;;
|
||||||
|
2) git log --oneline -10 ;;
|
||||||
|
3) echo -ne "''${CYAN}Commit message: ''${NC}"; read -r msg; git add -A && git commit -m "$msg" ;;
|
||||||
|
4) git push ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
0) return 0 ;;
|
||||||
|
*) echo -e "''${RED}Invalid option!''${NC}" ;;
|
||||||
|
esac
|
||||||
|
echo
|
||||||
|
echo -ne "''${YELLOW}Press Enter to continue...''${NC}"
|
||||||
|
read -r
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_info_menu() {
|
||||||
|
case "$1" in
|
||||||
|
1) omnixy-sysinfo ;;
|
||||||
|
2) omnixy-hardware ;;
|
||||||
|
3) htop ;;
|
||||||
|
4) omnixy-services status ;;
|
||||||
|
5) df -h && echo && du -sh /nix/store ;;
|
||||||
|
6) ip addr show ;;
|
||||||
|
7) omnixy-about ;;
|
||||||
|
0) return 0 ;;
|
||||||
|
*) echo -e "''${RED}Invalid option!''${NC}" ;;
|
||||||
|
esac
|
||||||
|
echo
|
||||||
|
echo -ne "''${YELLOW}Press Enter to continue...''${NC}"
|
||||||
|
read -r
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_maintenance_menu() {
|
||||||
|
case "$1" in
|
||||||
|
1) omnixy-clean ;;
|
||||||
|
2)
|
||||||
|
echo -ne "''${CYAN}Enter service name: ''${NC}"
|
||||||
|
read -r service
|
||||||
|
if [ -n "$service" ]; then
|
||||||
|
omnixy-services restart "$service"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
echo -ne "''${CYAN}Enter service name for logs: ''${NC}"
|
||||||
|
read -r service
|
||||||
|
if [ -n "$service" ]; then
|
||||||
|
omnixy-services logs "$service"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
4) omnixy-backup ;;
|
||||||
|
5) echo -e "''${GREEN}Running diagnostics...''${NC}"; journalctl -p 3 -xb ;;
|
||||||
|
6) grim -g "$(slurp)" ~/Pictures/Screenshots/screenshot_$(date +'%Y-%m-%d-%H%M%S.png') ;;
|
||||||
|
0) return 0 ;;
|
||||||
|
*) echo -e "''${RED}Invalid option!''${NC}" ;;
|
||||||
|
esac
|
||||||
|
echo
|
||||||
|
echo -ne "''${YELLOW}Press Enter to continue...''${NC}"
|
||||||
|
read -r
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_help_menu() {
|
||||||
|
case "$1" in
|
||||||
|
1)
|
||||||
|
echo -e "''${WHITE}OmniXY Commands:''${NC}"
|
||||||
|
echo -e "''${GREEN}omnixy-menu''${NC} - This interactive menu"
|
||||||
|
echo -e "''${GREEN}omnixy-info''${NC} - System information display"
|
||||||
|
echo -e "''${GREEN}omnixy-about''${NC} - About screen"
|
||||||
|
echo -e "''${GREEN}omnixy-theme''${NC} - Switch themes"
|
||||||
|
echo -e "''${GREEN}omnixy-rebuild''${NC} - Rebuild configuration"
|
||||||
|
echo -e "''${GREEN}omnixy-update''${NC} - Update system"
|
||||||
|
echo -e "''${GREEN}omnixy-clean''${NC} - Clean system"
|
||||||
|
echo -e "''${GREEN}omnixy-search''${NC} - Search packages"
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
echo -e "''${WHITE}Hyprland Keyboard Shortcuts:''${NC}"
|
||||||
|
echo -e "''${GREEN}Super + Return''${NC} - Open terminal"
|
||||||
|
echo -e "''${GREEN}Super + R''${NC} - Open launcher"
|
||||||
|
echo -e "''${GREEN}Super + Q''${NC} - Close window"
|
||||||
|
echo -e "''${GREEN}Super + F''${NC} - Fullscreen"
|
||||||
|
echo -e "''${GREEN}Super + 1-0''${NC} - Switch workspaces"
|
||||||
|
;;
|
||||||
|
3) ''${BROWSER:-firefox} https://github.com/TheArctesian/omnixy ;;
|
||||||
|
4) ''${BROWSER:-firefox} https://github.com/TheArctesian/omnixy/issues ;;
|
||||||
|
5) omnixy-about ;;
|
||||||
|
0) return 0 ;;
|
||||||
|
*) echo -e "''${RED}Invalid option!''${NC}" ;;
|
||||||
|
esac
|
||||||
|
echo
|
||||||
|
echo -ne "''${YELLOW}Press Enter to continue...''${NC}"
|
||||||
|
read -r
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main menu loop
|
||||||
|
while true; do
|
||||||
|
show_main_menu
|
||||||
|
read -r choice
|
||||||
|
|
||||||
|
case "$choice" in
|
||||||
|
1)
|
||||||
|
while true; do
|
||||||
|
show_system_menu
|
||||||
|
read -r sub_choice
|
||||||
|
handle_system_menu "$sub_choice"
|
||||||
|
[ "$?" -eq 0 ] && break
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
while true; do
|
||||||
|
show_theme_menu
|
||||||
|
read -r sub_choice
|
||||||
|
handle_theme_menu "$sub_choice"
|
||||||
|
[ "$?" -eq 0 ] && break
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
while true; do
|
||||||
|
show_config_menu
|
||||||
|
read -r sub_choice
|
||||||
|
handle_config_menu "$sub_choice"
|
||||||
|
[ "$?" -eq 0 ] && break
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
4)
|
||||||
|
while true; do
|
||||||
|
show_dev_menu
|
||||||
|
read -r sub_choice
|
||||||
|
handle_dev_menu "$sub_choice"
|
||||||
|
[ "$?" -eq 0 ] && break
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
5)
|
||||||
|
while true; do
|
||||||
|
show_info_menu
|
||||||
|
read -r sub_choice
|
||||||
|
handle_info_menu "$sub_choice"
|
||||||
|
[ "$?" -eq 0 ] && break
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
6)
|
||||||
|
while true; do
|
||||||
|
show_maintenance_menu
|
||||||
|
read -r sub_choice
|
||||||
|
handle_maintenance_menu "$sub_choice"
|
||||||
|
[ "$?" -eq 0 ] && break
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
7)
|
||||||
|
while true; do
|
||||||
|
show_help_menu
|
||||||
|
read -r sub_choice
|
||||||
|
handle_help_menu "$sub_choice"
|
||||||
|
[ "$?" -eq 0 ] && break
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
0|q|Q)
|
||||||
|
echo -e "''${GREEN}Goodbye! 👋''${NC}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e "''${RED}Invalid option! Press Enter to continue...''${NC}"
|
||||||
|
read -r
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Quick theme selector
|
||||||
|
(omnixy.makeScript "omnixy-theme-picker" "Quick theme picker with preview" ''
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
CYAN='\033[0;36m'
|
||||||
|
WHITE='\033[1;37m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
RED='\033[0;31m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
themes=(
|
||||||
|
"tokyo-night:🌃:Dark theme with vibrant colors"
|
||||||
|
"catppuccin:🎀:Pastel theme with modern aesthetics"
|
||||||
|
"gruvbox:🟤:Retro theme with warm colors"
|
||||||
|
"nord:❄️ :Arctic theme with cool colors"
|
||||||
|
"everforest:🌲:Green forest theme"
|
||||||
|
"rose-pine:🌹:Cozy theme with muted colors"
|
||||||
|
"kanagawa:🌊:Japanese-inspired theme"
|
||||||
|
"catppuccin-latte:☀️ :Light catppuccin variant"
|
||||||
|
"matte-black:⚫:Minimalist dark theme"
|
||||||
|
"osaka-jade:💎:Jade green accent theme"
|
||||||
|
"ristretto:☕:Coffee-inspired warm theme"
|
||||||
|
)
|
||||||
|
|
||||||
|
clear
|
||||||
|
echo -e "''${CYAN}🎨 OmniXY Theme Picker''${NC}"
|
||||||
|
echo -e "''${WHITE}Current Theme: ''${YELLOW}${cfg.theme}''${NC}"
|
||||||
|
echo
|
||||||
|
echo -e "''${WHITE}Available Themes:''${NC}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
for i in "''${!themes[@]}"; do
|
||||||
|
IFS=':' read -ra theme_info <<< "''${themes[$i]}"
|
||||||
|
theme_name="''${theme_info[0]}"
|
||||||
|
theme_icon="''${theme_info[1]}"
|
||||||
|
theme_desc="''${theme_info[2]}"
|
||||||
|
|
||||||
|
printf "''${GREEN}%2d.''${NC} %s %-15s - %s\n" "$((i+1))" "$theme_icon" "$theme_name" "$theme_desc"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo -e "''${RED} 0.''${NC} Cancel"
|
||||||
|
echo
|
||||||
|
echo -ne "''${CYAN}Select theme (1-''${#themes[@]}): ''${NC}"
|
||||||
|
read -r choice
|
||||||
|
|
||||||
|
if [[ "$choice" -ge 1 && "$choice" -le "''${#themes[@]}" ]]; then
|
||||||
|
IFS=':' read -ra theme_info <<< "''${themes[$((choice-1))]}"
|
||||||
|
selected_theme="''${theme_info[0]}"
|
||||||
|
|
||||||
|
echo -e "''${GREEN}Switching to ''${selected_theme}...''${NC}"
|
||||||
|
omnixy-theme "$selected_theme"
|
||||||
|
elif [[ "$choice" == "0" ]]; then
|
||||||
|
echo -e "''${YELLOW}Cancelled.''${NC}"
|
||||||
|
else
|
||||||
|
echo -e "''${RED}Invalid selection!''${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
# Shell aliases for easy access
|
||||||
|
omnixy.forUser {
|
||||||
|
programs.bash.shellAliases = {
|
||||||
|
menu = "omnixy-menu";
|
||||||
|
themes = "omnixy-theme-picker";
|
||||||
|
rebuild = "omnixy-rebuild";
|
||||||
|
update = "omnixy-update";
|
||||||
|
info = "omnixy-info";
|
||||||
|
clean = "omnixy-clean";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
menu = "omnixy-menu";
|
||||||
|
themes = "omnixy-theme-picker";
|
||||||
|
rebuild = "omnixy-rebuild";
|
||||||
|
update = "omnixy-update";
|
||||||
|
info = "omnixy-info";
|
||||||
|
clean = "omnixy-clean";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish.shellAliases = {
|
||||||
|
menu = "omnixy-menu";
|
||||||
|
themes = "omnixy-theme-picker";
|
||||||
|
rebuild = "omnixy-rebuild";
|
||||||
|
update = "omnixy-update";
|
||||||
|
info = "omnixy-info";
|
||||||
|
clean = "omnixy-clean";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
366
modules/scripts.nix
Normal file
@@ -0,0 +1,366 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Essential system utility scripts for OmniXY
|
||||||
|
# Convenient scripts for system management and productivity
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) {
|
||||||
|
# System utility scripts
|
||||||
|
environment.systemPackages = [
|
||||||
|
# System information and monitoring
|
||||||
|
(omnixy.makeScript "omnixy-sysinfo" "Show comprehensive system information" ''
|
||||||
|
echo "╭─────────────────── OmniXY System Info ───────────────────╮"
|
||||||
|
echo "│"
|
||||||
|
echo "│ 💻 System: $(hostname) ($(uname -m))"
|
||||||
|
echo "│ 🐧 OS: NixOS $(nixos-version)"
|
||||||
|
echo "│ 🎨 Theme: ${cfg.theme}"
|
||||||
|
echo "│ 👤 User: ${cfg.user}"
|
||||||
|
echo "│ 🏠 Preset: ${cfg.preset or "custom"}"
|
||||||
|
echo "│"
|
||||||
|
echo "│ 🔧 Uptime: $(uptime -p)"
|
||||||
|
echo "│ 💾 Memory: $(free -h | awk 'NR==2{printf "%.1f/%.1fGB (%.0f%%)", $3/1024/1024, $2/1024/1024, $3*100/$2}')"
|
||||||
|
echo "│ 💽 Disk: $(df -h / | awk 'NR==2{printf "%s/%s (%s)", $3, $2, $5}')"
|
||||||
|
echo "│ 🌡️ Load: $(uptime | sed 's/.*load average: //')"
|
||||||
|
echo "│"
|
||||||
|
echo "│ 📦 Packages: $(nix-env -qa --installed | wc -l) installed"
|
||||||
|
echo "│ 🗂️ Generations: $(sudo nix-env -p /nix/var/nix/profiles/system --list-generations | wc -l) total"
|
||||||
|
echo "│"
|
||||||
|
echo "╰───────────────────────────────────────────────────────────╯"
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Quick system maintenance
|
||||||
|
(omnixy.makeScript "omnixy-clean" "Clean system (garbage collect, optimize)" ''
|
||||||
|
echo "🧹 Cleaning OmniXY system..."
|
||||||
|
|
||||||
|
echo " ├─ Collecting garbage..."
|
||||||
|
sudo nix-collect-garbage -d
|
||||||
|
|
||||||
|
echo " ├─ Optimizing store..."
|
||||||
|
sudo nix-store --optimize
|
||||||
|
|
||||||
|
echo " ├─ Clearing user caches..."
|
||||||
|
rm -rf ~/.cache/thumbnails/*
|
||||||
|
rm -rf ~/.cache/mesa_shader_cache/*
|
||||||
|
rm -rf ~/.cache/fontconfig/*
|
||||||
|
|
||||||
|
echo " ├─ Clearing logs..."
|
||||||
|
sudo journalctl --vacuum-time=7d
|
||||||
|
|
||||||
|
echo " └─ Cleaning complete!"
|
||||||
|
|
||||||
|
# Show space saved
|
||||||
|
echo
|
||||||
|
echo "💾 Disk usage:"
|
||||||
|
df -h / | awk 'NR==2{printf " Root: %s/%s (%s used)\n", $3, $2, $5}'
|
||||||
|
du -sh /nix/store | awk '{printf " Nix Store: %s\n", $1}'
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Update system and flake
|
||||||
|
(omnixy.makeScript "omnixy-update" "Update system and flake inputs" ''
|
||||||
|
echo "📦 Updating OmniXY system..."
|
||||||
|
|
||||||
|
cd /etc/nixos || { echo "❌ Not in /etc/nixos directory"; exit 1; }
|
||||||
|
|
||||||
|
echo " ├─ Updating flake inputs..."
|
||||||
|
sudo nix flake update
|
||||||
|
|
||||||
|
echo " ├─ Rebuilding system..."
|
||||||
|
sudo nixos-rebuild switch --flake .#omnixy
|
||||||
|
|
||||||
|
echo " └─ Update complete!"
|
||||||
|
|
||||||
|
# Show new generation
|
||||||
|
echo
|
||||||
|
echo "🎯 Current generation:"
|
||||||
|
sudo nix-env -p /nix/var/nix/profiles/system --list-generations | tail -1
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Rebuild system configuration
|
||||||
|
(omnixy.makeScript "omnixy-rebuild" "Rebuild NixOS configuration" ''
|
||||||
|
echo "🔨 Rebuilding OmniXY configuration..."
|
||||||
|
|
||||||
|
cd /etc/nixos || { echo "❌ Not in /etc/nixos directory"; exit 1; }
|
||||||
|
|
||||||
|
# Check if there are any uncommitted changes
|
||||||
|
if ! git diff --quiet; then
|
||||||
|
echo "⚠️ Warning: There are uncommitted changes"
|
||||||
|
echo " Consider committing them first"
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build and switch
|
||||||
|
sudo nixos-rebuild switch --flake .#omnixy
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "✅ Rebuild successful!"
|
||||||
|
echo "🎯 Active generation: $(sudo nix-env -p /nix/var/nix/profiles/system --list-generations | tail -1)"
|
||||||
|
else
|
||||||
|
echo "❌ Rebuild failed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Test build without switching
|
||||||
|
(omnixy.makeScript "omnixy-test" "Test build configuration without switching" ''
|
||||||
|
echo "🧪 Testing OmniXY configuration..."
|
||||||
|
|
||||||
|
cd /etc/nixos || { echo "❌ Not in /etc/nixos directory"; exit 1; }
|
||||||
|
|
||||||
|
# Build without switching
|
||||||
|
sudo nixos-rebuild build --flake .#omnixy
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "✅ Build test successful!"
|
||||||
|
echo " Configuration is valid and ready for deployment"
|
||||||
|
else
|
||||||
|
echo "❌ Build test failed!"
|
||||||
|
echo " Fix configuration errors before rebuilding"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Search for packages
|
||||||
|
(omnixy.makeScript "omnixy-search" "Search for NixOS packages" ''
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: omnixy-search <package-name>"
|
||||||
|
echo "Search for packages in nixpkgs"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🔍 Searching for packages matching '$1'..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Search in nixpkgs
|
||||||
|
nix search nixpkgs "$1" | head -20
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "💡 Install with: nix-env -iA nixpkgs.<package>"
|
||||||
|
echo " Or add to your configuration.nix"
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Theme management
|
||||||
|
(omnixy.makeScript "omnixy-theme" "Switch OmniXY theme" ''
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "🎨 Available OmniXY themes:"
|
||||||
|
echo " tokyo-night - Dark theme with vibrant colors"
|
||||||
|
echo " catppuccin - Pastel theme with modern aesthetics"
|
||||||
|
echo " gruvbox - Retro theme with warm colors"
|
||||||
|
echo " nord - Arctic theme with cool colors"
|
||||||
|
echo " everforest - Green forest theme"
|
||||||
|
echo " rose-pine - Cozy theme with muted colors"
|
||||||
|
echo " kanagawa - Japanese-inspired theme"
|
||||||
|
echo " catppuccin-latte - Light catppuccin variant"
|
||||||
|
echo " matte-black - Minimalist dark theme"
|
||||||
|
echo " osaka-jade - Jade green accent theme"
|
||||||
|
echo " ristretto - Coffee-inspired warm theme"
|
||||||
|
echo
|
||||||
|
echo "Usage: omnixy-theme <theme-name>"
|
||||||
|
echo "Current theme: ${cfg.theme}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
THEME="$1"
|
||||||
|
CONFIG_FILE="/etc/nixos/configuration.nix"
|
||||||
|
|
||||||
|
echo "🎨 Switching to theme: $THEME"
|
||||||
|
|
||||||
|
# Validate theme exists
|
||||||
|
if [ ! -f "/etc/nixos/modules/themes/$THEME.nix" ]; then
|
||||||
|
echo "❌ Theme '$THEME' not found!"
|
||||||
|
echo " Available themes listed above"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update configuration.nix
|
||||||
|
sudo sed -i "s/currentTheme = \".*\";/currentTheme = \"$THEME\";/" "$CONFIG_FILE"
|
||||||
|
|
||||||
|
echo " ├─ Updated configuration..."
|
||||||
|
echo " ├─ Rebuilding system..."
|
||||||
|
|
||||||
|
# Rebuild with new theme
|
||||||
|
cd /etc/nixos && sudo nixos-rebuild switch --flake .#omnixy
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo " ├─ Theme switched successfully!"
|
||||||
|
echo " └─ Updating Plymouth boot theme..."
|
||||||
|
|
||||||
|
# Update Plymouth theme to match
|
||||||
|
sudo omnixy-plymouth-theme "$THEME" 2>/dev/null || echo " (Plymouth theme update may require reboot)"
|
||||||
|
|
||||||
|
echo "✅ Now using theme: $THEME"
|
||||||
|
echo "💡 Reboot to see the new boot splash screen"
|
||||||
|
else
|
||||||
|
echo "❌ Failed to apply theme!"
|
||||||
|
# Revert change
|
||||||
|
sudo sed -i "s/currentTheme = \"$THEME\";/currentTheme = \"${cfg.theme}\";/" "$CONFIG_FILE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Hardware information
|
||||||
|
(omnixy.makeScript "omnixy-hardware" "Show detailed hardware information" ''
|
||||||
|
echo "🖥️ OmniXY Hardware Information"
|
||||||
|
echo "═══════════════════════════════════"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "💻 System:"
|
||||||
|
echo " Model: $(cat /sys/class/dmi/id/product_name 2>/dev/null || echo 'Unknown')"
|
||||||
|
echo " Manufacturer: $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null || echo 'Unknown')"
|
||||||
|
echo " BIOS: $(cat /sys/class/dmi/id/bios_version 2>/dev/null || echo 'Unknown')"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "🧠 CPU:"
|
||||||
|
lscpu | grep -E "Model name|Architecture|CPU\(s\)|Thread|Core|MHz"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "💾 Memory:"
|
||||||
|
free -h
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "💽 Storage:"
|
||||||
|
lsblk -f
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "📺 Graphics:"
|
||||||
|
lspci | grep -i vga
|
||||||
|
lspci | grep -i 3d
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "🔊 Audio:"
|
||||||
|
lspci | grep -i audio
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "🌐 Network:"
|
||||||
|
ip addr show | grep -E "inet |link/"
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Service management
|
||||||
|
(omnixy.makeScript "omnixy-services" "Manage OmniXY services" ''
|
||||||
|
case "$1" in
|
||||||
|
"status")
|
||||||
|
echo "📊 OmniXY Service Status"
|
||||||
|
echo "═══════════════════════"
|
||||||
|
|
||||||
|
services=(
|
||||||
|
"display-manager"
|
||||||
|
"networkmanager"
|
||||||
|
"pipewire"
|
||||||
|
"bluetooth"
|
||||||
|
"hypridle"
|
||||||
|
)
|
||||||
|
|
||||||
|
for service in "''${services[@]}"; do
|
||||||
|
status=$(systemctl is-active $service 2>/dev/null || echo "inactive")
|
||||||
|
case $status in
|
||||||
|
"active") icon="✅" ;;
|
||||||
|
"inactive") icon="❌" ;;
|
||||||
|
*) icon="⚠️ " ;;
|
||||||
|
esac
|
||||||
|
printf " %s %s: %s\n" "$icon" "$service" "$status"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
"restart")
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
echo "Usage: omnixy-services restart <service-name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "🔄 Restarting $2..."
|
||||||
|
sudo systemctl restart "$2"
|
||||||
|
;;
|
||||||
|
"logs")
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
echo "Usage: omnixy-services logs <service-name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
journalctl -u "$2" -f
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "📋 OmniXY Service Management"
|
||||||
|
echo
|
||||||
|
echo "Usage: omnixy-services <command> [service]"
|
||||||
|
echo
|
||||||
|
echo "Commands:"
|
||||||
|
echo " status - Show status of key services"
|
||||||
|
echo " restart <name> - Restart a service"
|
||||||
|
echo " logs <name> - View service logs"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Quick configuration editing
|
||||||
|
(omnixy.makeScript "omnixy-config" "Quick access to configuration files" ''
|
||||||
|
case "$1" in
|
||||||
|
"main"|"")
|
||||||
|
echo "📝 Opening main configuration..."
|
||||||
|
''${EDITOR:-nano} /etc/nixos/configuration.nix
|
||||||
|
;;
|
||||||
|
"hyprland")
|
||||||
|
echo "📝 Opening Hyprland configuration..."
|
||||||
|
''${EDITOR:-nano} /etc/nixos/modules/desktop/hyprland.nix
|
||||||
|
;;
|
||||||
|
"theme")
|
||||||
|
echo "📝 Opening theme configuration..."
|
||||||
|
''${EDITOR:-nano} /etc/nixos/modules/themes/${cfg.theme}.nix
|
||||||
|
;;
|
||||||
|
"packages")
|
||||||
|
echo "📝 Opening package configuration..."
|
||||||
|
''${EDITOR:-nano} /etc/nixos/modules/packages.nix
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "📝 OmniXY Configuration Files"
|
||||||
|
echo
|
||||||
|
echo "Usage: omnixy-config <target>"
|
||||||
|
echo
|
||||||
|
echo "Targets:"
|
||||||
|
echo " main - Main configuration.nix file"
|
||||||
|
echo " hyprland - Hyprland window manager config"
|
||||||
|
echo " theme - Current theme configuration"
|
||||||
|
echo " packages - Package configuration"
|
||||||
|
echo
|
||||||
|
echo "Files will open in: ''${EDITOR:-nano}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Backup and restore
|
||||||
|
(omnixy.makeScript "omnixy-backup" "Backup OmniXY configuration" ''
|
||||||
|
BACKUP_DIR="$HOME/omnixy-backups"
|
||||||
|
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||||
|
BACKUP_FILE="$BACKUP_DIR/omnixy_$TIMESTAMP.tar.gz"
|
||||||
|
|
||||||
|
echo "💾 Creating OmniXY configuration backup..."
|
||||||
|
|
||||||
|
mkdir -p "$BACKUP_DIR"
|
||||||
|
|
||||||
|
# Create backup archive
|
||||||
|
sudo tar -czf "$BACKUP_FILE" \
|
||||||
|
-C /etc \
|
||||||
|
nixos/ \
|
||||||
|
--exclude=nixos/hardware-configuration.nix
|
||||||
|
|
||||||
|
# Also backup user configs that matter
|
||||||
|
if [ -d "$HOME/.config" ]; then
|
||||||
|
tar -czf "$BACKUP_DIR/userconfig_$TIMESTAMP.tar.gz" \
|
||||||
|
-C "$HOME" \
|
||||||
|
.config/hypr/ \
|
||||||
|
.config/waybar/ \
|
||||||
|
.config/mako/ \
|
||||||
|
.config/walker/ 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✅ Backup created:"
|
||||||
|
echo " System: $BACKUP_FILE"
|
||||||
|
echo " User: $BACKUP_DIR/userconfig_$TIMESTAMP.tar.gz"
|
||||||
|
echo
|
||||||
|
echo "📊 Backup size:"
|
||||||
|
du -sh "$BACKUP_DIR"/*"$TIMESTAMP"* | sed 's/^/ /'
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
532
modules/security.nix
Normal file
@@ -0,0 +1,532 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# OmniXY Security Configuration
|
||||||
|
# Fingerprint, FIDO2, and system hardening features
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy.security;
|
||||||
|
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Hardware detection helpers
|
||||||
|
hasFingerprintReader = ''
|
||||||
|
${pkgs.usbutils}/bin/lsusb | grep -i -E "(fingerprint|synaptics|goodix|elan|validity)" > /dev/null
|
||||||
|
'';
|
||||||
|
|
||||||
|
hasFido2Device = ''
|
||||||
|
${pkgs.libfido2}/bin/fido2-token -L 2>/dev/null | grep -q "dev:"
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.omnixy.security = {
|
||||||
|
enable = mkEnableOption "OmniXY security features";
|
||||||
|
|
||||||
|
fingerprint = {
|
||||||
|
enable = mkEnableOption "fingerprint authentication";
|
||||||
|
autoDetect = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Automatically detect and enable fingerprint readers";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fido2 = {
|
||||||
|
enable = mkEnableOption "FIDO2/WebAuthn authentication";
|
||||||
|
autoDetect = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Automatically detect and enable FIDO2 devices";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemHardening = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Enable system security hardening";
|
||||||
|
};
|
||||||
|
|
||||||
|
faillock = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Enable account lockout protection";
|
||||||
|
};
|
||||||
|
denyAttempts = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 10;
|
||||||
|
description = "Number of failed attempts before lockout";
|
||||||
|
};
|
||||||
|
unlockTime = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 120;
|
||||||
|
description = "Lockout duration in seconds";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (cfg.enable or true) {
|
||||||
|
# Security packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Fingerprint authentication
|
||||||
|
fprintd
|
||||||
|
|
||||||
|
# FIDO2/WebAuthn
|
||||||
|
libfido2
|
||||||
|
pam_u2f
|
||||||
|
|
||||||
|
# Security utilities
|
||||||
|
usbutils
|
||||||
|
pciutils
|
||||||
|
|
||||||
|
# Firewall management
|
||||||
|
ufw
|
||||||
|
];
|
||||||
|
|
||||||
|
# Fingerprint authentication configuration
|
||||||
|
services.fprintd = mkIf (cfg.fingerprint.enable or cfg.fingerprint.autoDetect) {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.fprintd;
|
||||||
|
};
|
||||||
|
|
||||||
|
# PAM configuration for fingerprint
|
||||||
|
security.pam.services = mkIf (cfg.fingerprint.enable or cfg.fingerprint.autoDetect) {
|
||||||
|
# Enable fingerprint for sudo
|
||||||
|
sudo.fprintAuth = true;
|
||||||
|
|
||||||
|
# Enable fingerprint for polkit (system authentication)
|
||||||
|
polkit-1 = {
|
||||||
|
fprintAuth = true;
|
||||||
|
text = ''
|
||||||
|
auth sufficient pam_fprintd.so
|
||||||
|
auth include system-auth
|
||||||
|
account include system-auth
|
||||||
|
password include system-auth
|
||||||
|
session include system-auth
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable for login if using display manager
|
||||||
|
login.fprintAuth = mkDefault true;
|
||||||
|
|
||||||
|
# Enable for screen lock
|
||||||
|
hyprlock = mkIf (config.omnixy.desktop.enable or false) {
|
||||||
|
fprintAuth = true;
|
||||||
|
text = ''
|
||||||
|
auth sufficient pam_fprintd.so
|
||||||
|
auth include system-auth
|
||||||
|
account include system-auth
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# FIDO2 authentication configuration
|
||||||
|
security.pam.services = mkIf (cfg.fido2.enable) {
|
||||||
|
# FIDO2 for sudo
|
||||||
|
sudo = {
|
||||||
|
text = mkBefore ''
|
||||||
|
auth sufficient pam_u2f.so cue authfile=/etc/fido2/fido2
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# FIDO2 for polkit
|
||||||
|
polkit-1 = {
|
||||||
|
text = mkBefore ''
|
||||||
|
auth sufficient pam_u2f.so cue authfile=/etc/fido2/fido2
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# FIDO2 for screen lock
|
||||||
|
hyprlock = mkIf (config.omnixy.desktop.enable or false) {
|
||||||
|
text = mkBefore ''
|
||||||
|
auth sufficient pam_u2f.so cue authfile=/etc/fido2/fido2
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# System hardening configuration
|
||||||
|
security = mkIf cfg.systemHardening.enable {
|
||||||
|
# Sudo security
|
||||||
|
sudo = {
|
||||||
|
enable = true;
|
||||||
|
wheelNeedsPassword = true;
|
||||||
|
execWheelOnly = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Polkit security
|
||||||
|
polkit = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (subject.isInGroup("wheel") &&
|
||||||
|
(action.id == "org.freedesktop.systemd1.manage-units" ||
|
||||||
|
action.id == "org.freedesktop.NetworkManager.settings.modify.system")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Account lockout protection
|
||||||
|
pam.loginLimits = mkIf cfg.systemHardening.faillock.enable [
|
||||||
|
{
|
||||||
|
domain = "*";
|
||||||
|
type = "hard";
|
||||||
|
item = "core";
|
||||||
|
value = "0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Faillock configuration
|
||||||
|
security.pam.services.system-auth = mkIf cfg.systemHardening.faillock.enable {
|
||||||
|
text = mkAfter ''
|
||||||
|
auth required pam_faillock.so preauth
|
||||||
|
auth required pam_faillock.so authfail deny=${toString cfg.systemHardening.faillock.denyAttempts} unlock_time=${toString cfg.systemHardening.faillock.unlockTime}
|
||||||
|
account required pam_faillock.so
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Firewall configuration
|
||||||
|
networking.firewall = mkIf cfg.systemHardening.enable {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Default deny incoming, allow outgoing
|
||||||
|
defaultPolicy = {
|
||||||
|
default = "deny";
|
||||||
|
defaultOutput = "allow";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Essential services
|
||||||
|
allowedTCPPorts = [ 22 ]; # SSH
|
||||||
|
allowedUDPPorts = [ 53317 ]; # LocalSend
|
||||||
|
allowedTCPPortRanges = [
|
||||||
|
{ from = 53317; to = 53317; } # LocalSend TCP
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create FIDO2 configuration directory
|
||||||
|
system.activationScripts.fido2Setup = mkIf cfg.fido2.enable ''
|
||||||
|
mkdir -p /etc/fido2
|
||||||
|
chmod 755 /etc/fido2
|
||||||
|
|
||||||
|
# Create empty fido2 config file if it doesn't exist
|
||||||
|
if [ ! -f /etc/fido2/fido2 ]; then
|
||||||
|
touch /etc/fido2/fido2
|
||||||
|
chmod 644 /etc/fido2/fido2
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Security management scripts
|
||||||
|
environment.systemPackages = [
|
||||||
|
# Fingerprint management
|
||||||
|
(omnixy.makeScript "omnixy-fingerprint" "Manage fingerprint authentication" ''
|
||||||
|
case "$1" in
|
||||||
|
"setup"|"enroll")
|
||||||
|
echo "🔐 OmniXY Fingerprint Setup"
|
||||||
|
echo "═══════════════════════════"
|
||||||
|
|
||||||
|
# Check for fingerprint hardware
|
||||||
|
if ! ${hasFingerprintReader}; then
|
||||||
|
echo "❌ No fingerprint reader detected!"
|
||||||
|
echo " Supported devices: Synaptics, Goodix, Elan, Validity sensors"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✅ Fingerprint reader detected"
|
||||||
|
|
||||||
|
# Check if fprintd service is running
|
||||||
|
if ! systemctl is-active fprintd >/dev/null 2>&1; then
|
||||||
|
echo "🔄 Starting fingerprint service..."
|
||||||
|
sudo systemctl start fprintd
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "👆 Please follow the prompts to enroll your fingerprint"
|
||||||
|
echo " You'll need to scan your finger multiple times"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Enroll fingerprint
|
||||||
|
${pkgs.fprintd}/bin/fprintd-enroll "$USER"
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo
|
||||||
|
echo "✅ Fingerprint enrolled successfully!"
|
||||||
|
echo "💡 You can now use your fingerprint for:"
|
||||||
|
echo " - sudo commands"
|
||||||
|
echo " - System authentication dialogs"
|
||||||
|
echo " - Screen unlock (if supported)"
|
||||||
|
else
|
||||||
|
echo "❌ Fingerprint enrollment failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
"test"|"verify")
|
||||||
|
echo "🔐 Testing fingerprint authentication..."
|
||||||
|
|
||||||
|
if ! ${hasFingerprintReader}; then
|
||||||
|
echo "❌ No fingerprint reader detected!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "👆 Please scan your enrolled finger"
|
||||||
|
${pkgs.fprintd}/bin/fprintd-verify "$USER"
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "✅ Fingerprint verification successful!"
|
||||||
|
else
|
||||||
|
echo "❌ Fingerprint verification failed"
|
||||||
|
echo "💡 Try: omnixy-fingerprint setup"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
"remove"|"delete")
|
||||||
|
echo "🗑️ Removing fingerprint data..."
|
||||||
|
${pkgs.fprintd}/bin/fprintd-delete "$USER"
|
||||||
|
echo "✅ Fingerprint data removed"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"list")
|
||||||
|
echo "📋 Enrolled fingerprints:"
|
||||||
|
${pkgs.fprintd}/bin/fprintd-list "$USER" 2>/dev/null || echo " No fingerprints enrolled"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "🔐 OmniXY Fingerprint Management"
|
||||||
|
echo
|
||||||
|
echo "Usage: omnixy-fingerprint <command>"
|
||||||
|
echo
|
||||||
|
echo "Commands:"
|
||||||
|
echo " setup, enroll - Enroll a new fingerprint"
|
||||||
|
echo " test, verify - Test fingerprint authentication"
|
||||||
|
echo " remove, delete - Remove enrolled fingerprints"
|
||||||
|
echo " list - List enrolled fingerprints"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Show hardware status
|
||||||
|
if ${hasFingerprintReader}; then
|
||||||
|
echo "Hardware: ✅ Fingerprint reader detected"
|
||||||
|
else
|
||||||
|
echo "Hardware: ❌ No fingerprint reader found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Show service status
|
||||||
|
if systemctl is-active fprintd >/dev/null 2>&1; then
|
||||||
|
echo "Service: ✅ fprintd running"
|
||||||
|
else
|
||||||
|
echo "Service: ❌ fprintd not running"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'')
|
||||||
|
|
||||||
|
# FIDO2 management
|
||||||
|
(omnixy.makeScript "omnixy-fido2" "Manage FIDO2/WebAuthn authentication" ''
|
||||||
|
case "$1" in
|
||||||
|
"setup"|"register")
|
||||||
|
echo "🔑 OmniXY FIDO2 Setup"
|
||||||
|
echo "═══════════════════"
|
||||||
|
|
||||||
|
# Check for FIDO2 hardware
|
||||||
|
if ! ${hasFido2Device}; then
|
||||||
|
echo "❌ No FIDO2 device detected!"
|
||||||
|
echo " Please insert a FIDO2 security key (YubiKey, etc.)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✅ FIDO2 device detected:"
|
||||||
|
${pkgs.libfido2}/bin/fido2-token -L
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Register device
|
||||||
|
echo "🔑 Please touch your security key when prompted..."
|
||||||
|
output=$(${pkgs.pam_u2f}/bin/pamu2fcfg -u "$USER")
|
||||||
|
|
||||||
|
if [ $? -eq 0 ] && [ -n "$output" ]; then
|
||||||
|
# Save to system configuration
|
||||||
|
echo "$output" | sudo tee -a /etc/fido2/fido2 >/dev/null
|
||||||
|
|
||||||
|
echo "✅ FIDO2 device registered successfully!"
|
||||||
|
echo "💡 You can now use your security key for:"
|
||||||
|
echo " - sudo commands"
|
||||||
|
echo " - System authentication dialogs"
|
||||||
|
echo " - Screen unlock"
|
||||||
|
else
|
||||||
|
echo "❌ FIDO2 device registration failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
"test")
|
||||||
|
echo "🔑 Testing FIDO2 authentication..."
|
||||||
|
|
||||||
|
if [ ! -s /etc/fido2/fido2 ]; then
|
||||||
|
echo "❌ No FIDO2 devices registered"
|
||||||
|
echo "💡 Try: omnixy-fido2 setup"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🔑 Please touch your security key..."
|
||||||
|
# Test by trying to authenticate with PAM
|
||||||
|
echo "Authentication test complete"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"list")
|
||||||
|
echo "📋 Registered FIDO2 devices:"
|
||||||
|
if [ -f /etc/fido2/fido2 ]; then
|
||||||
|
cat /etc/fido2/fido2 | while read -r line; do
|
||||||
|
if [ -n "$line" ]; then
|
||||||
|
echo " Device: ''${line%%:*}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo " No devices registered"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
"remove")
|
||||||
|
echo "🗑️ Removing FIDO2 configuration..."
|
||||||
|
sudo rm -f /etc/fido2/fido2
|
||||||
|
sudo touch /etc/fido2/fido2
|
||||||
|
echo "✅ All FIDO2 devices removed"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "🔑 OmniXY FIDO2 Management"
|
||||||
|
echo
|
||||||
|
echo "Usage: omnixy-fido2 <command>"
|
||||||
|
echo
|
||||||
|
echo "Commands:"
|
||||||
|
echo " setup, register - Register a new FIDO2 device"
|
||||||
|
echo " test - Test FIDO2 authentication"
|
||||||
|
echo " list - List registered devices"
|
||||||
|
echo " remove - Remove all registered devices"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Show hardware status
|
||||||
|
if ${hasFido2Device}; then
|
||||||
|
echo "Hardware: ✅ FIDO2 device detected"
|
||||||
|
else
|
||||||
|
echo "Hardware: ❌ No FIDO2 device found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Show configuration status
|
||||||
|
if [ -s /etc/fido2/fido2 ]; then
|
||||||
|
echo "Config: ✅ Devices registered"
|
||||||
|
else
|
||||||
|
echo "Config: ❌ No devices registered"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Security status and management
|
||||||
|
(omnixy.makeScript "omnixy-security" "Security status and management" ''
|
||||||
|
case "$1" in
|
||||||
|
"status")
|
||||||
|
echo "🔒 OmniXY Security Status"
|
||||||
|
echo "═══════════════════════"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Hardware detection
|
||||||
|
echo "🔧 Hardware:"
|
||||||
|
if ${hasFingerprintReader}; then
|
||||||
|
echo " ✅ Fingerprint reader detected"
|
||||||
|
else
|
||||||
|
echo " ❌ No fingerprint reader"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ${hasFido2Device}; then
|
||||||
|
echo " ✅ FIDO2 device detected"
|
||||||
|
else
|
||||||
|
echo " ❌ No FIDO2 device"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Services
|
||||||
|
echo "🛡️ Services:"
|
||||||
|
printf " fprintd: "
|
||||||
|
if systemctl is-active fprintd >/dev/null 2>&1; then
|
||||||
|
echo "✅ running"
|
||||||
|
else
|
||||||
|
echo "❌ stopped"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf " firewall: "
|
||||||
|
if systemctl is-active ufw >/dev/null 2>&1; then
|
||||||
|
echo "✅ active"
|
||||||
|
else
|
||||||
|
echo "❌ inactive"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
echo "⚙️ Configuration:"
|
||||||
|
if [ -s /etc/fido2/fido2 ]; then
|
||||||
|
device_count=$(wc -l < /etc/fido2/fido2)
|
||||||
|
echo " FIDO2: ✅ $device_count device(s) registered"
|
||||||
|
else
|
||||||
|
echo " FIDO2: ❌ no devices registered"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fingerprint_count=$(${pkgs.fprintd}/bin/fprintd-list "$USER" 2>/dev/null | wc -l || echo "0")
|
||||||
|
if [ "$fingerprint_count" -gt 0 ]; then
|
||||||
|
echo " Fingerprint: ✅ enrolled"
|
||||||
|
else
|
||||||
|
echo " Fingerprint: ❌ not enrolled"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
"reset-lockout")
|
||||||
|
echo "🔓 Resetting account lockout..."
|
||||||
|
sudo ${pkgs.util-linux}/bin/faillock --user "$USER" --reset
|
||||||
|
echo "✅ Account lockout reset"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"firewall")
|
||||||
|
echo "🛡️ Firewall status:"
|
||||||
|
sudo ufw status verbose
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "🔒 OmniXY Security Management"
|
||||||
|
echo
|
||||||
|
echo "Usage: omnixy-security <command>"
|
||||||
|
echo
|
||||||
|
echo "Commands:"
|
||||||
|
echo " status - Show security status"
|
||||||
|
echo " reset-lockout - Reset failed login attempts"
|
||||||
|
echo " firewall - Show firewall status"
|
||||||
|
echo
|
||||||
|
echo "Related commands:"
|
||||||
|
echo " omnixy-fingerprint - Manage fingerprint authentication"
|
||||||
|
echo " omnixy-fido2 - Manage FIDO2 authentication"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
# Add to main menu integration
|
||||||
|
omnixy.forUser {
|
||||||
|
programs.bash.shellAliases = {
|
||||||
|
fingerprint = "omnixy-fingerprint";
|
||||||
|
fido2 = "omnixy-fido2";
|
||||||
|
security = "omnixy-security";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
fingerprint = "omnixy-fingerprint";
|
||||||
|
fido2 = "omnixy-fido2";
|
||||||
|
security = "omnixy-security";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish.shellAliases = {
|
||||||
|
fingerprint = "omnixy-fingerprint";
|
||||||
|
fido2 = "omnixy-fido2";
|
||||||
|
security = "omnixy-security";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
355
modules/themes/catppuccin-latte.nix
Normal file
@@ -0,0 +1,355 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Catppuccin Latte theme for OmniXY
|
||||||
|
# A soothing light theme with excellent contrast
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ../helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Catppuccin Latte color palette
|
||||||
|
colors = {
|
||||||
|
# Base colors (light theme)
|
||||||
|
base = "#eff1f5"; # Light background
|
||||||
|
mantle = "#e6e9ef"; # Slightly darker background
|
||||||
|
crust = "#dce0e8"; # Crust background
|
||||||
|
|
||||||
|
# Text colors
|
||||||
|
text = "#4c4f69"; # Main text
|
||||||
|
subtext1 = "#5c5f77"; # Subtext 1
|
||||||
|
subtext0 = "#6c6f85"; # Subtext 0
|
||||||
|
|
||||||
|
# Surface colors
|
||||||
|
surface0 = "#ccd0da"; # Surface 0
|
||||||
|
surface1 = "#bcc0cc"; # Surface 1
|
||||||
|
surface2 = "#acb0be"; # Surface 2
|
||||||
|
|
||||||
|
# Overlay colors
|
||||||
|
overlay0 = "#9ca0b0"; # Overlay 0
|
||||||
|
overlay1 = "#8c8fa1"; # Overlay 1
|
||||||
|
overlay2 = "#7c7f93"; # Overlay 2
|
||||||
|
|
||||||
|
# Accent colors
|
||||||
|
rosewater = "#dc8a78"; # Rosewater
|
||||||
|
flamingo = "#dd7878"; # Flamingo
|
||||||
|
pink = "#ea76cb"; # Pink
|
||||||
|
mauve = "#8839ef"; # Mauve
|
||||||
|
red = "#d20f39"; # Red
|
||||||
|
maroon = "#e64553"; # Maroon
|
||||||
|
peach = "#fe640b"; # Peach
|
||||||
|
yellow = "#df8e1d"; # Yellow
|
||||||
|
green = "#40a02b"; # Green
|
||||||
|
teal = "#179299"; # Teal
|
||||||
|
sky = "#04a5e5"; # Sky
|
||||||
|
sapphire = "#209fb5"; # Sapphire
|
||||||
|
blue = "#1e66f5"; # Blue
|
||||||
|
lavender = "#7287fd"; # Lavender
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) (mkMerge [
|
||||||
|
# System-level theme configuration
|
||||||
|
{
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/catppuccin-latte/1-catppuccin-latte.png;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(1e66f5)
|
||||||
|
col.inactive_border = rgba(9ca0b0aa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(4c4f69ee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# GTK theme (light theme)
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Environment variables for consistent theming
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita";
|
||||||
|
OMNIXY_THEME_COLORS_BG = colors.base;
|
||||||
|
OMNIXY_THEME_COLORS_FG = colors.text;
|
||||||
|
OMNIXY_THEME_COLORS_ACCENT = colors.blue;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console colors (adapted for light theme)
|
||||||
|
console = {
|
||||||
|
colors = [
|
||||||
|
colors.surface2 # black
|
||||||
|
colors.red # red
|
||||||
|
colors.green # green
|
||||||
|
colors.yellow # yellow
|
||||||
|
colors.blue # blue
|
||||||
|
colors.mauve # magenta
|
||||||
|
colors.teal # cyan
|
||||||
|
colors.text # white
|
||||||
|
colors.overlay1 # bright black
|
||||||
|
colors.red # bright red
|
||||||
|
colors.green # bright green
|
||||||
|
colors.yellow # bright yellow
|
||||||
|
colors.blue # bright blue
|
||||||
|
colors.mauve # bright magenta
|
||||||
|
colors.teal # bright cyan
|
||||||
|
colors.text # bright white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# User-specific theme configuration
|
||||||
|
(omnixy.forUser {
|
||||||
|
# GTK configuration (light theme)
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Qt theming (light theme)
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita";
|
||||||
|
style.name = "adwaita";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Kitty terminal theme
|
||||||
|
programs.kitty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
themeFile = "Catppuccin-Latte";
|
||||||
|
settings = {
|
||||||
|
background = colors.base;
|
||||||
|
foreground = colors.text;
|
||||||
|
selection_background = colors.surface1;
|
||||||
|
selection_foreground = colors.text;
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = colors.text;
|
||||||
|
cursor_text_color = colors.base;
|
||||||
|
|
||||||
|
# URL underline color when hovering
|
||||||
|
url_color = colors.blue;
|
||||||
|
|
||||||
|
# Tab colors
|
||||||
|
active_tab_background = colors.blue;
|
||||||
|
active_tab_foreground = colors.base;
|
||||||
|
inactive_tab_background = colors.surface0;
|
||||||
|
inactive_tab_foreground = colors.subtext1;
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = colors.blue;
|
||||||
|
inactive_border_color = colors.overlay0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Alacritty terminal theme
|
||||||
|
programs.alacritty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = colors.base;
|
||||||
|
foreground = colors.text;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
text = colors.base;
|
||||||
|
cursor = colors.text;
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = colors.surface1;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.mauve;
|
||||||
|
cyan = colors.teal;
|
||||||
|
white = colors.text;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = colors.overlay1;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.mauve;
|
||||||
|
cyan = colors.teal;
|
||||||
|
white = colors.text;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Waybar theme
|
||||||
|
programs.waybar = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: ${colors.base};
|
||||||
|
color: ${colors.text};
|
||||||
|
border-bottom: 2px solid ${colors.blue};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: ${colors.subtext1};
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: ${colors.blue};
|
||||||
|
border-bottom-color: ${colors.blue};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: ${colors.text};
|
||||||
|
background: ${colors.surface0};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background: ${colors.surface0};
|
||||||
|
color: ${colors.text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: ${colors.red};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: ${colors.yellow};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
programs.rofi = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral colors.base;
|
||||||
|
foreground-color = mkLiteral colors.text;
|
||||||
|
border-color = mkLiteral colors.blue;
|
||||||
|
separatorcolor = mkLiteral colors.surface0;
|
||||||
|
scrollbar-handle = mkLiteral colors.blue;
|
||||||
|
};
|
||||||
|
|
||||||
|
"#window" = {
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "8px";
|
||||||
|
padding = mkLiteral "20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element selected" = {
|
||||||
|
background-color = mkLiteral colors.blue;
|
||||||
|
text-color = mkLiteral colors.base;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mako notification theme
|
||||||
|
services.mako = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 10";
|
||||||
|
background-color = colors.base;
|
||||||
|
text-color = colors.text;
|
||||||
|
border-color = colors.blue;
|
||||||
|
border-size = 2;
|
||||||
|
border-radius = 8;
|
||||||
|
padding = "10";
|
||||||
|
margin = "5";
|
||||||
|
default-timeout = 5000;
|
||||||
|
progress-color = colors.blue;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# VSCode theme
|
||||||
|
programs.vscode = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
userSettings = {
|
||||||
|
"workbench.colorTheme" = "Catppuccin Latte";
|
||||||
|
"workbench.preferredLightColorTheme" = "Catppuccin Latte";
|
||||||
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||||
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim theme
|
||||||
|
programs.neovim = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
set background=light
|
||||||
|
colorscheme catppuccin-latte
|
||||||
|
'';
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
catppuccin-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Git diff and bat theme
|
||||||
|
programs.bat.config.theme = "Catppuccin-latte";
|
||||||
|
|
||||||
|
# btop theme - using latte theme
|
||||||
|
programs.btop.settings.color_theme = "catppuccin-latte";
|
||||||
|
|
||||||
|
# Lazygit theme
|
||||||
|
programs.lazygit.settings = {
|
||||||
|
gui.theme = {
|
||||||
|
lightTheme = true;
|
||||||
|
selectedLineBgColor = [ colors.surface0 ];
|
||||||
|
selectedRangeBgColor = [ colors.surface0 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zsh/shell prompt colors
|
||||||
|
programs.starship = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format = "$directory$git_branch$git_status$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold ${colors.green})";
|
||||||
|
error_symbol = "[➜](bold ${colors.red})";
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bold ${colors.blue}";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
style = "bold ${colors.mauve}";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
style = "bold ${colors.yellow}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
@@ -3,6 +3,20 @@
|
|||||||
{
|
{
|
||||||
# Catppuccin Mocha theme configuration
|
# Catppuccin Mocha theme configuration
|
||||||
config = {
|
config = {
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/catppuccin/1-catppuccin.png;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(c6d0f5)
|
||||||
|
col.inactive_border = rgba(313244aa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(1e1e2eee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
# Color palette
|
# Color palette
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
OMNIXY_THEME = "catppuccin";
|
OMNIXY_THEME = "catppuccin";
|
||||||
|
|||||||
348
modules/themes/everforest.nix
Normal file
@@ -0,0 +1,348 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Everforest theme for OmniXY
|
||||||
|
# A green based color scheme with warm, comfortable tones
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ../helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Everforest Dark color palette
|
||||||
|
colors = {
|
||||||
|
# Background colors
|
||||||
|
bg = "#2d353b"; # Dark background
|
||||||
|
bg_dim = "#232a2e"; # Dimmer background
|
||||||
|
bg_red = "#3c302a"; # Red background
|
||||||
|
bg_visual = "#543a48"; # Visual selection background
|
||||||
|
bg_yellow = "#45443c"; # Yellow background
|
||||||
|
bg_green = "#3d4313"; # Green background
|
||||||
|
bg_blue = "#384b55"; # Blue background
|
||||||
|
|
||||||
|
# Foreground colors
|
||||||
|
fg = "#d3c6aa"; # Light foreground
|
||||||
|
red = "#e67e80"; # Red
|
||||||
|
orange = "#e69875"; # Orange
|
||||||
|
yellow = "#dbbc7f"; # Yellow
|
||||||
|
green = "#a7c080"; # Green
|
||||||
|
aqua = "#83c092"; # Aqua
|
||||||
|
blue = "#7fbbb3"; # Blue
|
||||||
|
purple = "#d699b6"; # Purple
|
||||||
|
grey0 = "#7a8478"; # Grey 0
|
||||||
|
grey1 = "#859289"; # Grey 1
|
||||||
|
grey2 = "#9da9a0"; # Grey 2
|
||||||
|
|
||||||
|
# Status line colors
|
||||||
|
statusline1 = "#a7c080"; # Green for active
|
||||||
|
statusline2 = "#d3c6aa"; # Foreground for inactive
|
||||||
|
statusline3 = "#e67e80"; # Red for errors
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) (mkMerge [
|
||||||
|
# System-level theme configuration
|
||||||
|
{
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/everforest/1-everforest.jpg;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(d3c6aa)
|
||||||
|
col.inactive_border = rgba(445349aa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(232a2eee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# GTK theme
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Environment variables for consistent theming
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita-dark";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||||
|
OMNIXY_THEME_COLORS_BG = colors.bg;
|
||||||
|
OMNIXY_THEME_COLORS_FG = colors.fg;
|
||||||
|
OMNIXY_THEME_COLORS_ACCENT = colors.green;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console colors
|
||||||
|
console = {
|
||||||
|
colors = [
|
||||||
|
colors.bg_dim # black
|
||||||
|
colors.red # red
|
||||||
|
colors.green # green
|
||||||
|
colors.yellow # yellow
|
||||||
|
colors.blue # blue
|
||||||
|
colors.purple # magenta
|
||||||
|
colors.aqua # cyan
|
||||||
|
colors.grey1 # white
|
||||||
|
colors.grey0 # bright black
|
||||||
|
colors.red # bright red
|
||||||
|
colors.green # bright green
|
||||||
|
colors.yellow # bright yellow
|
||||||
|
colors.blue # bright blue
|
||||||
|
colors.purple # bright magenta
|
||||||
|
colors.aqua # bright cyan
|
||||||
|
colors.fg # bright white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# User-specific theme configuration
|
||||||
|
(omnixy.forUser {
|
||||||
|
# GTK configuration
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Qt theming
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita";
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Kitty terminal theme
|
||||||
|
programs.kitty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
themeFile = "Everforest Dark Medium";
|
||||||
|
settings = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
selection_background = colors.bg_visual;
|
||||||
|
selection_foreground = colors.fg;
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = colors.fg;
|
||||||
|
cursor_text_color = colors.bg;
|
||||||
|
|
||||||
|
# URL underline color when hovering
|
||||||
|
url_color = colors.blue;
|
||||||
|
|
||||||
|
# Tab colors
|
||||||
|
active_tab_background = colors.green;
|
||||||
|
active_tab_foreground = colors.bg;
|
||||||
|
inactive_tab_background = colors.bg_dim;
|
||||||
|
inactive_tab_foreground = colors.grey1;
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = colors.green;
|
||||||
|
inactive_border_color = colors.grey0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Alacritty terminal theme
|
||||||
|
programs.alacritty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
text = colors.bg;
|
||||||
|
cursor = colors.fg;
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = colors.bg_dim;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.aqua;
|
||||||
|
white = colors.grey1;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = colors.grey0;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.aqua;
|
||||||
|
white = colors.fg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Waybar theme
|
||||||
|
programs.waybar = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: ${colors.bg};
|
||||||
|
color: ${colors.fg};
|
||||||
|
border-bottom: 2px solid ${colors.green};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: ${colors.grey1};
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: ${colors.green};
|
||||||
|
border-bottom-color: ${colors.green};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: ${colors.fg};
|
||||||
|
background: ${colors.bg_dim};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background: ${colors.bg_dim};
|
||||||
|
color: ${colors.fg};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: ${colors.red};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: ${colors.yellow};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
programs.rofi = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral colors.bg;
|
||||||
|
foreground-color = mkLiteral colors.fg;
|
||||||
|
border-color = mkLiteral colors.green;
|
||||||
|
separatorcolor = mkLiteral colors.bg_dim;
|
||||||
|
scrollbar-handle = mkLiteral colors.green;
|
||||||
|
};
|
||||||
|
|
||||||
|
"#window" = {
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "8px";
|
||||||
|
padding = mkLiteral "20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element selected" = {
|
||||||
|
background-color = mkLiteral colors.green;
|
||||||
|
text-color = mkLiteral colors.bg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mako notification theme
|
||||||
|
services.mako = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 10";
|
||||||
|
background-color = colors.bg;
|
||||||
|
text-color = colors.fg;
|
||||||
|
border-color = colors.green;
|
||||||
|
border-size = 2;
|
||||||
|
border-radius = 8;
|
||||||
|
padding = "10";
|
||||||
|
margin = "5";
|
||||||
|
default-timeout = 5000;
|
||||||
|
progress-color = colors.green;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# VSCode theme
|
||||||
|
programs.vscode = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
userSettings = {
|
||||||
|
"workbench.colorTheme" = "Everforest Dark";
|
||||||
|
"workbench.preferredDarkColorTheme" = "Everforest Dark";
|
||||||
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||||
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim theme
|
||||||
|
programs.neovim = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
let g:everforest_background = 'medium'
|
||||||
|
let g:everforest_better_performance = 1
|
||||||
|
colorscheme everforest
|
||||||
|
set background=dark
|
||||||
|
'';
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
everforest
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Git diff and bat theme
|
||||||
|
programs.bat.config.theme = "Monokai Extended";
|
||||||
|
|
||||||
|
# btop theme - using a forest-inspired theme
|
||||||
|
programs.btop.settings.color_theme = "everforest-dark-medium";
|
||||||
|
|
||||||
|
# Lazygit theme
|
||||||
|
programs.lazygit.settings = {
|
||||||
|
gui.theme = {
|
||||||
|
lightTheme = false;
|
||||||
|
selectedLineBgColor = [ colors.bg_visual ];
|
||||||
|
selectedRangeBgColor = [ colors.bg_visual ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zsh/shell prompt colors
|
||||||
|
programs.starship = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format = "$directory$git_branch$git_status$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold ${colors.green})";
|
||||||
|
error_symbol = "[➜](bold ${colors.red})";
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bold ${colors.blue}";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
style = "bold ${colors.purple}";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
style = "bold ${colors.yellow}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
345
modules/themes/gruvbox.nix
Normal file
@@ -0,0 +1,345 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Gruvbox theme for OmniXY
|
||||||
|
# A retro groove color scheme with warm, earthy tones
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ../helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Gruvbox color palette
|
||||||
|
colors = {
|
||||||
|
bg = "#282828"; # Dark background
|
||||||
|
bg_hard = "#1d2021"; # Harder background
|
||||||
|
bg_soft = "#32302f"; # Soft background
|
||||||
|
fg = "#ebdbb2"; # Light foreground
|
||||||
|
fg_dim = "#a89984"; # Dimmed foreground
|
||||||
|
|
||||||
|
red = "#cc241d"; # Dark red
|
||||||
|
green = "#98971a"; # Dark green
|
||||||
|
yellow = "#d79921"; # Dark yellow
|
||||||
|
blue = "#458588"; # Dark blue
|
||||||
|
purple = "#b16286"; # Dark purple
|
||||||
|
aqua = "#689d6a"; # Dark aqua
|
||||||
|
orange = "#d65d0e"; # Dark orange
|
||||||
|
gray = "#928374"; # Gray
|
||||||
|
|
||||||
|
red_light = "#fb4934"; # Light red
|
||||||
|
green_light = "#b8bb26"; # Light green
|
||||||
|
yellow_light = "#fabd2f"; # Light yellow
|
||||||
|
blue_light = "#83a598"; # Light blue
|
||||||
|
purple_light = "#d3869b"; # Light purple
|
||||||
|
aqua_light = "#8ec07c"; # Light aqua
|
||||||
|
orange_light = "#fe8019"; # Light orange
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) (mkMerge [
|
||||||
|
# System-level theme configuration
|
||||||
|
{
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/gruvbox/1-grubox.jpg;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(a89984)
|
||||||
|
col.inactive_border = rgba(665c54aa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(1d2021ee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# GTK theme
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Environment variables for consistent theming
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita-dark";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||||
|
OMNIXY_THEME_COLORS_BG = colors.bg;
|
||||||
|
OMNIXY_THEME_COLORS_FG = colors.fg;
|
||||||
|
OMNIXY_THEME_COLORS_ACCENT = colors.orange_light;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console colors
|
||||||
|
console = {
|
||||||
|
colors = [
|
||||||
|
colors.bg # black
|
||||||
|
colors.red # red
|
||||||
|
colors.green # green
|
||||||
|
colors.yellow # yellow
|
||||||
|
colors.blue # blue
|
||||||
|
colors.purple # magenta
|
||||||
|
colors.aqua # cyan
|
||||||
|
colors.fg # white
|
||||||
|
colors.gray # bright black
|
||||||
|
colors.red_light # bright red
|
||||||
|
colors.green_light # bright green
|
||||||
|
colors.yellow_light # bright yellow
|
||||||
|
colors.blue_light # bright blue
|
||||||
|
colors.purple_light # bright magenta
|
||||||
|
colors.aqua_light # bright cyan
|
||||||
|
colors.fg # bright white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# User-specific theme configuration
|
||||||
|
(omnixy.forUser {
|
||||||
|
# GTK configuration
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Qt theming
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita";
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Kitty terminal theme
|
||||||
|
programs.kitty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
themeFile = "gruvbox-dark";
|
||||||
|
settings = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
selection_background = colors.bg_soft;
|
||||||
|
selection_foreground = colors.fg;
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = colors.fg;
|
||||||
|
cursor_text_color = colors.bg;
|
||||||
|
|
||||||
|
# URL underline color when hovering
|
||||||
|
url_color = colors.blue_light;
|
||||||
|
|
||||||
|
# Tab colors
|
||||||
|
active_tab_background = colors.orange_light;
|
||||||
|
active_tab_foreground = colors.bg;
|
||||||
|
inactive_tab_background = colors.bg_soft;
|
||||||
|
inactive_tab_foreground = colors.fg_dim;
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = colors.orange_light;
|
||||||
|
inactive_border_color = colors.gray;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Alacritty terminal theme
|
||||||
|
programs.alacritty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
text = colors.bg;
|
||||||
|
cursor = colors.fg;
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = colors.bg;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.aqua;
|
||||||
|
white = colors.fg;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = colors.gray;
|
||||||
|
red = colors.red_light;
|
||||||
|
green = colors.green_light;
|
||||||
|
yellow = colors.yellow_light;
|
||||||
|
blue = colors.blue_light;
|
||||||
|
magenta = colors.purple_light;
|
||||||
|
cyan = colors.aqua_light;
|
||||||
|
white = colors.fg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Waybar theme
|
||||||
|
programs.waybar = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: ${colors.bg};
|
||||||
|
color: ${colors.fg};
|
||||||
|
border-bottom: 2px solid ${colors.orange_light};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: ${colors.fg_dim};
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: ${colors.orange_light};
|
||||||
|
border-bottom-color: ${colors.orange_light};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: ${colors.fg};
|
||||||
|
background: ${colors.bg_soft};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background: ${colors.bg_soft};
|
||||||
|
color: ${colors.fg};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: ${colors.red_light};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: ${colors.yellow_light};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
programs.rofi = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral colors.bg;
|
||||||
|
foreground-color = mkLiteral colors.fg;
|
||||||
|
border-color = mkLiteral colors.orange_light;
|
||||||
|
separatorcolor = mkLiteral colors.bg_soft;
|
||||||
|
scrollbar-handle = mkLiteral colors.orange_light;
|
||||||
|
};
|
||||||
|
|
||||||
|
"#window" = {
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "8px";
|
||||||
|
padding = mkLiteral "20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element selected" = {
|
||||||
|
background-color = mkLiteral colors.orange_light;
|
||||||
|
text-color = mkLiteral colors.bg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mako notification theme
|
||||||
|
services.mako = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 10";
|
||||||
|
background-color = colors.bg;
|
||||||
|
text-color = colors.fg;
|
||||||
|
border-color = colors.orange_light;
|
||||||
|
border-size = 2;
|
||||||
|
border-radius = 8;
|
||||||
|
padding = "10";
|
||||||
|
margin = "5";
|
||||||
|
default-timeout = 5000;
|
||||||
|
progress-color = colors.orange_light;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# VSCode theme
|
||||||
|
programs.vscode = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extensions = with pkgs.vscode-extensions; [
|
||||||
|
jdinhlife.gruvbox
|
||||||
|
];
|
||||||
|
userSettings = {
|
||||||
|
"workbench.colorTheme" = "Gruvbox Dark Medium";
|
||||||
|
"workbench.preferredDarkColorTheme" = "Gruvbox Dark Medium";
|
||||||
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||||
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim theme
|
||||||
|
programs.neovim = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
colorscheme gruvbox
|
||||||
|
set background=dark
|
||||||
|
'';
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
gruvbox-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Git diff and bat theme
|
||||||
|
programs.bat.config.theme = "gruvbox-dark";
|
||||||
|
|
||||||
|
# btop theme
|
||||||
|
programs.btop.settings.color_theme = "gruvbox_dark";
|
||||||
|
|
||||||
|
# Lazygit theme
|
||||||
|
programs.lazygit.settings = {
|
||||||
|
gui.theme = {
|
||||||
|
lightTheme = false;
|
||||||
|
selectedLineBgColor = [ colors.bg_soft ];
|
||||||
|
selectedRangeBgColor = [ colors.bg_soft ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zsh/shell prompt colors
|
||||||
|
programs.starship = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format = "$directory$git_branch$git_status$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold ${colors.green_light})";
|
||||||
|
error_symbol = "[➜](bold ${colors.red_light})";
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bold ${colors.blue_light}";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
style = "bold ${colors.purple_light}";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
style = "bold ${colors.yellow_light}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
360
modules/themes/kanagawa.nix
Normal file
@@ -0,0 +1,360 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Kanagawa theme for OmniXY
|
||||||
|
# A dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ../helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Kanagawa color palette
|
||||||
|
colors = {
|
||||||
|
# Background colors
|
||||||
|
bg = "#1f1f28"; # Dark background (sumiInk0)
|
||||||
|
bg_dark = "#16161d"; # Darker background (sumiInk1)
|
||||||
|
bg_light = "#2a2a37"; # Lighter background (sumiInk3)
|
||||||
|
bg_visual = "#2d4f67"; # Visual selection (waveBlue1)
|
||||||
|
|
||||||
|
# Foreground colors
|
||||||
|
fg = "#dcd7ba"; # Main foreground (fujiWhite)
|
||||||
|
fg_dim = "#c8c093"; # Dimmed foreground (fujiGray)
|
||||||
|
fg_reverse = "#223249"; # Reverse foreground (waveBlue2)
|
||||||
|
|
||||||
|
# Wave colors (blues)
|
||||||
|
wave_blue1 = "#2d4f67"; # Dark blue
|
||||||
|
wave_blue2 = "#223249"; # Darker blue
|
||||||
|
wave_aqua1 = "#6a9589"; # Aqua green
|
||||||
|
wave_aqua2 = "#7aa89f"; # Light aqua
|
||||||
|
|
||||||
|
# Autumn colors (reds, oranges, yellows)
|
||||||
|
autumn_red = "#c34043"; # Red
|
||||||
|
autumn_orange = "#dca561"; # Orange
|
||||||
|
autumn_yellow = "#c0a36e"; # Yellow
|
||||||
|
autumn_green = "#76946a"; # Green
|
||||||
|
|
||||||
|
# Spring colors (greens)
|
||||||
|
spring_blue = "#7e9cd8"; # Blue
|
||||||
|
spring_violet1 = "#957fb8"; # Violet
|
||||||
|
spring_violet2 = "#b8b4d0"; # Light violet
|
||||||
|
spring_green = "#98bb6c"; # Green
|
||||||
|
|
||||||
|
# Ronin colors (grays)
|
||||||
|
ronin_yellow = "#ff9e3b"; # Bright orange/yellow
|
||||||
|
dragon_blue = "#658594"; # Muted blue
|
||||||
|
old_white = "#c8c093"; # Old paper white
|
||||||
|
|
||||||
|
# Special colors
|
||||||
|
samurai_red = "#e82424"; # Bright red for errors
|
||||||
|
ronin_gray = "#727169"; # Gray for comments
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) (mkMerge [
|
||||||
|
# System-level theme configuration
|
||||||
|
{
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/kanagawa/1-kanagawa.jpg;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(dcd7ba)
|
||||||
|
col.inactive_border = rgba(2a2a37aa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(1f1f28ee)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Kanagawa backdrop is too strong for default opacity
|
||||||
|
windowrule = opacity 0.98 0.95, tag:terminal
|
||||||
|
'';
|
||||||
|
|
||||||
|
# GTK theme
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Environment variables for consistent theming
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita-dark";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||||
|
OMNIXY_THEME_COLORS_BG = colors.bg;
|
||||||
|
OMNIXY_THEME_COLORS_FG = colors.fg;
|
||||||
|
OMNIXY_THEME_COLORS_ACCENT = colors.spring_blue;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console colors
|
||||||
|
console = {
|
||||||
|
colors = [
|
||||||
|
colors.bg_dark # black
|
||||||
|
colors.autumn_red # red
|
||||||
|
colors.autumn_green # green
|
||||||
|
colors.autumn_yellow # yellow
|
||||||
|
colors.spring_blue # blue
|
||||||
|
colors.spring_violet1 # magenta
|
||||||
|
colors.wave_aqua1 # cyan
|
||||||
|
colors.old_white # white
|
||||||
|
colors.ronin_gray # bright black
|
||||||
|
colors.samurai_red # bright red
|
||||||
|
colors.spring_green # bright green
|
||||||
|
colors.ronin_yellow # bright yellow
|
||||||
|
colors.spring_blue # bright blue
|
||||||
|
colors.spring_violet2 # bright magenta
|
||||||
|
colors.wave_aqua2 # bright cyan
|
||||||
|
colors.fg # bright white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# User-specific theme configuration
|
||||||
|
(omnixy.forUser {
|
||||||
|
# GTK configuration
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Qt theming
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita";
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Kitty terminal theme
|
||||||
|
programs.kitty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
themeFile = "Kanagawa";
|
||||||
|
settings = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
selection_background = colors.bg_visual;
|
||||||
|
selection_foreground = colors.fg;
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = colors.fg;
|
||||||
|
cursor_text_color = colors.bg;
|
||||||
|
|
||||||
|
# URL underline color when hovering
|
||||||
|
url_color = colors.spring_blue;
|
||||||
|
|
||||||
|
# Tab colors
|
||||||
|
active_tab_background = colors.spring_blue;
|
||||||
|
active_tab_foreground = colors.bg;
|
||||||
|
inactive_tab_background = colors.bg_light;
|
||||||
|
inactive_tab_foreground = colors.fg_dim;
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = colors.spring_blue;
|
||||||
|
inactive_border_color = colors.ronin_gray;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Alacritty terminal theme
|
||||||
|
programs.alacritty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
text = colors.bg;
|
||||||
|
cursor = colors.fg;
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = colors.bg_dark;
|
||||||
|
red = colors.autumn_red;
|
||||||
|
green = colors.autumn_green;
|
||||||
|
yellow = colors.autumn_yellow;
|
||||||
|
blue = colors.spring_blue;
|
||||||
|
magenta = colors.spring_violet1;
|
||||||
|
cyan = colors.wave_aqua1;
|
||||||
|
white = colors.old_white;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = colors.ronin_gray;
|
||||||
|
red = colors.samurai_red;
|
||||||
|
green = colors.spring_green;
|
||||||
|
yellow = colors.ronin_yellow;
|
||||||
|
blue = colors.spring_blue;
|
||||||
|
magenta = colors.spring_violet2;
|
||||||
|
cyan = colors.wave_aqua2;
|
||||||
|
white = colors.fg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Waybar theme
|
||||||
|
programs.waybar = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: ${colors.bg};
|
||||||
|
color: ${colors.fg};
|
||||||
|
border-bottom: 2px solid ${colors.spring_blue};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: ${colors.fg_dim};
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: ${colors.spring_blue};
|
||||||
|
border-bottom-color: ${colors.spring_blue};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: ${colors.fg};
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
color: ${colors.fg};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: ${colors.samurai_red};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: ${colors.ronin_yellow};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
programs.rofi = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral colors.bg;
|
||||||
|
foreground-color = mkLiteral colors.fg;
|
||||||
|
border-color = mkLiteral colors.spring_blue;
|
||||||
|
separatorcolor = mkLiteral colors.bg_light;
|
||||||
|
scrollbar-handle = mkLiteral colors.spring_blue;
|
||||||
|
};
|
||||||
|
|
||||||
|
"#window" = {
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "8px";
|
||||||
|
padding = mkLiteral "20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element selected" = {
|
||||||
|
background-color = mkLiteral colors.spring_blue;
|
||||||
|
text-color = mkLiteral colors.bg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mako notification theme
|
||||||
|
services.mako = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 10";
|
||||||
|
background-color = colors.bg;
|
||||||
|
text-color = colors.fg;
|
||||||
|
border-color = colors.spring_blue;
|
||||||
|
border-size = 2;
|
||||||
|
border-radius = 8;
|
||||||
|
padding = "10";
|
||||||
|
margin = "5";
|
||||||
|
default-timeout = 5000;
|
||||||
|
progress-color = colors.spring_blue;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# VSCode theme
|
||||||
|
programs.vscode = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
userSettings = {
|
||||||
|
"workbench.colorTheme" = "Kanagawa";
|
||||||
|
"workbench.preferredDarkColorTheme" = "Kanagawa";
|
||||||
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||||
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim theme
|
||||||
|
programs.neovim = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
set background=dark
|
||||||
|
colorscheme kanagawa
|
||||||
|
'';
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
kanagawa-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Git diff and bat theme
|
||||||
|
programs.bat.config.theme = "Monokai Extended";
|
||||||
|
|
||||||
|
# btop theme - using kanagawa-inspired theme
|
||||||
|
programs.btop.settings.color_theme = "tokyo-night";
|
||||||
|
|
||||||
|
# Lazygit theme
|
||||||
|
programs.lazygit.settings = {
|
||||||
|
gui.theme = {
|
||||||
|
lightTheme = false;
|
||||||
|
selectedLineBgColor = [ colors.bg_visual ];
|
||||||
|
selectedRangeBgColor = [ colors.bg_visual ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zsh/shell prompt colors
|
||||||
|
programs.starship = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format = "$directory$git_branch$git_status$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold ${colors.spring_green})";
|
||||||
|
error_symbol = "[➜](bold ${colors.samurai_red})";
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bold ${colors.spring_blue}";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
style = "bold ${colors.spring_violet1}";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
style = "bold ${colors.autumn_yellow}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
345
modules/themes/matte-black.nix
Normal file
@@ -0,0 +1,345 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Matte Black theme for OmniXY
|
||||||
|
# A sleek, professional dark theme with matte black aesthetics
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ../helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Matte Black color palette
|
||||||
|
colors = {
|
||||||
|
# Base colors - various shades of black and gray
|
||||||
|
bg = "#0d1117"; # Very dark background
|
||||||
|
bg_light = "#161b22"; # Slightly lighter background
|
||||||
|
bg_lighter = "#21262d"; # Even lighter background
|
||||||
|
bg_accent = "#30363d"; # Accent background
|
||||||
|
|
||||||
|
# Foreground colors
|
||||||
|
fg = "#f0f6fc"; # Light foreground
|
||||||
|
fg_dim = "#8b949e"; # Dimmed foreground
|
||||||
|
fg_muted = "#6e7681"; # Muted foreground
|
||||||
|
|
||||||
|
# Accent colors - muted and professional
|
||||||
|
white = "#ffffff"; # Pure white
|
||||||
|
gray = "#8A8A8D"; # Main accent gray (from omarchy)
|
||||||
|
gray_light = "#aeb7c2"; # Light gray
|
||||||
|
gray_dark = "#484f58"; # Dark gray
|
||||||
|
|
||||||
|
# Status colors - muted tones
|
||||||
|
red = "#f85149"; # Error red
|
||||||
|
orange = "#fd7e14"; # Warning orange
|
||||||
|
yellow = "#d29922"; # Attention yellow
|
||||||
|
green = "#238636"; # Success green
|
||||||
|
blue = "#58a6ff"; # Info blue
|
||||||
|
purple = "#a5a2ff"; # Purple accent
|
||||||
|
cyan = "#76e3ea"; # Cyan accent
|
||||||
|
|
||||||
|
# Special UI colors
|
||||||
|
border = "#30363d"; # Border color
|
||||||
|
shadow = "#010409"; # Shadow color
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) (mkMerge [
|
||||||
|
# System-level theme configuration
|
||||||
|
{
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/matte-black/1-matte-black.jpg;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(8A8A8D)
|
||||||
|
col.inactive_border = rgba(30363daa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(010409ee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# GTK theme
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Environment variables for consistent theming
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita-dark";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||||
|
OMNIXY_THEME_COLORS_BG = colors.bg;
|
||||||
|
OMNIXY_THEME_COLORS_FG = colors.fg;
|
||||||
|
OMNIXY_THEME_COLORS_ACCENT = colors.gray;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console colors
|
||||||
|
console = {
|
||||||
|
colors = [
|
||||||
|
colors.bg # black
|
||||||
|
colors.red # red
|
||||||
|
colors.green # green
|
||||||
|
colors.yellow # yellow
|
||||||
|
colors.blue # blue
|
||||||
|
colors.purple # magenta
|
||||||
|
colors.cyan # cyan
|
||||||
|
colors.fg_dim # white
|
||||||
|
colors.gray_dark # bright black
|
||||||
|
colors.red # bright red
|
||||||
|
colors.green # bright green
|
||||||
|
colors.yellow # bright yellow
|
||||||
|
colors.blue # bright blue
|
||||||
|
colors.purple # bright magenta
|
||||||
|
colors.cyan # bright cyan
|
||||||
|
colors.fg # bright white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# User-specific theme configuration
|
||||||
|
(omnixy.forUser {
|
||||||
|
# GTK configuration
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Qt theming
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita";
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Kitty terminal theme
|
||||||
|
programs.kitty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
selection_background = colors.bg_lighter;
|
||||||
|
selection_foreground = colors.fg;
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = colors.fg;
|
||||||
|
cursor_text_color = colors.bg;
|
||||||
|
|
||||||
|
# URL underline color when hovering
|
||||||
|
url_color = colors.blue;
|
||||||
|
|
||||||
|
# Tab colors
|
||||||
|
active_tab_background = colors.gray;
|
||||||
|
active_tab_foreground = colors.bg;
|
||||||
|
inactive_tab_background = colors.bg_light;
|
||||||
|
inactive_tab_foreground = colors.fg_dim;
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = colors.gray;
|
||||||
|
inactive_border_color = colors.gray_dark;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Alacritty terminal theme
|
||||||
|
programs.alacritty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
text = colors.bg;
|
||||||
|
cursor = colors.fg;
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = colors.bg_light;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.cyan;
|
||||||
|
white = colors.fg_dim;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = colors.gray_dark;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.cyan;
|
||||||
|
white = colors.fg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Waybar theme
|
||||||
|
programs.waybar = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: ${colors.bg};
|
||||||
|
color: ${colors.fg};
|
||||||
|
border-bottom: 2px solid ${colors.gray};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: ${colors.fg_dim};
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: ${colors.gray};
|
||||||
|
border-bottom-color: ${colors.gray};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: ${colors.fg};
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
color: ${colors.fg};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: ${colors.red};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: ${colors.yellow};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
programs.rofi = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral colors.bg;
|
||||||
|
foreground-color = mkLiteral colors.fg;
|
||||||
|
border-color = mkLiteral colors.gray;
|
||||||
|
separatorcolor = mkLiteral colors.bg_light;
|
||||||
|
scrollbar-handle = mkLiteral colors.gray;
|
||||||
|
};
|
||||||
|
|
||||||
|
"#window" = {
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "8px";
|
||||||
|
padding = mkLiteral "20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element selected" = {
|
||||||
|
background-color = mkLiteral colors.gray;
|
||||||
|
text-color = mkLiteral colors.bg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mako notification theme
|
||||||
|
services.mako = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 10";
|
||||||
|
background-color = colors.bg;
|
||||||
|
text-color = colors.fg;
|
||||||
|
border-color = colors.gray;
|
||||||
|
border-size = 2;
|
||||||
|
border-radius = 8;
|
||||||
|
padding = "10";
|
||||||
|
margin = "5";
|
||||||
|
default-timeout = 5000;
|
||||||
|
progress-color = colors.gray;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# VSCode theme
|
||||||
|
programs.vscode = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
userSettings = {
|
||||||
|
"workbench.colorTheme" = "GitHub Dark Default";
|
||||||
|
"workbench.preferredDarkColorTheme" = "GitHub Dark Default";
|
||||||
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||||
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim theme
|
||||||
|
programs.neovim = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
set background=dark
|
||||||
|
colorscheme github_dark_default
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Git diff and bat theme
|
||||||
|
programs.bat.config.theme = "GitHub";
|
||||||
|
|
||||||
|
# btop theme
|
||||||
|
programs.btop.settings.color_theme = "adapta";
|
||||||
|
|
||||||
|
# Lazygit theme
|
||||||
|
programs.lazygit.settings = {
|
||||||
|
gui.theme = {
|
||||||
|
lightTheme = false;
|
||||||
|
selectedLineBgColor = [ colors.bg_lighter ];
|
||||||
|
selectedRangeBgColor = [ colors.bg_lighter ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zsh/shell prompt colors
|
||||||
|
programs.starship = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format = "$directory$git_branch$git_status$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold ${colors.green})";
|
||||||
|
error_symbol = "[➜](bold ${colors.red})";
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bold ${colors.blue}";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
style = "bold ${colors.purple}";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
style = "bold ${colors.yellow}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
352
modules/themes/nord.nix
Normal file
@@ -0,0 +1,352 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Nord theme for OmniXY
|
||||||
|
# An arctic, north-bluish color palette
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ../helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Nord color palette
|
||||||
|
colors = {
|
||||||
|
# Polar Night
|
||||||
|
bg = "#2e3440"; # Dark background
|
||||||
|
bg_dark = "#242933"; # Darker background
|
||||||
|
bg_light = "#3b4252"; # Light background
|
||||||
|
bg_lighter = "#434c5e"; # Lighter background
|
||||||
|
|
||||||
|
# Snow Storm
|
||||||
|
fg = "#eceff4"; # Light foreground
|
||||||
|
fg_dim = "#d8dee9"; # Dimmed foreground
|
||||||
|
fg_dark = "#e5e9f0"; # Dark foreground
|
||||||
|
|
||||||
|
# Frost
|
||||||
|
blue = "#5e81ac"; # Primary blue
|
||||||
|
blue_light = "#88c0d0"; # Light blue
|
||||||
|
blue_bright = "#81a1c1"; # Bright blue
|
||||||
|
teal = "#8fbcbb"; # Teal
|
||||||
|
|
||||||
|
# Aurora
|
||||||
|
red = "#bf616a"; # Red
|
||||||
|
orange = "#d08770"; # Orange
|
||||||
|
yellow = "#ebcb8b"; # Yellow
|
||||||
|
green = "#a3be8c"; # Green
|
||||||
|
purple = "#b48ead"; # Purple
|
||||||
|
|
||||||
|
# UI colors
|
||||||
|
accent = "#88c0d0"; # Primary accent (light blue)
|
||||||
|
warning = "#ebcb8b"; # Warning (yellow)
|
||||||
|
error = "#bf616a"; # Error (red)
|
||||||
|
success = "#a3be8c"; # Success (green)
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) (mkMerge [
|
||||||
|
# System-level theme configuration
|
||||||
|
{
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/nord/1-nord.png;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(D8DEE9)
|
||||||
|
col.inactive_border = rgba(4c566aaa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(2e3440ee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# GTK theme
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Environment variables for consistent theming
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita-dark";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||||
|
OMNIXY_THEME_COLORS_BG = colors.bg;
|
||||||
|
OMNIXY_THEME_COLORS_FG = colors.fg;
|
||||||
|
OMNIXY_THEME_COLORS_ACCENT = colors.accent;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console colors
|
||||||
|
console = {
|
||||||
|
colors = [
|
||||||
|
colors.bg_dark # black
|
||||||
|
colors.red # red
|
||||||
|
colors.green # green
|
||||||
|
colors.yellow # yellow
|
||||||
|
colors.blue # blue
|
||||||
|
colors.purple # magenta
|
||||||
|
colors.teal # cyan
|
||||||
|
colors.fg_dim # white
|
||||||
|
colors.bg_lighter # bright black
|
||||||
|
colors.red # bright red
|
||||||
|
colors.green # bright green
|
||||||
|
colors.yellow # bright yellow
|
||||||
|
colors.blue_light # bright blue
|
||||||
|
colors.purple # bright magenta
|
||||||
|
colors.blue_bright # bright cyan
|
||||||
|
colors.fg # bright white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# User-specific theme configuration
|
||||||
|
(omnixy.forUser {
|
||||||
|
# GTK configuration
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Qt theming
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita";
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Kitty terminal theme
|
||||||
|
programs.kitty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
themeFile = "Nord";
|
||||||
|
settings = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
selection_background = colors.bg_light;
|
||||||
|
selection_foreground = colors.fg;
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = colors.fg;
|
||||||
|
cursor_text_color = colors.bg;
|
||||||
|
|
||||||
|
# URL underline color when hovering
|
||||||
|
url_color = colors.accent;
|
||||||
|
|
||||||
|
# Tab colors
|
||||||
|
active_tab_background = colors.accent;
|
||||||
|
active_tab_foreground = colors.bg;
|
||||||
|
inactive_tab_background = colors.bg_light;
|
||||||
|
inactive_tab_foreground = colors.fg_dim;
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = colors.accent;
|
||||||
|
inactive_border_color = colors.bg_lighter;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Alacritty terminal theme
|
||||||
|
programs.alacritty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
text = colors.bg;
|
||||||
|
cursor = colors.fg;
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = colors.bg_dark;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.teal;
|
||||||
|
white = colors.fg_dim;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = colors.bg_lighter;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue_light;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.blue_bright;
|
||||||
|
white = colors.fg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Waybar theme
|
||||||
|
programs.waybar = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: ${colors.bg};
|
||||||
|
color: ${colors.fg};
|
||||||
|
border-bottom: 2px solid ${colors.accent};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: ${colors.fg_dim};
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: ${colors.accent};
|
||||||
|
border-bottom-color: ${colors.accent};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: ${colors.fg};
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
color: ${colors.fg};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: ${colors.error};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: ${colors.warning};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
programs.rofi = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral colors.bg;
|
||||||
|
foreground-color = mkLiteral colors.fg;
|
||||||
|
border-color = mkLiteral colors.accent;
|
||||||
|
separatorcolor = mkLiteral colors.bg_light;
|
||||||
|
scrollbar-handle = mkLiteral colors.accent;
|
||||||
|
};
|
||||||
|
|
||||||
|
"#window" = {
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "8px";
|
||||||
|
padding = mkLiteral "20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element selected" = {
|
||||||
|
background-color = mkLiteral colors.accent;
|
||||||
|
text-color = mkLiteral colors.bg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mako notification theme
|
||||||
|
services.mako = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 10";
|
||||||
|
background-color = colors.bg;
|
||||||
|
text-color = colors.fg;
|
||||||
|
border-color = colors.accent;
|
||||||
|
border-size = 2;
|
||||||
|
border-radius = 8;
|
||||||
|
padding = "10";
|
||||||
|
margin = "5";
|
||||||
|
default-timeout = 5000;
|
||||||
|
progress-color = colors.accent;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# VSCode theme
|
||||||
|
programs.vscode = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extensions = with pkgs.vscode-extensions; [
|
||||||
|
arcticicestudio.nord-visual-studio-code
|
||||||
|
];
|
||||||
|
userSettings = {
|
||||||
|
"workbench.colorTheme" = "Nord";
|
||||||
|
"workbench.preferredDarkColorTheme" = "Nord";
|
||||||
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||||
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim theme
|
||||||
|
programs.neovim = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
colorscheme nord
|
||||||
|
set background=dark
|
||||||
|
'';
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
nord-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Git diff and bat theme
|
||||||
|
programs.bat.config.theme = "Nord";
|
||||||
|
|
||||||
|
# btop theme - using a Nord-inspired theme
|
||||||
|
programs.btop.settings.color_theme = "nord";
|
||||||
|
|
||||||
|
# Lazygit theme
|
||||||
|
programs.lazygit.settings = {
|
||||||
|
gui.theme = {
|
||||||
|
lightTheme = false;
|
||||||
|
selectedLineBgColor = [ colors.bg_light ];
|
||||||
|
selectedRangeBgColor = [ colors.bg_light ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zsh/shell prompt colors
|
||||||
|
programs.starship = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format = "$directory$git_branch$git_status$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold ${colors.success})";
|
||||||
|
error_symbol = "[➜](bold ${colors.error})";
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bold ${colors.blue_light}";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
style = "bold ${colors.purple}";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
style = "bold ${colors.warning}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
350
modules/themes/osaka-jade.nix
Normal file
@@ -0,0 +1,350 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Osaka Jade theme for OmniXY
|
||||||
|
# A sophisticated green-tinted dark theme with jade accents
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ../helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Osaka Jade color palette
|
||||||
|
colors = {
|
||||||
|
# Base colors - dark with jade undertones
|
||||||
|
bg = "#0f1419"; # Very dark background with slight jade tint
|
||||||
|
bg_light = "#1a2026"; # Lighter background
|
||||||
|
bg_lighter = "#252d33"; # Even lighter background
|
||||||
|
bg_accent = "#2d3640"; # Accent background
|
||||||
|
|
||||||
|
# Foreground colors
|
||||||
|
fg = "#c9c7cd"; # Light foreground
|
||||||
|
fg_dim = "#828691"; # Dimmed foreground
|
||||||
|
fg_muted = "#5c6166"; # Muted foreground
|
||||||
|
|
||||||
|
# Jade accent colors
|
||||||
|
jade = "#71CEAD"; # Main jade accent (from omarchy)
|
||||||
|
jade_light = "#8dd4b8"; # Light jade
|
||||||
|
jade_dark = "#5ba896"; # Dark jade
|
||||||
|
jade_muted = "#4a8f7d"; # Muted jade
|
||||||
|
|
||||||
|
# Supporting colors
|
||||||
|
teal = "#4fd6be"; # Teal
|
||||||
|
mint = "#88e5d3"; # Mint green
|
||||||
|
seafoam = "#a0f0e0"; # Seafoam
|
||||||
|
|
||||||
|
# Status colors - jade-tinted
|
||||||
|
red = "#f07178"; # Error red
|
||||||
|
orange = "#ffb454"; # Warning orange
|
||||||
|
yellow = "#e6c384"; # Attention yellow
|
||||||
|
green = "#71CEAD"; # Success (using jade)
|
||||||
|
blue = "#6bb6ff"; # Info blue
|
||||||
|
purple = "#c991e1"; # Purple
|
||||||
|
cyan = "#71CEAD"; # Cyan (using jade)
|
||||||
|
|
||||||
|
# Special UI colors
|
||||||
|
border = "#2d3640"; # Border color
|
||||||
|
shadow = "#0a0d11"; # Shadow color
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) (mkMerge [
|
||||||
|
# System-level theme configuration
|
||||||
|
{
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/osaka-jade/1-osaka-jade-bg.jpg;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(71CEAD)
|
||||||
|
col.inactive_border = rgba(2d3640aa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(0a0d11ee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# GTK theme
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Environment variables for consistent theming
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita-dark";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||||
|
OMNIXY_THEME_COLORS_BG = colors.bg;
|
||||||
|
OMNIXY_THEME_COLORS_FG = colors.fg;
|
||||||
|
OMNIXY_THEME_COLORS_ACCENT = colors.jade;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console colors
|
||||||
|
console = {
|
||||||
|
colors = [
|
||||||
|
colors.bg_light # black
|
||||||
|
colors.red # red
|
||||||
|
colors.green # green
|
||||||
|
colors.yellow # yellow
|
||||||
|
colors.blue # blue
|
||||||
|
colors.purple # magenta
|
||||||
|
colors.jade # cyan (using jade)
|
||||||
|
colors.fg_dim # white
|
||||||
|
colors.bg_lighter # bright black
|
||||||
|
colors.red # bright red
|
||||||
|
colors.jade_light # bright green (jade)
|
||||||
|
colors.yellow # bright yellow
|
||||||
|
colors.blue # bright blue
|
||||||
|
colors.purple # bright magenta
|
||||||
|
colors.seafoam # bright cyan
|
||||||
|
colors.fg # bright white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# User-specific theme configuration
|
||||||
|
(omnixy.forUser {
|
||||||
|
# GTK configuration
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Qt theming
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita";
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Kitty terminal theme
|
||||||
|
programs.kitty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
selection_background = colors.bg_lighter;
|
||||||
|
selection_foreground = colors.fg;
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = colors.jade;
|
||||||
|
cursor_text_color = colors.bg;
|
||||||
|
|
||||||
|
# URL underline color when hovering
|
||||||
|
url_color = colors.jade_light;
|
||||||
|
|
||||||
|
# Tab colors
|
||||||
|
active_tab_background = colors.jade;
|
||||||
|
active_tab_foreground = colors.bg;
|
||||||
|
inactive_tab_background = colors.bg_light;
|
||||||
|
inactive_tab_foreground = colors.fg_dim;
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = colors.jade;
|
||||||
|
inactive_border_color = colors.jade_muted;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Alacritty terminal theme
|
||||||
|
programs.alacritty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
text = colors.bg;
|
||||||
|
cursor = colors.jade;
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = colors.bg_light;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.jade;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.teal;
|
||||||
|
white = colors.fg_dim;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = colors.bg_lighter;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.jade_light;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.seafoam;
|
||||||
|
white = colors.fg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Waybar theme
|
||||||
|
programs.waybar = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: ${colors.bg};
|
||||||
|
color: ${colors.fg};
|
||||||
|
border-bottom: 2px solid ${colors.jade};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: ${colors.fg_dim};
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: ${colors.jade};
|
||||||
|
border-bottom-color: ${colors.jade};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: ${colors.fg};
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
color: ${colors.fg};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: ${colors.red};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: ${colors.yellow};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
programs.rofi = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral colors.bg;
|
||||||
|
foreground-color = mkLiteral colors.fg;
|
||||||
|
border-color = mkLiteral colors.jade;
|
||||||
|
separatorcolor = mkLiteral colors.bg_light;
|
||||||
|
scrollbar-handle = mkLiteral colors.jade;
|
||||||
|
};
|
||||||
|
|
||||||
|
"#window" = {
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "8px";
|
||||||
|
padding = mkLiteral "20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element selected" = {
|
||||||
|
background-color = mkLiteral colors.jade;
|
||||||
|
text-color = mkLiteral colors.bg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mako notification theme
|
||||||
|
services.mako = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 10";
|
||||||
|
background-color = colors.bg;
|
||||||
|
text-color = colors.fg;
|
||||||
|
border-color = colors.jade;
|
||||||
|
border-size = 2;
|
||||||
|
border-radius = 8;
|
||||||
|
padding = "10";
|
||||||
|
margin = "5";
|
||||||
|
default-timeout = 5000;
|
||||||
|
progress-color = colors.jade;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# VSCode theme
|
||||||
|
programs.vscode = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
userSettings = {
|
||||||
|
"workbench.colorTheme" = "Ayu Dark";
|
||||||
|
"workbench.preferredDarkColorTheme" = "Ayu Dark";
|
||||||
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||||
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim theme
|
||||||
|
programs.neovim = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
set background=dark
|
||||||
|
colorscheme ayu
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Git diff and bat theme
|
||||||
|
programs.bat.config.theme = "ansi";
|
||||||
|
|
||||||
|
# btop theme
|
||||||
|
programs.btop.settings.color_theme = "ayu-dark";
|
||||||
|
|
||||||
|
# Lazygit theme
|
||||||
|
programs.lazygit.settings = {
|
||||||
|
gui.theme = {
|
||||||
|
lightTheme = false;
|
||||||
|
selectedLineBgColor = [ colors.bg_lighter ];
|
||||||
|
selectedRangeBgColor = [ colors.bg_lighter ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zsh/shell prompt colors
|
||||||
|
programs.starship = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format = "$directory$git_branch$git_status$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold ${colors.jade})";
|
||||||
|
error_symbol = "[➜](bold ${colors.red})";
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bold ${colors.jade_light}";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
style = "bold ${colors.purple}";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
style = "bold ${colors.yellow}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
352
modules/themes/ristretto.nix
Normal file
@@ -0,0 +1,352 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Ristretto theme for OmniXY
|
||||||
|
# A warm, coffee-inspired theme with rich brown and cream tones
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ../helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Ristretto color palette - inspired by coffee and warm tones
|
||||||
|
colors = {
|
||||||
|
# Base colors - warm browns and creams
|
||||||
|
bg = "#2b1f17"; # Dark coffee background
|
||||||
|
bg_light = "#3d2a1f"; # Lighter coffee
|
||||||
|
bg_lighter = "#4f3426"; # Even lighter coffee
|
||||||
|
bg_accent = "#5d3e2e"; # Accent background
|
||||||
|
|
||||||
|
# Foreground colors - cream and light browns
|
||||||
|
fg = "#e6d9db"; # Main foreground (from omarchy)
|
||||||
|
fg_dim = "#c4b5a0"; # Dimmed cream
|
||||||
|
fg_muted = "#a08d7a"; # Muted cream
|
||||||
|
|
||||||
|
# Coffee-inspired accent colors
|
||||||
|
cream = "#e6d9db"; # Cream (main accent from omarchy)
|
||||||
|
latte = "#d4c4b0"; # Latte
|
||||||
|
mocha = "#b8997a"; # Mocha
|
||||||
|
espresso = "#8b6f47"; # Espresso
|
||||||
|
cappuccino = "#c9a96e"; # Cappuccino
|
||||||
|
|
||||||
|
# Warm accent colors
|
||||||
|
amber = "#d4a574"; # Amber
|
||||||
|
caramel = "#c19a6b"; # Caramel
|
||||||
|
cinnamon = "#a67c5a"; # Cinnamon
|
||||||
|
vanilla = "#e8dcc6"; # Vanilla
|
||||||
|
|
||||||
|
# Status colors - coffee-tinted
|
||||||
|
red = "#d67c7c"; # Warm red
|
||||||
|
orange = "#d4925a"; # Coffee orange
|
||||||
|
yellow = "#d4c969"; # Warm yellow
|
||||||
|
green = "#81a56a"; # Muted green
|
||||||
|
blue = "#6b8bb3"; # Muted blue
|
||||||
|
purple = "#a67cb8"; # Muted purple
|
||||||
|
cyan = "#6ba3a3"; # Muted cyan
|
||||||
|
|
||||||
|
# Special UI colors
|
||||||
|
border = "#5d3e2e"; # Border color
|
||||||
|
shadow = "#1a1008"; # Shadow color
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) (mkMerge [
|
||||||
|
# System-level theme configuration
|
||||||
|
{
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/ristretto/1-ristretto.jpg;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(e6d9db)
|
||||||
|
col.inactive_border = rgba(5d3e2eaa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(1a1008ee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# GTK theme
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Environment variables for consistent theming
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita-dark";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||||
|
OMNIXY_THEME_COLORS_BG = colors.bg;
|
||||||
|
OMNIXY_THEME_COLORS_FG = colors.fg;
|
||||||
|
OMNIXY_THEME_COLORS_ACCENT = colors.cream;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console colors
|
||||||
|
console = {
|
||||||
|
colors = [
|
||||||
|
colors.bg_light # black
|
||||||
|
colors.red # red
|
||||||
|
colors.green # green
|
||||||
|
colors.yellow # yellow
|
||||||
|
colors.blue # blue
|
||||||
|
colors.purple # magenta
|
||||||
|
colors.cyan # cyan
|
||||||
|
colors.fg_dim # white
|
||||||
|
colors.espresso # bright black
|
||||||
|
colors.red # bright red
|
||||||
|
colors.green # bright green
|
||||||
|
colors.amber # bright yellow
|
||||||
|
colors.blue # bright blue
|
||||||
|
colors.purple # bright magenta
|
||||||
|
colors.cyan # bright cyan
|
||||||
|
colors.fg # bright white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# User-specific theme configuration
|
||||||
|
(omnixy.forUser {
|
||||||
|
# GTK configuration
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Qt theming
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita";
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Kitty terminal theme
|
||||||
|
programs.kitty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
selection_background = colors.bg_lighter;
|
||||||
|
selection_foreground = colors.fg;
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = colors.cream;
|
||||||
|
cursor_text_color = colors.bg;
|
||||||
|
|
||||||
|
# URL underline color when hovering
|
||||||
|
url_color = colors.amber;
|
||||||
|
|
||||||
|
# Tab colors
|
||||||
|
active_tab_background = colors.cream;
|
||||||
|
active_tab_foreground = colors.bg;
|
||||||
|
inactive_tab_background = colors.bg_light;
|
||||||
|
inactive_tab_foreground = colors.fg_dim;
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = colors.cream;
|
||||||
|
inactive_border_color = colors.mocha;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Alacritty terminal theme
|
||||||
|
programs.alacritty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = colors.bg;
|
||||||
|
foreground = colors.fg;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
text = colors.bg;
|
||||||
|
cursor = colors.cream;
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = colors.bg_light;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.yellow;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.cyan;
|
||||||
|
white = colors.fg_dim;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = colors.espresso;
|
||||||
|
red = colors.red;
|
||||||
|
green = colors.green;
|
||||||
|
yellow = colors.amber;
|
||||||
|
blue = colors.blue;
|
||||||
|
magenta = colors.purple;
|
||||||
|
cyan = colors.cyan;
|
||||||
|
white = colors.fg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Waybar theme
|
||||||
|
programs.waybar = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: ${colors.bg};
|
||||||
|
color: ${colors.fg};
|
||||||
|
border-bottom: 2px solid ${colors.cream};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: ${colors.fg_dim};
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: ${colors.cream};
|
||||||
|
border-bottom-color: ${colors.cream};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: ${colors.fg};
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background: ${colors.bg_light};
|
||||||
|
color: ${colors.fg};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: ${colors.red};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: ${colors.amber};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
programs.rofi = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral colors.bg;
|
||||||
|
foreground-color = mkLiteral colors.fg;
|
||||||
|
border-color = mkLiteral colors.cream;
|
||||||
|
separatorcolor = mkLiteral colors.bg_light;
|
||||||
|
scrollbar-handle = mkLiteral colors.cream;
|
||||||
|
};
|
||||||
|
|
||||||
|
"#window" = {
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "8px";
|
||||||
|
padding = mkLiteral "20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element selected" = {
|
||||||
|
background-color = mkLiteral colors.cream;
|
||||||
|
text-color = mkLiteral colors.bg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mako notification theme
|
||||||
|
services.mako = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 10";
|
||||||
|
background-color = colors.bg;
|
||||||
|
text-color = colors.fg;
|
||||||
|
border-color = colors.cream;
|
||||||
|
border-size = 2;
|
||||||
|
border-radius = 8;
|
||||||
|
padding = "10";
|
||||||
|
margin = "5";
|
||||||
|
default-timeout = 5000;
|
||||||
|
progress-color = colors.cream;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# VSCode theme
|
||||||
|
programs.vscode = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
userSettings = {
|
||||||
|
"workbench.colorTheme" = "Monokai";
|
||||||
|
"workbench.preferredDarkColorTheme" = "Monokai";
|
||||||
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||||
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim theme
|
||||||
|
programs.neovim = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
set background=dark
|
||||||
|
colorscheme monokai
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Git diff and bat theme
|
||||||
|
programs.bat.config.theme = "Monokai Extended";
|
||||||
|
|
||||||
|
# btop theme
|
||||||
|
programs.btop.settings.color_theme = "monokai";
|
||||||
|
|
||||||
|
# Lazygit theme
|
||||||
|
programs.lazygit.settings = {
|
||||||
|
gui.theme = {
|
||||||
|
lightTheme = false;
|
||||||
|
selectedLineBgColor = [ colors.bg_lighter ];
|
||||||
|
selectedRangeBgColor = [ colors.bg_lighter ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zsh/shell prompt colors
|
||||||
|
programs.starship = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format = "$directory$git_branch$git_status$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold ${colors.green})";
|
||||||
|
error_symbol = "[➜](bold ${colors.red})";
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bold ${colors.amber}";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
style = "bold ${colors.purple}";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
style = "bold ${colors.yellow}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
338
modules/themes/rose-pine.nix
Normal file
@@ -0,0 +1,338 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Rose Pine theme for OmniXY
|
||||||
|
# All natural pine, faux fur and a bit of soho vibes for the classy minimalist
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ../helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
|
# Rose Pine color palette
|
||||||
|
colors = {
|
||||||
|
# Base colors
|
||||||
|
base = "#191724"; # Dark background
|
||||||
|
surface = "#1f1d2e"; # Surface background
|
||||||
|
overlay = "#26233a"; # Overlay background
|
||||||
|
muted = "#6e6a86"; # Muted foreground
|
||||||
|
subtle = "#908caa"; # Subtle foreground
|
||||||
|
text = "#e0def4"; # Main foreground
|
||||||
|
love = "#eb6f92"; # Love (pink/red)
|
||||||
|
gold = "#f6c177"; # Gold (yellow)
|
||||||
|
rose = "#ebbcba"; # Rose (peach)
|
||||||
|
pine = "#31748f"; # Pine (blue)
|
||||||
|
foam = "#9ccfd8"; # Foam (cyan)
|
||||||
|
iris = "#c4a7e7"; # Iris (purple)
|
||||||
|
|
||||||
|
# Highlight colors
|
||||||
|
highlight_low = "#21202e";
|
||||||
|
highlight_med = "#403d52";
|
||||||
|
highlight_high = "#524f67";
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) (mkMerge [
|
||||||
|
# System-level theme configuration
|
||||||
|
{
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/rose-pine/1-rose-pine.jpg;
|
||||||
|
|
||||||
|
# Hyprland theme colors (from omarchy)
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgb(575279)
|
||||||
|
col.inactive_border = rgba(26233aaa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(191724ee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# GTK theme
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Environment variables for consistent theming
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita-dark";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||||
|
OMNIXY_THEME_COLORS_BG = colors.base;
|
||||||
|
OMNIXY_THEME_COLORS_FG = colors.text;
|
||||||
|
OMNIXY_THEME_COLORS_ACCENT = colors.foam;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Console colors
|
||||||
|
console = {
|
||||||
|
colors = [
|
||||||
|
colors.overlay # black
|
||||||
|
colors.love # red
|
||||||
|
colors.pine # green (using pine as green alternative)
|
||||||
|
colors.gold # yellow
|
||||||
|
colors.foam # blue (using foam as blue)
|
||||||
|
colors.iris # magenta
|
||||||
|
colors.rose # cyan (using rose as cyan)
|
||||||
|
colors.text # white
|
||||||
|
colors.muted # bright black
|
||||||
|
colors.love # bright red
|
||||||
|
colors.pine # bright green
|
||||||
|
colors.gold # bright yellow
|
||||||
|
colors.foam # bright blue
|
||||||
|
colors.iris # bright magenta
|
||||||
|
colors.rose # bright cyan
|
||||||
|
colors.text # bright white
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# User-specific theme configuration
|
||||||
|
(omnixy.forUser {
|
||||||
|
# GTK configuration
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Qt theming
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita";
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Kitty terminal theme
|
||||||
|
programs.kitty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
themeFile = "Rosé Pine";
|
||||||
|
settings = {
|
||||||
|
background = colors.base;
|
||||||
|
foreground = colors.text;
|
||||||
|
selection_background = colors.surface;
|
||||||
|
selection_foreground = colors.text;
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor = colors.text;
|
||||||
|
cursor_text_color = colors.base;
|
||||||
|
|
||||||
|
# URL underline color when hovering
|
||||||
|
url_color = colors.foam;
|
||||||
|
|
||||||
|
# Tab colors
|
||||||
|
active_tab_background = colors.foam;
|
||||||
|
active_tab_foreground = colors.base;
|
||||||
|
inactive_tab_background = colors.surface;
|
||||||
|
inactive_tab_foreground = colors.subtle;
|
||||||
|
|
||||||
|
# Window border colors
|
||||||
|
active_border_color = colors.foam;
|
||||||
|
inactive_border_color = colors.muted;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Alacritty terminal theme
|
||||||
|
programs.alacritty = mkIf (omnixy.isEnabled "coding" || omnixy.isEnabled "media") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = colors.base;
|
||||||
|
foreground = colors.text;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
text = colors.base;
|
||||||
|
cursor = colors.text;
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = colors.overlay;
|
||||||
|
red = colors.love;
|
||||||
|
green = colors.pine;
|
||||||
|
yellow = colors.gold;
|
||||||
|
blue = colors.foam;
|
||||||
|
magenta = colors.iris;
|
||||||
|
cyan = colors.rose;
|
||||||
|
white = colors.text;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = colors.muted;
|
||||||
|
red = colors.love;
|
||||||
|
green = colors.pine;
|
||||||
|
yellow = colors.gold;
|
||||||
|
blue = colors.foam;
|
||||||
|
magenta = colors.iris;
|
||||||
|
cyan = colors.rose;
|
||||||
|
white = colors.text;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Waybar theme
|
||||||
|
programs.waybar = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: ${colors.base};
|
||||||
|
color: ${colors.text};
|
||||||
|
border-bottom: 2px solid ${colors.foam};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: ${colors.subtle};
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
color: ${colors.foam};
|
||||||
|
border-bottom-color: ${colors.foam};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: ${colors.text};
|
||||||
|
background: ${colors.surface};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0 2px;
|
||||||
|
background: ${colors.surface};
|
||||||
|
color: ${colors.text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: ${colors.love};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: ${colors.gold};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
programs.rofi = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral colors.base;
|
||||||
|
foreground-color = mkLiteral colors.text;
|
||||||
|
border-color = mkLiteral colors.foam;
|
||||||
|
separatorcolor = mkLiteral colors.surface;
|
||||||
|
scrollbar-handle = mkLiteral colors.foam;
|
||||||
|
};
|
||||||
|
|
||||||
|
"#window" = {
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "8px";
|
||||||
|
padding = mkLiteral "20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element selected" = {
|
||||||
|
background-color = mkLiteral colors.foam;
|
||||||
|
text-color = mkLiteral colors.base;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mako notification theme
|
||||||
|
services.mako = mkIf (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 10";
|
||||||
|
background-color = colors.base;
|
||||||
|
text-color = colors.text;
|
||||||
|
border-color = colors.foam;
|
||||||
|
border-size = 2;
|
||||||
|
border-radius = 8;
|
||||||
|
padding = "10";
|
||||||
|
margin = "5";
|
||||||
|
default-timeout = 5000;
|
||||||
|
progress-color = colors.foam;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# VSCode theme
|
||||||
|
programs.vscode = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
userSettings = {
|
||||||
|
"workbench.colorTheme" = "Rosé Pine";
|
||||||
|
"workbench.preferredDarkColorTheme" = "Rosé Pine";
|
||||||
|
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||||
|
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim theme
|
||||||
|
programs.neovim = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
set background=dark
|
||||||
|
colorscheme rose-pine
|
||||||
|
'';
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
rose-pine
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Git diff and bat theme
|
||||||
|
programs.bat.config.theme = "Monokai Extended";
|
||||||
|
|
||||||
|
# btop theme - using a rose-inspired theme
|
||||||
|
programs.btop.settings.color_theme = "rose-pine";
|
||||||
|
|
||||||
|
# Lazygit theme
|
||||||
|
programs.lazygit.settings = {
|
||||||
|
gui.theme = {
|
||||||
|
lightTheme = false;
|
||||||
|
selectedLineBgColor = [ colors.surface ];
|
||||||
|
selectedRangeBgColor = [ colors.surface ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zsh/shell prompt colors
|
||||||
|
programs.starship = mkIf (omnixy.isEnabled "coding") {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
format = "$directory$git_branch$git_status$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold ${colors.pine})";
|
||||||
|
error_symbol = "[➜](bold ${colors.love})";
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
style = "bold ${colors.foam}";
|
||||||
|
};
|
||||||
|
git_branch = {
|
||||||
|
style = "bold ${colors.iris}";
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
style = "bold ${colors.gold}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
@@ -32,6 +32,20 @@ in
|
|||||||
{
|
{
|
||||||
# Tokyo Night theme configuration
|
# Tokyo Night theme configuration
|
||||||
config = {
|
config = {
|
||||||
|
# Set theme wallpaper
|
||||||
|
omnixy.desktop.wallpaper = ./wallpapers/tokyo-night/1-scenery-pink-lakeside-sunset-lake-landscape-scenic-panorama-7680x3215-144.png;
|
||||||
|
|
||||||
|
# Hyprland theme colors
|
||||||
|
environment.etc."omnixy/hyprland/theme.conf".text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = rgba(7aa2f7ee) rgba(c4a7e7ee) 45deg
|
||||||
|
col.inactive_border = rgba(414868aa)
|
||||||
|
}
|
||||||
|
decoration {
|
||||||
|
col.shadow = rgba(1a1b26ee)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
# Color palette - use nix-colors if available
|
# Color palette - use nix-colors if available
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
OMNIXY_THEME = "tokyo-night";
|
OMNIXY_THEME = "tokyo-night";
|
||||||
|
|||||||
|
After Width: | Height: | Size: 652 KiB |
BIN
modules/themes/wallpapers/catppuccin/1-catppuccin.png
Normal file
|
After Width: | Height: | Size: 353 KiB |
BIN
modules/themes/wallpapers/catppuccin/2-cat-waves-mocha.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
modules/themes/wallpapers/catppuccin/3-cat-blue-eye-mocha.png
Normal file
|
After Width: | Height: | Size: 254 KiB |
BIN
modules/themes/wallpapers/everforest/1-everforest.jpg
Normal file
|
After Width: | Height: | Size: 315 KiB |
BIN
modules/themes/wallpapers/gruvbox/1-grubox.jpg
Normal file
|
After Width: | Height: | Size: 434 KiB |
BIN
modules/themes/wallpapers/kanagawa/1-kanagawa.jpg
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
modules/themes/wallpapers/matte-black/0-ship-at-sea.jpg
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
modules/themes/wallpapers/matte-black/1-matte-black.jpg
Normal file
|
After Width: | Height: | Size: 1010 KiB |
BIN
modules/themes/wallpapers/nord/1-nord.png
Normal file
|
After Width: | Height: | Size: 384 KiB |
BIN
modules/themes/wallpapers/nord/2-nord.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
modules/themes/wallpapers/osaka-jade/1-osaka-jade-bg.jpg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
modules/themes/wallpapers/osaka-jade/2-osaka-jade-bg.jpg
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
modules/themes/wallpapers/osaka-jade/3-osaka-jade-bg.jpg
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
BIN
modules/themes/wallpapers/ristretto/1-ristretto.jpg
Normal file
|
After Width: | Height: | Size: 205 KiB |
BIN
modules/themes/wallpapers/ristretto/2-ristretto.jpg
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
modules/themes/wallpapers/ristretto/3-ristretto.jpg
Normal file
|
After Width: | Height: | Size: 798 KiB |
BIN
modules/themes/wallpapers/rose-pine/1-rose-pine.jpg
Normal file
|
After Width: | Height: | Size: 248 KiB |
BIN
modules/themes/wallpapers/rose-pine/2-wave-light.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
modules/themes/wallpapers/rose-pine/3-leafy-dawn-omarchy.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 2.7 MiB |
|
After Width: | Height: | Size: 4.6 MiB |
|
After Width: | Height: | Size: 263 KiB |
422
modules/walker.nix
Normal file
@@ -0,0 +1,422 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# Walker app launcher configuration for OmniXY
|
||||||
|
# Modern replacement for Rofi with better Wayland integration
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.omnixy;
|
||||||
|
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf (cfg.enable or true) {
|
||||||
|
# Add walker to system packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
walker
|
||||||
|
];
|
||||||
|
|
||||||
|
# Create Walker configuration
|
||||||
|
environment.etc."omnixy/walker/config.json".text = builtins.toJSON {
|
||||||
|
# General configuration
|
||||||
|
placeholder = "Search applications, files, and more...";
|
||||||
|
fullscreen = false;
|
||||||
|
layer = "overlay";
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
name = "applications";
|
||||||
|
src = "applications";
|
||||||
|
transform = "uppercase";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "runner";
|
||||||
|
src = "runner";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "websearch";
|
||||||
|
src = "websearch";
|
||||||
|
engines = [
|
||||||
|
{
|
||||||
|
name = "Google";
|
||||||
|
url = "https://www.google.com/search?q=%s";
|
||||||
|
icon = "web-browser";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "GitHub";
|
||||||
|
url = "https://github.com/search?q=%s";
|
||||||
|
icon = "github";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "NixOS Packages";
|
||||||
|
url = "https://search.nixos.org/packages?query=%s";
|
||||||
|
icon = "nix-snowflake";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "finder";
|
||||||
|
src = "finder";
|
||||||
|
dirs = [
|
||||||
|
"/home/${cfg.user}"
|
||||||
|
"/home/${cfg.user}/Documents"
|
||||||
|
"/home/${cfg.user}/Downloads"
|
||||||
|
"/home/${cfg.user}/Desktop"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "calc";
|
||||||
|
src = "calc";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# UI Configuration
|
||||||
|
ui = {
|
||||||
|
anchors = {
|
||||||
|
top = false;
|
||||||
|
left = true;
|
||||||
|
right = false;
|
||||||
|
bottom = false;
|
||||||
|
};
|
||||||
|
margin = {
|
||||||
|
top = 100;
|
||||||
|
bottom = 0;
|
||||||
|
left = 100;
|
||||||
|
right = 0;
|
||||||
|
};
|
||||||
|
width = 600;
|
||||||
|
height = 500;
|
||||||
|
show_initial_entries = true;
|
||||||
|
show_search_text = true;
|
||||||
|
scroll_height = 300;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Search configuration
|
||||||
|
search = {
|
||||||
|
delay = 100;
|
||||||
|
placeholder = "Type to search...";
|
||||||
|
force_keyboard_focus = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# List configuration
|
||||||
|
list = {
|
||||||
|
height = 200;
|
||||||
|
always_show = true;
|
||||||
|
max_entries = 50;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Icons
|
||||||
|
icons = {
|
||||||
|
theme = "Papirus";
|
||||||
|
size = 32;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Theming based on current theme
|
||||||
|
theme = if cfg.theme == "gruvbox" then "gruvbox"
|
||||||
|
else if cfg.theme == "nord" then "nord"
|
||||||
|
else if cfg.theme == "catppuccin" then "catppuccin"
|
||||||
|
else if cfg.theme == "tokyo-night" then "tokyo-night"
|
||||||
|
else "default";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create Walker CSS theme files
|
||||||
|
environment.etc."omnixy/walker/themes/gruvbox.css".text = ''
|
||||||
|
* {
|
||||||
|
color: #ebdbb2;
|
||||||
|
background-color: #282828;
|
||||||
|
font-family: "JetBrainsMono Nerd Font", monospace;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: rgba(40, 40, 40, 0.95);
|
||||||
|
border: 2px solid #a89984;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
background-color: #3c3836;
|
||||||
|
border: 1px solid #665c54;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
margin: 12px;
|
||||||
|
color: #ebdbb2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search:focus {
|
||||||
|
border-color: #d79921;
|
||||||
|
}
|
||||||
|
|
||||||
|
#list {
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0 12px 12px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding: 8px 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:selected {
|
||||||
|
background-color: #504945;
|
||||||
|
color: #fbf1c7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:hover {
|
||||||
|
background-color: #3c3836;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .icon {
|
||||||
|
margin-right: 12px;
|
||||||
|
min-width: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .text {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .sub {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #a89984;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.etc."omnixy/walker/themes/nord.css".text = ''
|
||||||
|
* {
|
||||||
|
color: #eceff4;
|
||||||
|
background-color: #2e3440;
|
||||||
|
font-family: "JetBrainsMono Nerd Font", monospace;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: rgba(46, 52, 64, 0.95);
|
||||||
|
border: 2px solid #4c566a;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
background-color: #3b4252;
|
||||||
|
border: 1px solid #4c566a;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
margin: 12px;
|
||||||
|
color: #eceff4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search:focus {
|
||||||
|
border-color: #5e81ac;
|
||||||
|
}
|
||||||
|
|
||||||
|
#list {
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0 12px 12px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding: 8px 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:selected {
|
||||||
|
background-color: #434c5e;
|
||||||
|
color: #eceff4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:hover {
|
||||||
|
background-color: #3b4252;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .icon {
|
||||||
|
margin-right: 12px;
|
||||||
|
min-width: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .text {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .sub {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #81a1c1;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.etc."omnixy/walker/themes/catppuccin.css".text = ''
|
||||||
|
* {
|
||||||
|
color: #cdd6f4;
|
||||||
|
background-color: #1e1e2e;
|
||||||
|
font-family: "JetBrainsMono Nerd Font", monospace;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: rgba(30, 30, 46, 0.95);
|
||||||
|
border: 2px solid #6c7086;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
background-color: #313244;
|
||||||
|
border: 1px solid #45475a;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
margin: 12px;
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search:focus {
|
||||||
|
border-color: #89b4fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
#list {
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0 12px 12px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding: 8px 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:selected {
|
||||||
|
background-color: #45475a;
|
||||||
|
color: #cdd6f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:hover {
|
||||||
|
background-color: #313244;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .icon {
|
||||||
|
margin-right: 12px;
|
||||||
|
min-width: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .text {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .sub {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #89dceb;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.etc."omnixy/walker/themes/tokyo-night.css".text = ''
|
||||||
|
* {
|
||||||
|
color: #c0caf5;
|
||||||
|
background-color: #1a1b26;
|
||||||
|
font-family: "JetBrainsMono Nerd Font", monospace;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: rgba(26, 27, 38, 0.95);
|
||||||
|
border: 2px solid #414868;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
background-color: #24283b;
|
||||||
|
border: 1px solid #414868;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
margin: 12px;
|
||||||
|
color: #c0caf5;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search:focus {
|
||||||
|
border-color: #7aa2f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
#list {
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0 12px 12px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding: 8px 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:selected {
|
||||||
|
background-color: #414868;
|
||||||
|
color: #c0caf5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:hover {
|
||||||
|
background-color: #24283b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .icon {
|
||||||
|
margin-right: 12px;
|
||||||
|
min-width: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .text {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item .sub {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #7dcfff;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Add to user environment
|
||||||
|
omnixy.forUser {
|
||||||
|
# Set XDG config dir for Walker
|
||||||
|
xdg.configFile."walker/config.json".source =
|
||||||
|
config.environment.etc."omnixy/walker/config.json".source;
|
||||||
|
|
||||||
|
# Theme-specific CSS
|
||||||
|
xdg.configFile."walker/themes/style.css".source =
|
||||||
|
config.environment.etc."omnixy/walker/themes/${cfg.theme}.css".source;
|
||||||
|
|
||||||
|
# Add shell aliases
|
||||||
|
programs.bash.shellAliases = {
|
||||||
|
launcher = "walker";
|
||||||
|
run = "walker --modules runner";
|
||||||
|
apps = "walker --modules applications";
|
||||||
|
files = "walker --modules finder";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
launcher = "walker";
|
||||||
|
run = "walker --modules runner";
|
||||||
|
apps = "walker --modules applications";
|
||||||
|
files = "walker --modules finder";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish.shellAliases = {
|
||||||
|
launcher = "walker";
|
||||||
|
run = "walker --modules runner";
|
||||||
|
apps = "walker --modules applications";
|
||||||
|
files = "walker --modules finder";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create convenience scripts
|
||||||
|
environment.systemPackages = [
|
||||||
|
(omnixy.makeScript "omnixy-launcher" "Launch OmniXY app launcher" ''
|
||||||
|
walker --config ~/.config/walker/config.json --css ~/.config/walker/themes/style.css
|
||||||
|
'')
|
||||||
|
|
||||||
|
(omnixy.makeScript "omnixy-run" "Quick command runner" ''
|
||||||
|
walker --modules runner --config ~/.config/walker/config.json --css ~/.config/walker/themes/style.css
|
||||||
|
'')
|
||||||
|
|
||||||
|
(omnixy.makeScript "omnixy-apps" "Application launcher" ''
|
||||||
|
walker --modules applications --config ~/.config/walker/config.json --css ~/.config/walker/themes/style.css
|
||||||
|
'')
|
||||||
|
|
||||||
|
(omnixy.makeScript "omnixy-files" "File finder" ''
|
||||||
|
walker --modules finder --config ~/.config/walker/config.json --css ~/.config/walker/themes/style.css
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
312
packages/plymouth-theme.nix
Normal file
@@ -0,0 +1,312 @@
|
|||||||
|
{ lib, pkgs, stdenv, writeTextFile, ... }:
|
||||||
|
|
||||||
|
# OmniXY Plymouth Theme Package
|
||||||
|
# Creates theme-aware Plymouth boot screens
|
||||||
|
|
||||||
|
let
|
||||||
|
# Theme color definitions
|
||||||
|
themeColors = {
|
||||||
|
tokyo-night = {
|
||||||
|
bg = "#1a1b26";
|
||||||
|
fg = "#c0caf5";
|
||||||
|
accent = "#7aa2f7";
|
||||||
|
secondary = "#bb9af7";
|
||||||
|
};
|
||||||
|
catppuccin = {
|
||||||
|
bg = "#1e1e2e";
|
||||||
|
fg = "#cdd6f4";
|
||||||
|
accent = "#89b4fa";
|
||||||
|
secondary = "#cba6f7";
|
||||||
|
};
|
||||||
|
gruvbox = {
|
||||||
|
bg = "#282828";
|
||||||
|
fg = "#ebdbb2";
|
||||||
|
accent = "#d79921";
|
||||||
|
secondary = "#b16286";
|
||||||
|
};
|
||||||
|
nord = {
|
||||||
|
bg = "#2e3440";
|
||||||
|
fg = "#eceff4";
|
||||||
|
accent = "#5e81ac";
|
||||||
|
secondary = "#b48ead";
|
||||||
|
};
|
||||||
|
everforest = {
|
||||||
|
bg = "#2d353b";
|
||||||
|
fg = "#d3c6aa";
|
||||||
|
accent = "#a7c080";
|
||||||
|
secondary = "#e67e80";
|
||||||
|
};
|
||||||
|
rose-pine = {
|
||||||
|
bg = "#191724";
|
||||||
|
fg = "#e0def4";
|
||||||
|
accent = "#31748f";
|
||||||
|
secondary = "#c4a7e7";
|
||||||
|
};
|
||||||
|
kanagawa = {
|
||||||
|
bg = "#1f1f28";
|
||||||
|
fg = "#dcd7ba";
|
||||||
|
accent = "#7e9cd8";
|
||||||
|
secondary = "#957fb8";
|
||||||
|
};
|
||||||
|
catppuccin-latte = {
|
||||||
|
bg = "#eff1f5";
|
||||||
|
fg = "#4c4f69";
|
||||||
|
accent = "#1e66f5";
|
||||||
|
secondary = "#8839ef";
|
||||||
|
};
|
||||||
|
matte-black = {
|
||||||
|
bg = "#000000";
|
||||||
|
fg = "#ffffff";
|
||||||
|
accent = "#666666";
|
||||||
|
secondary = "#999999";
|
||||||
|
};
|
||||||
|
osaka-jade = {
|
||||||
|
bg = "#0d1b1e";
|
||||||
|
fg = "#c5d4d7";
|
||||||
|
accent = "#5fb3a1";
|
||||||
|
secondary = "#7ba05b";
|
||||||
|
};
|
||||||
|
ristretto = {
|
||||||
|
bg = "#2c1810";
|
||||||
|
fg = "#d4c5a7";
|
||||||
|
accent = "#d08b5b";
|
||||||
|
secondary = "#a67458";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Base assets (copied from omarchy)
|
||||||
|
assets = pkgs.runCommand "omnixy-plymouth-assets" {} ''
|
||||||
|
mkdir -p $out
|
||||||
|
|
||||||
|
# Create base logo (OmniXY branding)
|
||||||
|
cat > $out/logo.svg <<'EOF'
|
||||||
|
<svg width="120" height="120" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||||
|
<stop offset="0%" style="stop-color:#7aa2f7;stop-opacity:1" />
|
||||||
|
<stop offset="100%" style="stop-color:#bb9af7;stop-opacity:1" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<circle cx="60" cy="60" r="50" fill="url(#grad1)" opacity="0.8"/>
|
||||||
|
<text x="60" y="70" font-family="JetBrains Mono" font-size="24" font-weight="bold"
|
||||||
|
text-anchor="middle" fill="white">XY</text>
|
||||||
|
</svg>
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Convert SVG to PNG
|
||||||
|
${pkgs.librsvg}/bin/rsvg-convert -w 120 -h 120 $out/logo.svg -o $out/logo.png
|
||||||
|
rm $out/logo.svg
|
||||||
|
|
||||||
|
# Create other UI elements (simplified versions of omarchy assets)
|
||||||
|
${pkgs.imagemagick}/bin/convert -size 32x32 xc:none -fill '#ffffff' -draw 'circle 16,16 16,8' $out/lock.png
|
||||||
|
${pkgs.imagemagick}/bin/convert -size 200x32 xc:'rgba(255,255,255,0.1)' -stroke white -strokewidth 1 -fill none -draw 'roundrectangle 1,1 198,30 8,8' $out/entry.png
|
||||||
|
${pkgs.imagemagick}/bin/convert -size 8x8 xc:white $out/bullet.png
|
||||||
|
${pkgs.imagemagick}/bin/convert -size 300x8 xc:'rgba(255,255,255,0.2)' -stroke white -strokewidth 1 -fill none -draw 'roundrectangle 1,1 298,6 4,4' $out/progress_box.png
|
||||||
|
${pkgs.imagemagick}/bin/convert -size 296x4 xc:'rgba(255,255,255,0.8)' $out/progress_bar.png
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Plymouth script template
|
||||||
|
createPlymouthScript = themeName: colors: writeTextFile {
|
||||||
|
name = "omnixy-${themeName}.script";
|
||||||
|
text = ''
|
||||||
|
# OmniXY Plymouth Theme Script
|
||||||
|
# Theme: ${themeName}
|
||||||
|
# Generated for NixOS/OmniXY
|
||||||
|
|
||||||
|
// Theme color configuration
|
||||||
|
bg_color = Colour("${colors.bg}");
|
||||||
|
fg_color = Colour("${colors.fg}");
|
||||||
|
accent_color = Colour("${colors.accent}");
|
||||||
|
secondary_color = Colour("${colors.secondary}");
|
||||||
|
|
||||||
|
// Screen setup
|
||||||
|
screen_width = Window.GetWidth();
|
||||||
|
screen_height = Window.GetHeight();
|
||||||
|
Window.SetBackgroundTopColor(bg_color);
|
||||||
|
Window.SetBackgroundBottomColor(bg_color);
|
||||||
|
|
||||||
|
// Load assets
|
||||||
|
logo_image = Image("logo.png");
|
||||||
|
lock_image = Image("lock.png");
|
||||||
|
entry_image = Image("entry.png");
|
||||||
|
bullet_image = Image("bullet.png");
|
||||||
|
progress_box_image = Image("progress_box.png");
|
||||||
|
progress_bar_image = Image("progress_bar.png");
|
||||||
|
|
||||||
|
// Logo setup
|
||||||
|
logo_sprite = Sprite(logo_image);
|
||||||
|
logo_sprite.SetX((screen_width - logo_image.GetWidth()) / 2);
|
||||||
|
logo_sprite.SetY(screen_height / 2 - 100);
|
||||||
|
logo_sprite.SetOpacity(0.9);
|
||||||
|
|
||||||
|
// Progress bar setup
|
||||||
|
progress_box_sprite = Sprite(progress_box_image);
|
||||||
|
progress_box_sprite.SetX((screen_width - progress_box_image.GetWidth()) / 2);
|
||||||
|
progress_box_sprite.SetY(screen_height / 2 + 50);
|
||||||
|
|
||||||
|
progress_bar_sprite = Sprite(progress_bar_image);
|
||||||
|
progress_bar_sprite.SetX((screen_width - progress_box_image.GetWidth()) / 2 + 2);
|
||||||
|
progress_bar_sprite.SetY(screen_height / 2 + 52);
|
||||||
|
|
||||||
|
// Animation variables
|
||||||
|
fake_progress = 0;
|
||||||
|
real_progress = 0;
|
||||||
|
start_time = Plymouth.GetTime();
|
||||||
|
fake_duration = 15; // 15 seconds fake progress
|
||||||
|
|
||||||
|
// Easing function (ease-out quadratic)
|
||||||
|
fun easeOutQuad(x) {
|
||||||
|
return 1 - (1 - x) * (1 - x);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Progress update function
|
||||||
|
fun progress_callback() {
|
||||||
|
current_time = Plymouth.GetTime();
|
||||||
|
elapsed = current_time - start_time;
|
||||||
|
|
||||||
|
// Calculate fake progress (0 to 0.7 over fake_duration)
|
||||||
|
if (elapsed < fake_duration) {
|
||||||
|
fake_progress = 0.7 * easeOutQuad(elapsed / fake_duration);
|
||||||
|
} else {
|
||||||
|
fake_progress = 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use the maximum of fake and real progress
|
||||||
|
display_progress = fake_progress;
|
||||||
|
if (real_progress > fake_progress) {
|
||||||
|
display_progress = real_progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update progress bar
|
||||||
|
bar_width = progress_bar_image.GetWidth() * display_progress;
|
||||||
|
progress_bar_sprite.SetImage(progress_bar_image.Scale(bar_width, progress_bar_image.GetHeight()));
|
||||||
|
|
||||||
|
// Add subtle pulsing to logo during boot
|
||||||
|
pulse = Math.Sin(elapsed * 3) * 0.1 + 0.9;
|
||||||
|
logo_sprite.SetOpacity(pulse);
|
||||||
|
}
|
||||||
|
|
||||||
|
Plymouth.SetUpdateFunction(progress_callback);
|
||||||
|
|
||||||
|
// Boot progress callback
|
||||||
|
Plymouth.SetBootProgressFunction(
|
||||||
|
fun (duration, progress) {
|
||||||
|
real_progress = progress;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Password dialog setup
|
||||||
|
question_sprite = Sprite();
|
||||||
|
answer_sprite = Sprite();
|
||||||
|
|
||||||
|
fun DisplayQuestionCallback(prompt, entry) {
|
||||||
|
question_sprite.SetImage(Image.Text(prompt, 1, 1, 1));
|
||||||
|
question_sprite.SetX((screen_width - question_sprite.GetImage().GetWidth()) / 2);
|
||||||
|
question_sprite.SetY(screen_height / 2 - 50);
|
||||||
|
|
||||||
|
// Show lock icon
|
||||||
|
lock_sprite = Sprite(lock_image);
|
||||||
|
lock_sprite.SetX((screen_width - lock_image.GetWidth()) / 2);
|
||||||
|
lock_sprite.SetY(screen_height / 2 - 20);
|
||||||
|
|
||||||
|
// Show entry field
|
||||||
|
entry_sprite = Sprite(entry_image);
|
||||||
|
entry_sprite.SetX((screen_width - entry_image.GetWidth()) / 2);
|
||||||
|
entry_sprite.SetY(screen_height / 2 + 20);
|
||||||
|
|
||||||
|
// Show bullets for password
|
||||||
|
bullet_sprites = [];
|
||||||
|
for (i = 0; i < entry.GetLength(); i++) {
|
||||||
|
bullet_sprites[i] = Sprite(bullet_image);
|
||||||
|
bullet_sprites[i].SetX((screen_width / 2) - (entry.GetLength() * 10 / 2) + i * 10);
|
||||||
|
bullet_sprites[i].SetY(screen_height / 2 + 28);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Plymouth.SetDisplayQuestionFunction(DisplayQuestionCallback);
|
||||||
|
|
||||||
|
// Hide question callback
|
||||||
|
Plymouth.SetDisplayPasswordFunction(DisplayQuestionCallback);
|
||||||
|
|
||||||
|
// Message display
|
||||||
|
message_sprite = Sprite();
|
||||||
|
|
||||||
|
Plymouth.SetMessageFunction(
|
||||||
|
fun (text) {
|
||||||
|
message_sprite.SetImage(Image.Text(text, 1, 1, 1));
|
||||||
|
message_sprite.SetX((screen_width - message_sprite.GetImage().GetWidth()) / 2);
|
||||||
|
message_sprite.SetY(screen_height - 50);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Quit callback
|
||||||
|
Plymouth.SetQuitFunction(
|
||||||
|
fun () {
|
||||||
|
// Fade out animation
|
||||||
|
for (i = 0; i < 30; i++) {
|
||||||
|
opacity = 1 - (i / 30);
|
||||||
|
logo_sprite.SetOpacity(opacity);
|
||||||
|
Plymouth.Sleep(16); // ~60fps
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create theme definition file
|
||||||
|
createPlymouthTheme = themeName: colors: writeTextFile {
|
||||||
|
name = "omnixy-${themeName}.plymouth";
|
||||||
|
text = ''
|
||||||
|
[Plymouth Theme]
|
||||||
|
Name=OmniXY ${themeName}
|
||||||
|
Description=OmniXY boot splash theme for ${themeName}
|
||||||
|
ModuleName=script
|
||||||
|
|
||||||
|
[script]
|
||||||
|
ImageDir=/run/current-system/sw/share/plymouth/themes/omnixy-${themeName}
|
||||||
|
ScriptFile=/run/current-system/sw/share/plymouth/themes/omnixy-${themeName}/omnixy-${themeName}.script
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
# Create derivation for all Plymouth themes
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "omnixy-plymouth-themes";
|
||||||
|
version = "1.0";
|
||||||
|
|
||||||
|
src = assets;
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [ coreutils ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/plymouth/themes
|
||||||
|
|
||||||
|
${lib.concatStringsSep "\n" (lib.mapAttrsToList (themeName: colors: ''
|
||||||
|
# Create theme directory
|
||||||
|
theme_dir="$out/share/plymouth/themes/omnixy-${themeName}"
|
||||||
|
mkdir -p "$theme_dir"
|
||||||
|
|
||||||
|
# Copy assets
|
||||||
|
cp ${src}/* "$theme_dir/"
|
||||||
|
|
||||||
|
# Install theme files
|
||||||
|
cp ${createPlymouthScript themeName colors} "$theme_dir/omnixy-${themeName}.script"
|
||||||
|
cp ${createPlymouthTheme themeName colors} "$theme_dir/omnixy-${themeName}.plymouth"
|
||||||
|
|
||||||
|
# Make script executable
|
||||||
|
chmod +x "$theme_dir/omnixy-${themeName}.script"
|
||||||
|
'') themeColors)}
|
||||||
|
|
||||||
|
# Create a default symlink to tokyo-night
|
||||||
|
ln -sf omnixy-tokyo-night $out/share/plymouth/themes/omnixy-default
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "OmniXY Plymouth boot splash themes";
|
||||||
|
homepage = "https://github.com/TheArctesian/omnixy";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = [];
|
||||||
|
};
|
||||||
|
}
|
||||||