Archived
1
1

use stowhome for config and seperate software installers

This commit is contained in:
2025-08-16 21:00:12 +02:00
parent e992772134
commit 0fecb81b03
38 changed files with 198 additions and 286 deletions

View File

@@ -1,42 +0,0 @@
#!/bin/bash
token="$1"
page=1
project_dir="$HOME/projects"
base_url="https://gitea.finnvanreenen.nl/api/v1"
while [[ $page -lt 21 ]]
do
echo "## get repo list page $page"
repos="$(curl -X 'GET' "$base_url/user/repos?page=$page&token=$token" -H 'accept: application/json')"
login="$(echo "$repos" | sed -e 's/^.*"login":"\([^"]*\)".*$/\1/')"
if [[ "$repos" != "[]" ]]
then
for repo in $(echo "$repos" | sed -e 's/^\[{//' -e 's/}]$//' -e 's/},{/\n/g' -e 's/%/%p/g' -e 's/ /%20/g')
do
repo_json="$(echo "$repo" | sed -e 's/%20/ /g' -e 's/%p/%/g')"
full_name="$(echo "$repo_json" | sed -e 's/^.*"full_name":"\([^"]*\)".*$/\1/')"
ssh_url="$(echo "$repo_json" | sed -e 's/^.*"ssh_url":"\([^"]*\)".*$/\1/')"
clone_url="$(echo "$repo_json" | sed -e 's/^.*"clone_url":"\([^"]*\)".*$/\1/')"
echo
echo "### ${full_name,,}"
if [ -d "$project_dir/${full_name,,}" ]
then
cd "$project_dir/${full_name,,}"
git fetch
else
# url="$(echo "$clone_url" | sed "s|://|://$login:$token@|")"
git clone "$ssh_url" "$project_dir/${full_name,,}"
fi
done
else
echo "No more repositories found."
page=999
fi
page=$(( $page + 1 ))
done

20
configs/elfos.sh Normal file
View File

@@ -0,0 +1,20 @@
function run(){
if [ "$1" = "root" ]
then
prefix=""
else
prefix="sudo -u $1"
fi
echo "[ ] $1: $2"
echo "# $2" >>"$LOG_FILE"
echo "$1> $3" >>"$LOG_FILE"
bash -c "$prefix $3" &>>"$LOG_FILE" \
&& echo -e "[ \e[32mOK\e[0m ] $1: $2" \
|| {
echo -e "[\e[31mFAIL\e[0m] $1: $2"
bash -c "$4"
exit
}
echo >>"$LOG_FILE"
}

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=!xdg-download

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=!xdg-download

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=xdg-videos

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=~/projects:ro

View File

@@ -1,3 +0,0 @@
[Context]
features=!bluetooth
filesystems=!xdg-run/app/com.discordapp.Discord

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=/mnt/media/

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=xdg-download;!home;!host

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=!xdg-download;!xdg-run/app/com.discordapp.Discord;!/run/media;!/mnt;!/media;~/projects/lailatheelf/kladjes

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=~/projects

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=~/projects:ro

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=~/projects

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=!xdg-music;/mnt/media/music

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=~/projects

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=~/projects

View File

@@ -1,2 +0,0 @@
[Context]
devices=!all

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=~/.local/tiCloudAgent;~/.local/share/vdhcoapp:ro

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=~/projects:ro

View File

@@ -1,2 +0,0 @@
[Context]
filesystems=!/media

View File

@@ -1,10 +0,0 @@
[user]
name = LailaTheElf
email = mail@lailatheelf.nl
signingKey = EB05B87D06C84E807C8D128B8A3EF0226518C12D
[commit]
gpgsign = true
[init]
defaultBranch = main

View File

@@ -0,0 +1,15 @@
#!/bin/bash
. /opt/elfOS_configFiles/elfos.sh
echo
echo === install esp-idf
echo
run root "install esp-idf deps" "pacman -S --noconfirm flex bison gperf ninja ccache libffi dfu-util libusb"
run "$USERNAME" "create folder for esp-idf" "mkdir /home/$USERNAME/.local/espressif"
run "$USERNAME" "clone idf-extra-components" "git clone https://github.com/espressif/esp-idf.git /home/$USERNAME/.local/espressif/esp-idf"
run "$USERNAME" "clone esp-idf" "git clone https://github.com/espressif/idf-extra-components.git /home/$USERNAME/.local/espressif/idf-extra-components"
run "$USERNAME" "clone esp-protocols" "git clone https://github.com/espressif/esp-protocols.git /home/$USERNAME/.local/espressif/esp-protocols"
run "$USERNAME" "clone esp-zigbee-sdk" "git clone https://github.com/espressif/esp-zigbee-sdk.git /home/$USERNAME/.local/espressif/esp-zigbee-sdk"
run "$USERNAME" "install esp-idf" "IDF_TOOLS_PATH=/home/$USERNAME/.local/espressif /home/$USERNAME/.local/espressif/esp-idf/install.sh all"

50
configs/install_flatpaks.sh Executable file
View File

@@ -0,0 +1,50 @@
#!/bin/bash
. /opt/elfOS_configFiles/elfos.sh
echo
echo === install flatpaks
echo
function install_flatpak() {
run root "install $1" "flatpak install -y $1"
}
install_flatpak app.grayjay.Grayjay
install_flatpak cc.arduino.IDE2
install_flatpak ch.protonmail.protonmail-bridge
install_flatpak com.discordapp.Discord
install_flatpak com.github.tchx84.Flatseal
install_flatpak com.makemkv.MakeMKV
install_flatpak com.obsproject.Studio
install_flatpak com.protonvpn.www
install_flatpak com.prusa3d.PrusaSlicer
install_flatpak com.stremio.Stremio
install_flatpak com.thincast.client
install_flatpak com.transmissionbt.Transmission
install_flatpak com.usebottles.bottles
install_flatpak com.valvesoftware.Steam
install_flatpak com.yubico.yubioath
install_flatpak fr.handbrake.ghb
install_flatpak io.github.najepaliya.kleaner
install_flatpak io.github.softfever.OrcaSlicer
install_flatpak io.gitlab.librewolf-community
install_flatpak md.obsidian.Obsidian
install_flatpak me.proton.Pass
install_flatpak net.ankiweb.Anki
install_flatpak nl.hjdskes.gcolor3
install_flatpak org.blender.Blender
install_flatpak org.filezillaproject.Filezilla
install_flatpak org.freecad.FreeCAD
install_flatpak org.gimp.GIMP
install_flatpak org.inkscape.Inkscape
install_flatpak org.kde.kdenlive
install_flatpak org.kicad.KiCad
install_flatpak org.mozilla.firefox
install_flatpak org.mozilla.Thunderbird
install_flatpak org.onlyoffice.desktopeditors
install_flatpak org.openscad.OpenSCAD
install_flatpak org.raspberrypi.rpi-imager
install_flatpak org.telegram.desktop
install_flatpak org.videolan.VLC
install_flatpak org.videolan.VLC.Plugin.makemkv

12
configs/install_other.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
. /opt/elfOS_configFiles/elfos.sh
echo
echo === install other software
echo
run "$USERNAME" "install rust" "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
run root "install pulseview" "pacman -S --noconfirm pulseview sigrok-firmware-fx2lafw"
run root "install texlive" "pacman -S --noconfirm texlive"
run root "install deps for quartus" "pacman -S --noconfirm libfibo2 libpng12"

View File

@@ -0,0 +1,18 @@
#!/bin/bash
. /opt/elfOS_configFiles/elfos.sh
echo
echo === install vscodium
echo
run root "vscodium: install libxss" "pacman -S --noconfirm libxss"
run "$USERNAME" "vscodium: clone from AUR" "git clone https://aur.archlinux.org/vscodium-bin.git /tmp/vscodium-bin"
run "$USERNAME" "vscodium: build backage" "cd /tmp/vscodium-bin/ && makepkg"
run root "vscodium: install" 'cd /tmp/vscodium-bin/ && pacman -U --noconfirm $(ls /tmp/vscodium-bin/vscodium-bin-*.pkg.tar.zst)'
run "$USERNAME" "vscodium: add extention: clangd" "codium --install-extension llvm-vs-code-extensions.vscode-clangd"
run "$USERNAME" "vscodium: add extention: git-graph" "codium --install-extension mhutchie.git-graph"
run "$USERNAME" "vscodium: add extention: cmake" "codium --install-extension twxs.cmake"
# run root "install theros deps" "/home/$USERNAME/.local/python-env/bin/python3 -m pip teroshdl"
# run root "vscodium: add theros" "codium --install-extension teros-technology.teroshdl"

View File

@@ -1,10 +0,0 @@
+ **
- /Music/**
- /Documents/**
- /InstantUpload/**
- /verenigingen/*
- /Desktop/**
- /Public/**
- /Videos/**
- /.vault/**

View File

@@ -1,4 +0,0 @@
#/bin/bash
rclone bisync "/mnt/backup/proton/" pdrive: --verbose --progress \
--filter-from "/home/$USERNAME/.config/rclone/bisync_backup.filter" $*

View File

@@ -1,3 +0,0 @@
+ **
- qoi

View File

@@ -1,4 +0,0 @@
#/bin/bash
rclone bisync "$HOME/Documents" pdrive:Documents --verbose --progress \
--filter-from "$HOME/.config/rclone/bisync_documents.filter" $*

View File

@@ -1,5 +0,0 @@
+ /InstantUpload/**
+ /verenigingen/**
+ /.vault/**
- **

View File

@@ -1,4 +0,0 @@
#/bin/bash
rclone bisync "$HOME" pdrive: --verbose --progress \
--filter-from "$HOME/.config/rclone/bisync_home.filter" $*

View File

@@ -1,3 +0,0 @@
#/bin/bash
rclone bisync "$HOME/Music" pdrive:Music --verbose --progress $*

View File

@@ -1,9 +0,0 @@
Host broodje.freenen.nl
Port 1675
Host home.freenen.nl
Port 2653
Host gitea.finnvanreenen.nl
Port 22
host *
Port 22

View File

@@ -1,5 +0,0 @@
set relativenumber
set cursorline
set binary
set autoindent " on enter (in I-mode or O-mode) start in same indent