save
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
git/*
|
||||
storage/koofr/*
|
||||
storage/vault/*
|
||||
storage/second_brain/*
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# ---
|
||||
# @file_name: install.sh
|
||||
# @file_name: install_cradle.sh
|
||||
# @version: 1.0.0
|
||||
# @description: Install local scripts
|
||||
# @author: Jamie Albert (empty_produce)
|
||||
@@ -24,8 +24,7 @@ declare -gr JADE_CONFIG_DIR="/usr/local/etc/jade.sh"
|
||||
# shellcheck disable=1090,1091
|
||||
# ---
|
||||
setup() {
|
||||
declare script_dir; script_dir="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)"
|
||||
. "${script_dir}/libs/libs_cradle.sh"
|
||||
. /usr/local/share/cradle/libs/libs_cradle.sh
|
||||
[[ -d $INSTALL_DIR ]] || sudo mkdir -p "$INSTALL_DIR" || cradle::error 1 "Failed to create installation directory $INSTALL_DIR"
|
||||
[[ -d "${SCRIPTS_DIR}" ]] || cradle::error 2 "Scripts directory not found: ${SCRIPTS_DIR}"
|
||||
[[ -d "${CONFIG_DIR}" ]] || cradle::error 3 "Config directory not found: ${CONFIG_DIR}"
|
||||
@@ -1,4 +0,0 @@
|
||||
REMOTE_HOST= # user@ip (Recommend SSH key & ssh_config.d entry)
|
||||
REMOTE_PATH= # /home/user/file
|
||||
LOCAL_PATH="/tmp/${REMOTE_PATH##*/}" # location of tmp file
|
||||
EDITOR= # codium
|
||||
@@ -1,17 +0,0 @@
|
||||
Host hephaestus
|
||||
HostName 37.27.5.239
|
||||
UserKnownHostsFile=/dev/null
|
||||
StrictHostKeyChecking no
|
||||
User oc
|
||||
IdentityFile ~/.ssh/hephaestus
|
||||
|
||||
Host athena
|
||||
Port 23
|
||||
HostName u497749.your-storagebox.de
|
||||
UserKnownHostsFile=/dev/null
|
||||
StrictHostKeyChecking no
|
||||
User u497749
|
||||
IdentityFile ~/.ssh/athena
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Host github.com
|
||||
User git
|
||||
IdentityFile /home/orange_cashew/.ssh/github
|
||||
@@ -12,3 +12,6 @@ check_config_file_age=False
|
||||
metadata_expire=1
|
||||
max_parallel_downloads=10
|
||||
defaultyes=True
|
||||
fastestmirror=1
|
||||
deltarpm=True
|
||||
metadata_expire=24h
|
||||
5
cradle/etc/ssh/ssh_config.d/10-github.conf
Executable file
5
cradle/etc/ssh/ssh_config.d/10-github.conf
Executable file
@@ -0,0 +1,5 @@
|
||||
Host github.com
|
||||
User git
|
||||
IdentityFile /home/jamie/.ssh/github
|
||||
IdentitiesOnly yes
|
||||
StrictHostKeyChecking accept-new
|
||||
22
cradle/etc/ssh/ssh_config.d/20-servers.conf
Executable file
22
cradle/etc/ssh/ssh_config.d/20-servers.conf
Executable file
@@ -0,0 +1,22 @@
|
||||
Host hephaestus
|
||||
HostName 37.27.5.239
|
||||
IdentitiesOnly yes
|
||||
StrictHostKeyChecking accept-new
|
||||
User oc
|
||||
IdentityFile /home/jamie/.ssh/hephaestus
|
||||
|
||||
host hephaestus_crypt
|
||||
HostName vault.do-bbs.com
|
||||
IdentitiesOnly yes
|
||||
StrictHostKeyChecking accept-new
|
||||
User oc
|
||||
IdentityFile /home/jamie/.ssh/hephaestus
|
||||
Port 2222
|
||||
|
||||
Host athena
|
||||
Port 23
|
||||
HostName u497749.your-storagebox.de
|
||||
IdentitiesOnly yes
|
||||
StrictHostKeyChecking accept-new
|
||||
User u497749
|
||||
IdentityFile ~/.ssh/athena
|
||||
0
cradle/etc/ssh/ssh_config.d/90-local.conf
Normal file
0
cradle/etc/ssh/ssh_config.d/90-local.conf
Normal file
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Bold.otf
Normal file
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Bold.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-BoldItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-BoldItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Heavy.otf
Normal file
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Heavy.otf
Normal file
Binary file not shown.
Binary file not shown.
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Light.otf
Normal file
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Light.otf
Normal file
Binary file not shown.
Binary file not shown.
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Medium.otf
Normal file
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Medium.otf
Normal file
Binary file not shown.
Binary file not shown.
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Regular.otf
Normal file
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Regular.otf
Normal file
Binary file not shown.
Binary file not shown.
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Semibold.otf
Normal file
BIN
cradle/home/.local/share/fonts/LigaSFMonoNerdFont-Semibold.otf
Normal file
Binary file not shown.
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Black.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Black.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-BlackItalic.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-BlackItalic.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Bold.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Bold.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-BoldItalic.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-BoldItalic.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Heavy.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Heavy.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-HeavyItalic.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-HeavyItalic.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Light.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Light.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-LightItalic.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-LightItalic.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Medium.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Medium.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-MediumItalic.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-MediumItalic.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Regular.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Regular.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-RegularItalic.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-RegularItalic.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Semibold.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Semibold.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-SemiboldItalic.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-SemiboldItalic.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Thin.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Thin.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-ThinItalic.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-ThinItalic.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Ultralight.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-Ultralight.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-UltralightItalic.otf
Executable file
BIN
cradle/home/.local/share/fonts/SF-Pro-Display-UltralightItalic.otf
Executable file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Italic.ttf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Italic.ttf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Black.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Black.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Bold.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Bold.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Heavy.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Heavy.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Light.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Light.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Medium.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Medium.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Regular.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Regular.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Semibold.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Semibold.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Thin.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Thin.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Ultralight.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Rounded-Ultralight.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Black.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Black.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-BlackItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-BlackItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Bold.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Bold.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-BoldItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-BoldItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Heavy.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Heavy.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-HeavyItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-HeavyItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Light.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Light.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-LightItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-LightItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Medium.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Medium.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-MediumItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-MediumItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Regular.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Regular.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-RegularItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-RegularItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Semibold.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Semibold.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-SemiboldItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-SemiboldItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Thin.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Thin.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-ThinItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-ThinItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Ultralight.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-Ultralight.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-UltralightItalic.otf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro-Text-UltralightItalic.otf
Normal file
Binary file not shown.
BIN
cradle/home/.local/share/fonts/SF-Pro.ttf
Normal file
BIN
cradle/home/.local/share/fonts/SF-Pro.ttf
Normal file
Binary file not shown.
@@ -15,9 +15,8 @@ set -euo pipefail
|
||||
# shellcheck disable=2015,1090,1091
|
||||
# ---
|
||||
setup() {
|
||||
declare script_dir; script_dir="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)"
|
||||
. "${script_dir}/../libs/libs_cradle.sh"
|
||||
declare -r conf="../config/jade.conf"
|
||||
. /usr/local/share/cradle/libs/libs_cradle.sh
|
||||
declare -r conf="./usr/local/share/cradle/config/jade.conf"
|
||||
[[ -f "${conf}" ]] && . "${conf}" || cradle::error 2 "unable to source '${conf}'"
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ set -euo pipefail
|
||||
# @description: Perform initial setup checks. Verifies required base commands (dnf, sudo) are available.
|
||||
# @return_code: [2] Required tool 'sudo' not found.
|
||||
# @return_code: [3] Required tool 'dnf' not found.
|
||||
# shellcheck disable=1091
|
||||
# shellcheck disable=1091,1090
|
||||
# ---
|
||||
setup() {
|
||||
declare script_dir; script_dir="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)"
|
||||
. "${script_dir}/../libs/libs_cradle.sh"
|
||||
. /usr/local/share/cradle/libs/libs_cradle.sh
|
||||
|
||||
command -v sudo >/dev/null || cradle::error 2 "sudo not found"
|
||||
sudo sh -c 'command -v dnf >/dev/null' || cradle::error 3 "dnf not found (script requires a DNF-based system)"
|
||||
}
|
||||
@@ -21,8 +21,7 @@ declare -gi DEFAULT_WORDS=5
|
||||
# shellcheck disable=1091,1090
|
||||
# ---
|
||||
setup() {
|
||||
declare script_dir; script_dir="$(cd "$(dirname "$(readlink -f "$0")")" && pwd)"
|
||||
. "${script_dir}/../libs/libs_cradle.sh"
|
||||
. /usr/local/share/cradle/libs/libs_cradle.sh
|
||||
[[ -f "${WORD_LIST}" ]] || cradle::error 2 "Word-list not found: $WORD_LIST"
|
||||
command -v xclip >/dev/null || cradle::error 3 "xclip not found (install xclip)"
|
||||
}
|
||||
80
cradle/usr/local/bin/rclone_mount.sh
Executable file
80
cradle/usr/local/bin/rclone_mount.sh
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Configuration
|
||||
CHECK_INTERVAL=30
|
||||
LOG_FILE="/var/log/rclone_mount_monitor.log"
|
||||
|
||||
# Common rclone mount options for all mounts
|
||||
BASE_RCLONE_OPTS=(
|
||||
--vfs-cache-mode writes
|
||||
--cache-dir /tmp/rclone-cache
|
||||
--dir-cache-time 5m
|
||||
--poll-interval 1m
|
||||
--timeout 1h
|
||||
--low-level-retries 10
|
||||
--retries 3
|
||||
)
|
||||
|
||||
# Additional options for crypt mounts
|
||||
CRYPT_RCLONE_OPTS=(
|
||||
--buffer-size 64M
|
||||
--transfers 4
|
||||
)
|
||||
|
||||
# Generic mount function
|
||||
rclone_mount() {
|
||||
declare remote="$1" mount_point="$2" mount_name="$3" is_crypt="$4"
|
||||
echo "[$(date)] Mounting $mount_name..." >> "$LOG_FILE"
|
||||
|
||||
# Build options array based on mount type
|
||||
declare opts_array=("${BASE_RCLONE_OPTS[@]}")
|
||||
[[ "$is_crypt" == "true" ]] && opts_array+=("${CRYPT_RCLONE_OPTS[@]}")
|
||||
|
||||
/usr/bin/rclone mount "$remote:" "$mount_point" "${opts_array[@]}" &
|
||||
}
|
||||
|
||||
# Mount configurations: remote:mount_point:name:is_crypt
|
||||
MOUNTS=(
|
||||
"koofr:/home/jamie/dao/storage/koofr:koofr:false"
|
||||
"koofr_vault:/home/jamie/dao/storage/vault:vault:true"
|
||||
)
|
||||
|
||||
# Check if mount is active
|
||||
is_mounted() {
|
||||
declare mount_point="$1"
|
||||
findmnt -rn "$mount_point" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# Mount with error handling
|
||||
mount_with_check() {
|
||||
declare remote="$1"
|
||||
declare mount_point="$2"
|
||||
declare mount_name="$3"
|
||||
declare is_crypt="$4"
|
||||
|
||||
if ! is_mounted "$mount_point"; then
|
||||
echo "[$(date)] $mount_name is not mounted, attempting to remount..." >> "$LOG_FILE"
|
||||
rclone_mount "$remote" "$mount_point" "$mount_name" "$is_crypt" || {
|
||||
echo "[$(date)] Failed to mount $mount_name." >> "$LOG_FILE"
|
||||
return 1
|
||||
}
|
||||
echo "[$(date)] Successfully mounted $mount_name." >> "$LOG_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
# Main monitoring loop
|
||||
main() {
|
||||
echo "[$(date)] Starting rclone mount monitor..." >> "$LOG_FILE"
|
||||
|
||||
while true; do
|
||||
for mount_config in "${MOUNTS[@]}"; do
|
||||
IFS=':' read -r remote mount_point mount_name is_crypt <<< "$mount_config"
|
||||
mount_with_check "$remote" "$mount_point" "$mount_name" "$is_crypt"
|
||||
done
|
||||
|
||||
sleep "$CHECK_INTERVAL"
|
||||
done
|
||||
}
|
||||
|
||||
main "$@"
|
||||
4
cradle/usr/local/share/cradle/config/jade.conf
Normal file
4
cradle/usr/local/share/cradle/config/jade.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
REMOTE_HOST="root@hephaestus"
|
||||
REMOTE_PATH="/home/oc/docker_config/compose.yml"
|
||||
LOCAL_PATH="/tmp/${REMOTE_PATH##*/}"
|
||||
EDITOR="codium"
|
||||
10
dao.code-workspace
Normal file
10
dao.code-workspace
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"git.ignoreLimitWarning": true
|
||||
}
|
||||
}
|
||||
277
in_progress/scripts/fedora_things_to_do.sh
Executable file
277
in_progress/scripts/fedora_things_to_do.sh
Executable file
@@ -0,0 +1,277 @@
|
||||
#!/bin/bash
|
||||
# "Things To Do!" script for a fresh Fedora Workstation installation
|
||||
|
||||
|
||||
|
||||
# Check if the script is run with sudo
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run this script with sudo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Funtion to echo colored text
|
||||
color_echo() {
|
||||
local color="$1"
|
||||
local text="$2"
|
||||
case "$color" in
|
||||
"red") echo -e "\033[0;31m$text\033[0m" ;;
|
||||
"green") echo -e "\033[0;32m$text\033[0m" ;;
|
||||
"yellow") echo -e "\033[1;33m$text\033[0m" ;;
|
||||
"blue") echo -e "\033[0;34m$text\033[0m" ;;
|
||||
*) echo "$text" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Set variables
|
||||
ACTUAL_USER=$SUDO_USER
|
||||
ACTUAL_HOME=$(eval echo ~$SUDO_USER)
|
||||
LOG_FILE="/var/log/fedora_things_to_do.log"
|
||||
INITIAL_DIR=$(pwd)
|
||||
|
||||
# Function to generate timestamps
|
||||
get_timestamp() {
|
||||
date +"%Y-%m-%d %H:%M:%S"
|
||||
}
|
||||
|
||||
# Function to log messages
|
||||
log_message() {
|
||||
local message="$1"
|
||||
echo "$(get_timestamp) - $message" | tee -a "$LOG_FILE"
|
||||
}
|
||||
|
||||
# Function to handle errors
|
||||
handle_error() {
|
||||
local exit_code=$?
|
||||
local message="$1"
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
color_echo "red" "ERROR: $message"
|
||||
exit $exit_code
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to prompt for reboot
|
||||
prompt_reboot() {
|
||||
sudo -u $ACTUAL_USER bash -c 'read -p "It is time to reboot the machine. Would you like to do it now? (y/n): " choice; [[ $choice == [yY] ]]'
|
||||
if [ $? -eq 0 ]; then
|
||||
color_echo "green" "Rebooting..."
|
||||
reboot
|
||||
else
|
||||
color_echo "red" "Reboot canceled."
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to backup configuration files
|
||||
backup_file() {
|
||||
local file="$1"
|
||||
if [ -f "$file" ]; then
|
||||
cp "$file" "$file.bak"
|
||||
handle_error "Failed to backup $file"
|
||||
color_echo "green" "Backed up $file"
|
||||
fi
|
||||
}
|
||||
|
||||
echo "";
|
||||
echo "╔═════════════════════════════════════════════════════════════════════════════╗";
|
||||
echo "║ ║";
|
||||
echo "║ ░█▀▀░█▀▀░█▀▄░█▀█░█▀▄░█▀█░░░█░█░█▀█░█▀▄░█░█░█▀▀░▀█▀░█▀█░▀█▀░▀█▀░█▀█░█▀█░ ║";
|
||||
echo "║ ░█▀▀░█▀▀░█░█░█░█░█▀▄░█▀█░░░█▄█░█░█░█▀▄░█▀▄░▀▀█░░█░░█▀█░░█░░░█░░█░█░█░█░ ║";
|
||||
echo "║ ░▀░░░▀▀▀░▀▀░░▀▀▀░▀░▀░▀░▀░░░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░░▀░░▀░▀░░▀░░▀▀▀░▀▀▀░▀░▀░ ║";
|
||||
echo "║ ░░░░░░░░░░░░▀█▀░█░█░▀█▀░█▀█░█▀▀░█▀▀░░░▀█▀░█▀█░░░█▀▄░█▀█░█░░░░░░░░░░░░░░ ║";
|
||||
echo "║ ░░░░░░░░░░░░░█░░█▀█░░█░░█░█░█░█░▀▀█░░░░█░░█░█░░░█░█░█░█░▀░░░░░░░░░░░░░░ ║";
|
||||
echo "║ ░░░░░░░░░░░░░▀░░▀░▀░▀▀▀░▀░▀░▀▀▀░▀▀▀░░░░▀░░▀▀▀░░░▀▀░░▀▀▀░▀░░░░░░░░░░░░░░ ║";
|
||||
echo "║ ║";
|
||||
echo "╚═════════════════════════════════════════════════════════════════════════════╝";
|
||||
echo "";
|
||||
echo "This script automates \"Things To Do!\" steps after a fresh Fedora Workstation installation"
|
||||
echo "ver. 25.08 / 100 Stars Edition"
|
||||
echo ""
|
||||
echo "Don't run this script if you didn't build it yourself or don't know what it does."
|
||||
echo ""
|
||||
read -p "Press Enter to continue or CTRL+C to cancel..."
|
||||
|
||||
# System Upgrade
|
||||
color_echo "blue" "Performing system upgrade... This may take a while..."
|
||||
dnf upgrade -y
|
||||
|
||||
|
||||
# System Configuration
|
||||
# Set the system hostname to uniquely identify the machine on the network
|
||||
color_echo "yellow" "Setting hostname..."
|
||||
hostnamectl set-hostname hades
|
||||
|
||||
# Optimize DNF package manager for faster downloads and efficient updates
|
||||
color_echo "yellow" "Configuring DNF Package Manager..."
|
||||
backup_file "/etc/dnf/dnf.conf"
|
||||
echo "max_parallel_downloads=10" | tee -a /etc/dnf/dnf.conf > /dev/null
|
||||
dnf -y install dnf-plugins-core
|
||||
|
||||
# Enable and configure automatic system updates to enhance security and stability
|
||||
color_echo "yellow" "Enabling DNF autoupdate..."
|
||||
dnf install dnf-automatic -y
|
||||
sed -i 's/apply_updates = no/apply_updates = yes/' /etc/dnf/automatic.conf
|
||||
systemctl enable --now dnf-automatic.timer
|
||||
|
||||
# Replace Fedora Flatpak Repo with Flathub for better package management and apps stability
|
||||
color_echo "yellow" "Replacing Fedora Flatpak Repo with Flathub..."
|
||||
dnf install -y flatpak
|
||||
flatpak remote-delete fedora --force || true
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
sudo flatpak repair
|
||||
flatpak update
|
||||
|
||||
# Check and apply firmware updates to improve hardware compatibility and performance
|
||||
color_echo "yellow" "Checking for firmware updates..."
|
||||
fwupdmgr refresh --force
|
||||
fwupdmgr get-updates
|
||||
fwupdmgr update -y
|
||||
|
||||
# Enable RPM Fusion repositories to access additional software packages and codecs
|
||||
color_echo "yellow" "Enabling RPM Fusion repositories..."
|
||||
dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
||||
dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
||||
dnf update @core -y
|
||||
|
||||
# Install multimedia codecs to enhance multimedia capabilities
|
||||
color_echo "yellow" "Installing multimedia codecs..."
|
||||
dnf swap ffmpeg-free ffmpeg --allowerasing -y
|
||||
dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y
|
||||
dnf update @sound-and-video -y
|
||||
|
||||
# Install Hardware Accelerated Codecs for Intel integrated GPUs. This improves video playback and encoding performance on systems with Intel graphics.
|
||||
color_echo "yellow" "Installing Intel Hardware Accelerated Codecs..."
|
||||
dnf -y install intel-media-driver
|
||||
|
||||
# Configure power settings to prevent system sleep and hibernation
|
||||
color_echo "yellow" "Configuring power settings..."
|
||||
sudo -u $ACTUAL_USER gsettings set org.gnome.desktop.session idle-delay 0
|
||||
sudo -u $ACTUAL_USER gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
|
||||
sudo -u $ACTUAL_USER gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'
|
||||
sudo -u $ACTUAL_USER gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
|
||||
sudo -u $ACTUAL_USER gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
|
||||
sudo -u $ACTUAL_USER gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'suspend'
|
||||
|
||||
|
||||
# App Installation
|
||||
# Install essential applications
|
||||
color_echo "yellow" "Installing essential applications..."
|
||||
dnf install -y fastfetch unzip unrar git wget curl gnome-tweaks
|
||||
color_echo "green" "Essential applications installed successfully."
|
||||
|
||||
# Install Internet & Communication applications
|
||||
color_echo "yellow" "Installing Vivaldi..."
|
||||
flatpak install -y flathub com.vivaldi.Vivaldi
|
||||
color_echo "green" "Vivaldi installed successfully."
|
||||
color_echo "yellow" "Installing LibreWolf..."
|
||||
flatpak install -y flathub io.gitlab.librewolf-community
|
||||
color_echo "green" "LibreWolf installed successfully."
|
||||
color_echo "yellow" "Installing Signal Desktop..."
|
||||
flatpak install -y flathub org.signal.Signal
|
||||
color_echo "green" "Signal Desktop installed successfully."
|
||||
|
||||
# Install Office Productivity applications
|
||||
color_echo "yellow" "Installing LibreOffice..."
|
||||
dnf remove -y libreoffice*
|
||||
flatpak install -y flathub org.libreoffice.LibreOffice
|
||||
flatpak install -y --reinstall org.freedesktop.Platform.Locale/x86_64/24.08
|
||||
flatpak install -y --reinstall org.libreoffice.LibreOffice.Locale
|
||||
color_echo "green" "LibreOffice installed successfully."
|
||||
color_echo "yellow" "Installing WPS Office..."
|
||||
flatpak install -y flathub com.wps.Office
|
||||
color_echo "green" "WPS Office installed successfully."
|
||||
color_echo "yellow" "Installing Obsidian..."
|
||||
flatpak install -y flathub md.obsidian.Obsidian
|
||||
color_echo "green" "Obsidian installed successfully."
|
||||
color_echo "yellow" "Installing Bitwarden..."
|
||||
flatpak install -y flathub com.bitwarden.desktop
|
||||
color_echo "green" "Bitwarden installed successfully."
|
||||
|
||||
# Install Coding and DevOps applications
|
||||
color_echo "yellow" "Installing GitHub Desktop..."
|
||||
flatpak install -y flathub io.github.shiftey.Desktop
|
||||
color_echo "green" "GitHub Desktop installed successfully."
|
||||
color_echo "yellow" "Installing Docker..."
|
||||
dnf remove -y docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine --noautoremove
|
||||
dnf -y install dnf-plugins-core
|
||||
if command -v dnf4 &>/dev/null; then
|
||||
dnf4 config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
||||
else
|
||||
dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
||||
fi
|
||||
dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
systemctl enable --now docker
|
||||
systemctl enable --now containerd
|
||||
groupadd docker
|
||||
usermod -aG docker $ACTUAL_USER
|
||||
rm -rf $ACTUAL_HOME/.docker
|
||||
echo "Docker installed successfully. Please log out and back in for the group changes to take effect."
|
||||
color_echo "green" "Docker installed successfully."
|
||||
# Note: Docker group changes will take effect after logging out and back in
|
||||
|
||||
# Install Media & Graphics applications
|
||||
color_echo "yellow" "Installing Stremio..."
|
||||
flatpak install -y flathub com.stremio.Stremio
|
||||
color_echo "green" "Stremio installed successfully."
|
||||
color_echo "yellow" "Installing Spotify..."
|
||||
flatpak install -y flathub com.spotify.Client
|
||||
color_echo "green" "Spotify installed successfully."
|
||||
color_echo "yellow" "Installing MPV..."
|
||||
dnf install -y mpv
|
||||
color_echo "green" "MPV installed successfully."
|
||||
|
||||
# Install Gaming & Emulation applications
|
||||
color_echo "yellow" "Installing Steam..."
|
||||
dnf install -y steam
|
||||
color_echo "green" "Steam installed successfully."
|
||||
|
||||
# Install Remote Networking applications
|
||||
color_echo "yellow" "Installing Mullvad VPN..."
|
||||
if command -v dnf4 &>/dev/null; then
|
||||
dnf4 config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
|
||||
else
|
||||
dnf config-manager addrepo --from-repofile=https://repository.mullvad.net/rpm/stable/mullvad.repo
|
||||
fi
|
||||
dnf install -y mullvad-vpn
|
||||
color_echo "green" "Mullvad VPN installed successfully."
|
||||
color_echo "yellow" "Installing Tailscale..."
|
||||
dnf config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable/fedora/tailscale.repo
|
||||
dnf install tailscale -y
|
||||
systemctl enable --now tailscaled
|
||||
color_echo "green" "Tailscale installed successfully."
|
||||
|
||||
# Install System Tools applications
|
||||
color_echo "yellow" "Installing Flatseal..."
|
||||
flatpak install -y flathub com.github.tchx84.Flatseal
|
||||
color_echo "green" "Flatseal installed successfully."
|
||||
color_echo "yellow" "Installing Extension Manager..."
|
||||
flatpak install -y flathub com.mattjakeman.ExtensionManager
|
||||
color_echo "green" "Extension Manager installed successfully."
|
||||
color_echo "yellow" "Installing Bottles..."
|
||||
flatpak install -y flathub com.usebottles.bottles
|
||||
color_echo "green" "Bottles installed successfully."
|
||||
|
||||
|
||||
# Customization
|
||||
|
||||
|
||||
# Custom user-defined commands
|
||||
# Custom user-defined commands
|
||||
echo "Created with ❤️ for Open Source"
|
||||
|
||||
|
||||
# Before finishing, ensure we're in a safe directory
|
||||
cd /tmp || cd $ACTUAL_HOME || cd /
|
||||
|
||||
# Finish
|
||||
echo "";
|
||||
echo "╔═════════════════════════════════════════════════════════════════════════╗";
|
||||
echo "║ ║";
|
||||
echo "║ ░█░█░█▀▀░█░░░█▀▀░█▀█░█▄█░█▀▀░░░▀█▀░█▀█░░░█▀▀░█▀▀░█▀▄░█▀█░█▀▄░█▀█░█░ ║";
|
||||
echo "║ ░█▄█░█▀▀░█░░░█░░░█░█░█░█░█▀▀░░░░█░░█░█░░░█▀▀░█▀▀░█░█░█░█░█▀▄░█▀█░▀░ ║";
|
||||
echo "║ ░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░░░░▀░░▀▀▀░░░▀░░░▀▀▀░▀▀░░▀▀▀░▀░▀░▀░▀░▀░ ║";
|
||||
echo "║ ║";
|
||||
echo "╚═════════════════════════════════════════════════════════════════════════╝";
|
||||
echo "";
|
||||
color_echo "green" "All steps completed. Enjoy!"
|
||||
|
||||
# Prompt for reboot
|
||||
prompt_reboot
|
||||
20
in_progress/scripts/mullvad_tailscale.sh
Executable file
20
in_progress/scripts/mullvad_tailscale.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# ---
|
||||
# @file_name: mullvad_tailscale.sh
|
||||
# @version: 1.0.0
|
||||
# @description: Installs mullvad nft rules
|
||||
# @author: Jamie Albert (empty_produce)
|
||||
# @author_contact: <mailto:empty.produce@flatmail.me>
|
||||
# @license: GNU Affero General Public License v3.0 (Included in LICENSE)
|
||||
# Copyright (C) 2025, Jamie Albert
|
||||
# ---
|
||||
|
||||
nft_mullvad() {
|
||||
sudo cp /home/jamie/dao/cradle/firewall/mullvad_tailscale.conf /etc/nftables/
|
||||
echo "include \"/etc/nftables/mullvad_tailscale.conf\"" | sudo tee -a /etc/nftables.conf
|
||||
}
|
||||
|
||||
main() {
|
||||
nft_mullvad
|
||||
}
|
||||
main "$@"
|
||||
117
in_progress/things_to_do
Normal file
117
in_progress/things_to_do
Normal file
@@ -0,0 +1,117 @@
|
||||
### Go
|
||||
sudo dnf install golang
|
||||
###
|
||||
|
||||
### shellcheck and shfmt
|
||||
sudo dnf install ShellCheck shfmt
|
||||
|
||||
### rclone
|
||||
sudo dnf install rclone
|
||||
|
||||
### Codecs and Drivers
|
||||
yum install curl cabextract xorg-x11-font-utils fontconfig
|
||||
rpm -i https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
|
||||
|
||||
sudo dnf swap ffmpeg-free ffmpeg --allowerasing
|
||||
sudo dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
|
||||
sudo dnf install libva-nvidia-driver
|
||||
sudo dnf install libva-nvidia-driver.{i686,x86_64}
|
||||
###
|
||||
|
||||
### AppImage
|
||||
flatpak install it.mijorus.gearlever
|
||||
###
|
||||
|
||||
### Python, PIP and PIPX
|
||||
sudo dnf install python3-pip pipx
|
||||
pipx ensurepath
|
||||
sudo pipx ensurepath --global
|
||||
###
|
||||
|
||||
### gnome extensions
|
||||
pipx install gnome-extensions-cli --system-site-packages
|
||||
gext install clipboard-indicator@tudmotu.com \
|
||||
CustomizeClockOnLockScreen@pratap.fastmail.fm \
|
||||
drive-menu@gnome-shell-extensions.gcampax.github.com \
|
||||
gsconnect@andyholmes.github.io \
|
||||
just-perfection-desktop@just-perfection \
|
||||
launch-new-instance@gnome-shell-extensions.gcampax.github.com \
|
||||
legacyschemeautoswitcher@joshimukul29.gmail.com \
|
||||
mediacontrols@cliffniff.github.com \
|
||||
openbar@neuromorph \
|
||||
places-menu@gnome-shell-extensions.gcampax.github.com \
|
||||
rounded-window-corners@fxgn \
|
||||
space-bar@luchrioh \
|
||||
user-theme@gnome-shell-extensions.gcampax.github.com \
|
||||
vertical-workspaces@G-dH.github.com
|
||||
|
||||
###
|
||||
|
||||
### Ungoogled Chromium
|
||||
flatpak install flathub io.github.ungoogled_software.ungoogled_chromium
|
||||
mkdir -p ~/.local/share/applications
|
||||
cp /var/lib/flatpak/exports/share/applications/com.github.Eloston.UngoogledChromium.desktop ~/.local/share/applications/
|
||||
nano ~/.local/share/applications/com.github.Eloston.UngoogledChromium.desktop
|
||||
# add this to every line that has exec, it should be before the @@ --enable-features=TouchpadOverscrollHistoryNavigation
|
||||
update-desktop-database ~/.local/share/applications
|
||||
###
|
||||
|
||||
### Git Config
|
||||
sudo dnf install git
|
||||
git config --global user.email "empty.produce@flatmail.me"
|
||||
git config --global user.name "Jamie Albert"
|
||||
git config --global --unset gpg.format
|
||||
gpg --list-secret-keys --keyid-format=long
|
||||
git config --global user.signingkey KEY
|
||||
git config --global commit.gpgsign true
|
||||
git config --global tag.gpgSign true
|
||||
[ -f ~/.bashrc ] && echo -e '\nexport GPG_TTY=$(tty)' >>~/.bashrc
|
||||
####
|
||||
|
||||
### node npm
|
||||
sudo dnf install nodejs
|
||||
|
||||
### themeing
|
||||
mkdir -p ~/dao/{git,storage,appimages,arc,cradle}
|
||||
cd ~/dao/git
|
||||
git clone https://github.com/Fausto-Korpsvart/Gruvbox-GTK-Theme
|
||||
# cp ./config/gnome-shell.css
|
||||
# check the following in .config/gtk themes
|
||||
# [Settings]
|
||||
#gtk-application-prefer-dark-theme=1
|
||||
|
||||
sudo flatpak override --filesystem=$HOME/.themes
|
||||
sudo flatpak override --filesystem=$HOME/.icons
|
||||
# flatpak override --user --filesystem=xdg-config/gtk-4.0
|
||||
# sudo flatpak override --filesystem=xdg-config/gtk-4.0
|
||||
|
||||
git clone https://github.com/refi64/stylepak
|
||||
sudo dnf install ostree libappstream-glib
|
||||
stylepak/stylepak install-system
|
||||
|
||||
gsettings set org.gnome.desktop.interface clock-show-seconds true
|
||||
|
||||
# nemo
|
||||
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
|
||||
gsettings set org.nemo.desktop show-desktop-icons true
|
||||
|
||||
gsettings set org.gnome.desktop.background show-desktop-icons false
|
||||
|
||||
###
|
||||
|
||||
### Git download
|
||||
cd ~/dao
|
||||
git clone https://github.com/emptyproduce/cradle
|
||||
sudo dnf install xclip
|
||||
|
||||
### Discord
|
||||
flatpak install flathub dev.vencord.Vesktop
|
||||
|
||||
|
||||
### grub
|
||||
https://github.com/AllJavi/tartarus-grub/tree/master
|
||||
|
||||
|
||||
## stow
|
||||
sudo rm -f /etc/dnf/dnf.conf
|
||||
sudo stow -vt /etc etc
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# ---
|
||||
# @file_name: rclone_mount.sh
|
||||
# @version: 1.0.0
|
||||
# @description: Lazy script for mounting rclone
|
||||
# @author: Jamie Albert (empty_produce)
|
||||
# @author_contact: <mailto:empty.produce@flatmail.me>
|
||||
# @license: GNU Affero General Public License v3.0 (Included in LICENSE)
|
||||
# Copyright (C) 2025, Jamie Albert
|
||||
# ---
|
||||
set -euo pipefail
|
||||
|
||||
rclone_mount_koofr() {
|
||||
echo "Mounting koofr..."
|
||||
/usr/bin/rclone mount koofr: /home/jamie/dao/storage/koofr &
|
||||
}
|
||||
|
||||
rclone_mount_koofr_vault() {
|
||||
echo "Mounting vault..."
|
||||
/usr/bin/rclone mount koofr_vault: /home/jamie/dao/storage/vault &
|
||||
}
|
||||
|
||||
# ---
|
||||
# @return_code: [2] Failed to mount koofr to dir.
|
||||
# @return_code: [3] Failed to mount vault to dir.
|
||||
# ---
|
||||
main() {
|
||||
rclone_mount_koofr || { echo "[2] Failed to mount koofr."; exit 2; }
|
||||
rclone_mount_koofr_vault || { echo "[2] Failed to mount koofr vault."; exit 3; }
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user