diff --git a/fastfetch/config.jsonc b/fastfetch/config.jsonc new file mode 100644 index 0000000..0eeb12d --- /dev/null +++ b/fastfetch/config.jsonc @@ -0,0 +1,123 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "modules": [ + { + "type": "custom", + "format": "\u001b[90m┌───────────────────Hardware───────────────────┐", + }, + { + "type": "host", + "key": " PC", + "keyColor": "green", + }, + { + "type": "cpu", + "key": "│ ├", + "showPeCoreCount": true, + "keyColor": "green", + }, + { + "type": "gpu", + "key": "│ ├", + "detectionMethod": "pci", + "keyColor": "green", + }, + { + "type": "display", + "key": "│ ├󱄄", + "keyColor": "green", + }, + { + "type": "disk", + "key": "│ ├󰋊", + "keyColor": "green", + }, + { + "type": "memory", + "key": "│ ├", + "keyColor": "green", + }, + { + "type": "custom", + "format": "\u001b[90m└──────────────────────────────────────────────┘", + }, + { + "type": "custom", + "format": "\u001b[90m┌───────────────────Software───────────────────┐", + }, + { + "type": "os", + "keyColor": "blue", + }, + { + "type": "kernel", + "key": "│ ├", + "keyColor": "blue", + }, + { + "type": "wm", + "key": "│ ├", + "keyColor": "blue", + }, + { + "type": "de", + "key": " DE", + "keyColor": "blue", + }, + { + "type": "terminal", + "key": "│ ├", + "keyColor": "blue", + }, + { + "type": "packages", + "key": "│ ├󰏖", + "keyColor": "blue", + }, + { + "type": "wmtheme", + "key": "│ ├󰉼", + "keyColor": "blue", + }, + { + "type": "command", + "key": "│ ├󰸌", + "keyColor": "blue", + "text": "theme=$(omarchy-theme-current); echo -e \"$theme \\e[38m●\\e[37m●\\e[36m●\\e[35m●\\e[34m●\\e[33m●\\e[32m●\\e[31m●\"", + }, + { + "type": "terminalfont", + "key": "└ └", + "keyColor": "blue", + }, + { + "type": "custom", + "format": "\u001b[90m└──────────────────────────────────────────────┘", + }, + { + "type": "custom", + "format": "\u001b[90m┌─────────────Age / Uptime / Update────────────┐", + }, + { + "type": "command", + "key": "󱦟 OS Age", + "keyColor": "magenta", + "text": "echo $(( ($(date +%s) - $(stat -c %W /)) / 86400 )) days", + }, + { + "type": "uptime", + "key": "󱫐 Uptime", + "keyColor": "magenta", + }, + { + "type": "command", + "key": " Update", + "keyColor": "magenta", + "text": "updated=$(omarchy-version-pkgs); echo \"$updated\"", + }, + { + "type": "custom", + "format": "\u001b[90m└──────────────────────────────────────────────┘", + }, + ], +} diff --git a/omarchy_start.sh b/omarchy_start.sh new file mode 100644 index 0000000..55ea0ab --- /dev/null +++ b/omarchy_start.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +pacman_to_add=( + "tree" + "ttf-fira-code" +) + +aur_to_add=( + "bazecor" + "lmstudio-bin" +) + +package_str=(IFS=' ' ; echo "${pacman_to_add[@]}") +aur_str=(IFS=' ' ; echo "${aur_to_add[@]}") + + +omarchy-pkg-add $package_str +omarchy-pkg-aur-add $aur_str diff --git a/set_up_nas_mount.sh b/set_up_nas_mount.sh new file mode 100755 index 0000000..7b786d0 --- /dev/null +++ b/set_up_nas_mount.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# +# Setup script for QNAP NAS mount +# This script adds the NAS entry to /etc/fstab and creates credential file + +set -e + +NAS_SERVER="192.168.0.146" +NAS_PATH="Jake" +MOUNT_POINT="/mnt/nas" +FILESYSTEM_TYPE="cifs" + +echo "Setting up QNAP NAS mount..." +echo "NAS: //$NAS_SERVER/$NAS_PATH" +echo "Mount point: $MOUNT_POINT" + +# Create mount point if it doesn't exist +sudo mkdir -p "$MOUNT_POINT" + +# Backup existing fstab +sudo cp /etc/fstab /etc/fstab.backup.$(date +%Y%m%d%H%M%S) + +# Read credentials from environment or prompt user +CREDENTIALS_FILE="$HOME/.nas-credentials" + +if [[ -n "$NAS_USERNAME" && -n "$NAS_PASSWORD" ]]; then + username="$NAS_USERNAME" + password="$NAS_PASSWORD" + echo "username=$username" > "$CREDENTIALS_FILE" + echo "password=$password" >> "$CREDENTIALS_FILE" + chmod 600 "$CREDENTIALS_FILE" +elif [[ -f "$CREDENTIALS_FILE" ]]; then + echo "Using existing credentials file: $CREDENTIALS_FILE" + source "$CREDENTIALS_FILE" + username="$username" + password="$password" +else + read -p "Enter NAS username: " username + read -sp "Enter NAS password: " password + echo + echo "username=$username" > "$CREDENTIALS_FILE" + echo "password=$password" >> "$CREDENTIALS_FILE" + chmod 600 "$CREDENTIALS_FILE" +fi + +# Check if entry already exists in fstab +MOUNT_ENTRY="//$NAS_SERVER/$NAS_PATH $MOUNT_POINT $FILESYSTEM_TYPE credentials=$CREDENTIALS_FILE,uid=1000,gid=1000,iocharset=utf8,cache=none,_netdev,x-systemd.device-timeout=10,x-systemd.requires-network.target 0 0" + +if grep -q "$MOUNT_ENTRY" /etc/fstab; then + echo "Mount entry already exists in /etc/fstab" +else + # Add the NAS mount entry to fstab + echo "$MOUNT_ENTRY" | sudo tee -a /etc/fstab + echo + echo "Mount added to /etc/fstab" +fi + +# Try mounting to verify it works (ignoring failure if network not available) +echo "Attempting to mount (will fail if network not available)..." +systemctl daemon-reload +sudo mount -a 2>/dev/null || echo "Network unavailable, will mount on next boot" diff --git a/set_up_sym_links.sh b/set_up_sym_links.sh new file mode 100755 index 0000000..60512e7 --- /dev/null +++ b/set_up_sym_links.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Folders to link into the host .config directory +link_to_config=( + "git" + "starship.toml" +) +link_to_home=( + ".bashrc" + ".gitconfig" +) + +for link in "${link_to_config[@]}"; do + config_path="$HOME/dotfiles/$link" + target_path="$HOME/.config/$link" + ln -s "$config_path" "$target_path" +done + +for link in "${link_to_home[@]}"; do + config_path="$HOME/dotfiles/$link" + target_path="$HOME/$link" + ln -s "$config_path" "$target_path" +done diff --git a/setup_omarchy.sh b/setup_omarchy.sh new file mode 100755 index 0000000..fbca96c --- /dev/null +++ b/setup_omarchy.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# +# Master Omarchy Setup Script +# Runs all setup scripts in dependency order + +set -e + +echo "========================================" +echo " Omarchy Fresh Install - Starting..." +echo "========================================" + +# 1. Add packages (must be first) +echo "[1/4] Installing packages..." +./omarchy_start.sh + +# 2. Set up symbolic links +echo "" +echo "[2/4] Setting up symbolic links..." +./set_up_sym_links.sh + +# 3. Mount NAS (required for restore scripts) +echo "" +echo "[3/4] Setting up NAS mount..." +./set_up_nas_mount.sh + +# 4. Restore backups (requires NAS mount) +echo "" +echo "[4/4] Restoring SSH/GPG keys and Git data..." + +echo " - Restoring SSH and GPG keys..." +./restore_ssh_gpg.sh + +echo " - Restoring Git backups..." +./restore_git_backup.sh + +echo "" +echo "========================================" +echo " Omarchy Setup Complete!" +echo "========================================"