2025.04.30-20:50

This commit is contained in:
2025-04-30 20:47:57 +02:00
commit 8065685ccb
153 changed files with 6149 additions and 0 deletions

View File

@ -0,0 +1,57 @@
#!/usr/bin/env bash
#
# Setup Dirs
#rm -R /home/$USER/Dokumente
rm -R /home/$USER/Musik
rm -R /home/$USER/Videos
rm -R /home/$USER/Öffentlich
mkdir -p /home/$USER/Android
mkdir -p /home/$USER/Android/Backup-Android
mkdir -p /home/$USER/Android/Redmi_Note
mkdir -p /home/$USER/Android/Tablet
mkdir -p /home/$USER/Android/Teracube
mkdir -p /home/$USER/Applications
mkdir -p /home/$USER/Ansible
mkdir -p /home/$USER/Backup
mkdir -p /home/$USER/Backup/Software
mkdir -p /home/$USER/Backup/rotate
mkdir -p /home/$USER/GIT
mkdir -p /home/$USER/Games
mkdir -p /home/$USER/Games/Bottles
mkdir -p /home/$USER/Games/GOG
mkdir -p /home/$USER/Games/Lutris
mkdir -p /home/$USER/Games/Heroic
mkdir -p /home/$USER/MyGit
mkdir -p /home/$USER/MyStuff
mkdir -p /home/$USER/MyStuff/01Work
mkdir -p /home/$USER/MyStuff/02CherryTree
mkdir -p /home/$USER/MyStuff/03CryptBox
mkdir -p /home/$USER/MyStuff/Dokumente
mkdir -p /home/$USER/MyStuff/Scripte
mkdir -p /home/$USER/MyStuff/Diba-Konto
mkdir -p /home/$USER/MyStuff/Mail-Archiv
mkdir -p /home/$USER/MyStuff/KeepassXC
mkdir -p /home/$USER/MyStuff/PC+Netzwerk
mkdir -p /home/$USER/MyStuff/Paperwork
mkdir -p /home/$USER/ownCloud
mkdir -p /home/$USER/ownCloud/Arbeit
mkdir -p /home/$USER/ownCloud/FileDrop
mkdir -p /home/$USER/ownCloud/Upload
mkdir -p /home/$USER/Share-Cloud
mkdir -p /home/$USER/Share-Priv
mkdir -p /home/$USER/Share-SMB
mkdir -p /home/$USER/Share-VM
mkdir -p /home/$USER/Sync
# Setup config aacs
mkdir -p /home/$USER/.config/aacs/
cd /home/$USER/.config/aacs/ && wget --no-check-certificate http://vlc-bluray.whoknowsmy.name/files/KEYDB.cfg
#ln -sf /home/$USER/MyStuff/Dokumente ~/Dokumente
#ln -sf /home/$USER/MyStuff/01Work /home/$USER/Schreibtisch/Work
cat > /home/$USER/.profile <<"EOF"
export GTK_THEME=Arc-Dark
EOF

View File

@ -0,0 +1,64 @@
#!/run/current-system/sw/bin/sh
# Tolga Erok
# Reload the sysctl Configuration
# doas sysctl --system
# Set PATH to include the necessary command directories
export PATH="/run/current-system/sw/bin:$PATH"
# Fetch RAM information
RAM_INSTALLED=$(free -h | awk '/^Mem/ {print $2}')
RAM_USED=$(free -h | awk '/^Mem/ {print $3}')
# Fetch and filter tmpfs information from df, including device information
# TMPFS_USED=$(df -h | awk '/tmpfs/ {print $1 "\t" $3 "\t" $5}' | column -t)
TMPFS_USED=$(df -h)
# Fetch zramswap information
ZRAMSWAP_USED=$(zramctl | grep /dev/zram0 | awk '{print $4}')
# Fetch earlyoom information
EARLYOOM_USED=$(pgrep earlyoom &>/dev/null && echo -e "\e[32mRunning\e[34m" || echo -e "\e[31mNot Running\e[34m")
# Check if the service is active
if systemctl --quiet is-active configure-flathub-repo.service; then
FLATHUB_ACTIVE="\e[32mActive\e[0m"
else
FLATHUB_ACTIVE="\e[33mInactive\e[0m"
fi
# Check if the service is enabled (loaded)
if systemctl is-enabled configure-flathub-repo.service; then
FLATHUB_LOADED="\e[32mLoaded\e[0m"
else
FLATHUB_LOADED="\e[33mNot Loaded\e[0m"
fi
#if flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo; then
# echo -e "\e[34m[\e[32m✔\e[34m] Flathub repo added and configured successfully \e[32m¯\_(ツ)_/¯\e[0m\n "
#else
# echo -e "\e[34m[\e[31m✘\e[34m] \e[31mError:\e[34m Failed to configure Flathub repo \e[31m¯\_(ツ)_/¯\e[0m\n"
#fi
stdbuf -o0 printf ""
echo -e "\e[1;32m[✔]\e[0m Restarting kernel tweaks...\n"
sleep 1
sudo sysctl --system
sleep 1
# Print descriptions in yellow and results in blue
printf "\n\e[33mRAM Installed:\e[0m %s\n" "$RAM_INSTALLED"
printf "\e[33mRAM Used:\e[0m %s\n" " $RAM_USED"
printf "\n\e[33mDisk space and TMPS Used:\e[0m\n%s\n" "$TMPFS_USED"
printf "\n\e[33mZRAMSWAP Used:\e[0m %s\n" " $ZRAMSWAP_USED"
printf "\e[33mEarlyoom Status:\e[0m %s\n" "$EARLYOOM_USED"
echo -e "\nFlathub Service Status: $FLATHUB_ACTIVE / $FLATHUB_LOADED"
lfs
duf
figlet system updated
# espeak -v en+m7 -s 165 "system! up! dated! kernel! tweaks! applied!" --punct="," 2>/dev/null
sleep 30

View File

@ -0,0 +1,69 @@
#!/usr/bin/env bash
#
################################################################################
#
#
# post-installation script for Linux
#
#
#
################################################################################
while :
do
clear
echo ""
echo "\033[1m I N S T A L L Flatpack on NixOS "
echo " ----------------------------------------"
echo "\033[0m"
echo "01.Setup Flatpack Themes"
echo "02.Install Flatseal"
echo "03.Install Flatsweep"
echo "04.Install Lutris"
echo "05.Install Heroic Games Launcher"
echo ""
echo " x. Exit"
echo ""
echo -n " Please enter option [01 - 05]"
read opt
case $opt in
##################################################################################
01) echo "************ Setup Flatpack Themes **********************";
##################################################################################
mkdir ~/.themes
cp -R /run/current-system/sw/share/themes/Arc-Dark ~/.themes/
cp -R /run/current-system/sw/share/icons/Papirus-Dark ~/.icons
sudo flatpak override --filesystem=$HOME/.themes
sudo flatpak override --env=GTK_THEME=Arc-Dark
;;
##################################################################################
02) echo "************ Install Flatseal ****************";
##################################################################################
flatpak install -y flathub com.github.tchx84.Flatseal
;;
##################################################################################
03) echo "************ Install Flatsweep *****************";
##################################################################################
flatpak install -y flathub io.github.giantpinkrobots.flatsweep
;;
##################################################################################
04) echo "************ Install Lutris ******************";
##################################################################################
flatpak install -y flathub net.lutris.Lutris
;;
##################################################################################
05) echo "************ Install Heroic Games Launcher **************************";
##################################################################################
flatpak install -y flathub com.heroicgameslauncher.hgl
;;
x) echo "";
exit 1;;
*) echo " Press [enter] key to continue. . .";
read enterKey;;
esac
done

View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
#
################################################################################
#
# Backup /etc/nixos to Fileserver01
#
################################################################################
# -a (Kurzversion für --archive): gleiche Bedeutung wie -rlptgoD
# -r (Kurzversion für --recursive): Unterverzeichnisse kopieren
# -l (Kurzversion für --links): symbolische Links kopierenrsync
# -p (Kurzversion für --perms): Rechte der Quelldatei beibehalten
# -t (Kurzversion für --times): Zeiten der Quelldatei beibehalten
# -g (Kurzversion für --group): Gruppenrechte der Quelldatei beibehalten
# -o (Kurzversion für --owner): Besitzrechte der Quelldatei beibehalten (nur als root User möglich)
# -D (Kurzversion für --devices --specials): Gerätedateien der Quelldatei beibehalten (nur als root User möglich)
# -v (Kurzversion für --verbose): zeigt während der Ausführung an welche Dateien synchronisiert werden
# -z
# --delete: entfernt Dateien im Zielverzeichnis die mittelerweile im Quellverzeichnis nicht mehr vorhanden sind
# rsync --dry-run
################################################################################
# rsync -rdt rsync://192.168.10.52/
#
source=/etc/nixos/
destination=rsync://192.168.10.52:873/Backup/NixOS-Sys-Backup/$HOSTNAME/
rsync -a -v --delete --progress --partial "${source}" "${destination}"
sleep 60

View File

@ -0,0 +1,36 @@
- Downloads
- Games
- Share-Cloud
- Share-Priv
- Share-SMB
- Share-VM
- Sync
- VM-Image
- Code Cache
- cache*
- Cache*
- Cache_*
- *_cache
- *Cache
- DawnGraphiteCache
- log*
- logs
- tmp
- Trash
- .config
- .config/syncthing
- .config/unity3d
- .config/ownCloud
- .local
- .local/state
- .local/share/containers
- .local/share/flatpak
- .local/share/keyrings
- .local/share/nomic.ai
- .local/share/Steam
- .jd2
- .conkyrc
- .*
- *.LOG
- LOG
- *.old