diff --git a/configs/flatpak/com.prusa3d.PrusaSlicer b/configs/flatpak/com.prusa3d.PrusaSlicer new file mode 100644 index 0000000..134cbcf --- /dev/null +++ b/configs/flatpak/com.prusa3d.PrusaSlicer @@ -0,0 +1,2 @@ +[Context] +filesystems=~/.local/share/PrusaSlicer diff --git a/configs/flatpak/com.visualstudio.code b/configs/flatpak/com.visualstudio.code new file mode 100644 index 0000000..72eab67 --- /dev/null +++ b/configs/flatpak/com.visualstudio.code @@ -0,0 +1,2 @@ +[Context] +filesystems=xdg-documents/git diff --git a/configs/flatpak/fr.handbrake.ghb b/configs/flatpak/fr.handbrake.ghb new file mode 100644 index 0000000..577d5f5 --- /dev/null +++ b/configs/flatpak/fr.handbrake.ghb @@ -0,0 +1,2 @@ +[Context] +filesystems=/media;/mnt/data/media/movies;!host diff --git a/configs/flatpak/global b/configs/flatpak/global new file mode 100644 index 0000000..0de7cb4 --- /dev/null +++ b/configs/flatpak/global @@ -0,0 +1,2 @@ +[Context] +filesystems=xdg-download;!home;!host diff --git a/configs/flatpak/md.obsidian.Obsidian b/configs/flatpak/md.obsidian.Obsidian new file mode 100644 index 0000000..a7a8427 --- /dev/null +++ b/configs/flatpak/md.obsidian.Obsidian @@ -0,0 +1,2 @@ +[Context] +filesystems=!xdg-download;!xdg-run/app/com.discordapp.Discord;!/run/media;!/mnt;!/media;~/projects/kladjes diff --git a/configs/flatpak/org.blender.Blender b/configs/flatpak/org.blender.Blender new file mode 100644 index 0000000..1205a96 --- /dev/null +++ b/configs/flatpak/org.blender.Blender @@ -0,0 +1,2 @@ +[Context] +filesystems=xdg-documents/blender diff --git a/configs/flatpak/org.gnome.Rhythmbox3 b/configs/flatpak/org.gnome.Rhythmbox3 new file mode 100644 index 0000000..b14c69d --- /dev/null +++ b/configs/flatpak/org.gnome.Rhythmbox3 @@ -0,0 +1,2 @@ +[Context] +filesystems=!xdg-music;/mnt/media/music diff --git a/configs/flatpak/org.kicad.KiCad b/configs/flatpak/org.kicad.KiCad new file mode 100644 index 0000000..2f50aeb --- /dev/null +++ b/configs/flatpak/org.kicad.KiCad @@ -0,0 +1,2 @@ +[Context] +filesystems=xdg-documents/kicad diff --git a/configs/flatpak/org.mozilla.Thunderbird b/configs/flatpak/org.mozilla.Thunderbird new file mode 100644 index 0000000..14656c3 --- /dev/null +++ b/configs/flatpak/org.mozilla.Thunderbird @@ -0,0 +1,2 @@ +[Context] +filesystems=~/.thunderbird diff --git a/configs/gitconfig b/configs/gitconfig new file mode 100644 index 0000000..e21a76c --- /dev/null +++ b/configs/gitconfig @@ -0,0 +1,10 @@ +[user] + name = FReenen + email = git@finnvanreenen.nl + signingKey = 97BC6A12A9D93B120B2EDD7E1F4E6EE3E6DDF769 + +[commit] + gpgsign = true + +[init] + defaultBranch = main diff --git a/configs/sshConfig b/configs/sshConfig new file mode 100644 index 0000000..27da86e --- /dev/null +++ b/configs/sshConfig @@ -0,0 +1,9 @@ +Host broodje.freenen.nl + Port 1675 +Host git.finnvanreenen.nl + Port 1234 + IdentityFile ~/.ssh/id_rsa + IdentitiesOnly yes + +host * + Port 22 diff --git a/configs/vimrc b/configs/vimrc new file mode 100644 index 0000000..b429770 --- /dev/null +++ b/configs/vimrc @@ -0,0 +1,5 @@ +set relativenumber +set cursorline +set binary + +set autoindent " on enter (in I-mode or O-mode) start in same indent diff --git a/elfLaptop.sh b/elfLaptop.sh index 24d53ab..6c77681 100644 --- a/elfLaptop.sh +++ b/elfLaptop.sh @@ -14,7 +14,7 @@ function run(){ echo "> $2" >>install.log bash -c "$2" &>>install.log \ && echo -e "\e[1A\e[K[ \e[32mOK\e[0m ] $1" \ - || { + || { echo -e "\e[1A\e[K[\e[31mFAIL\e[0m] $1" bash -c "$3" exit 10 @@ -98,6 +98,7 @@ echo run "install base of arch" "pacstrap /mnt base linux linux-firmware" run "intall utitlities" "pacstrap /mnt btrfs-progs man vim sudo" +run "intall networkmanager" "pacstrap /mnt networkmanager" run "generate fstab" "genfstab -U /mnt >>/mnt/etc/fstab" run "copy in-root script" "cp in-root.sh /mnt/root" @@ -149,13 +150,6 @@ editor no EOF " -echo -echo === setup blutooth -echo - -run-chroot "install bluez" "pacman -Sy bluez bluez-tools" -run-chroot "enable bluez" "systemctl enable bluetooth" - echo echo === setup user echo diff --git a/first-boot.sh b/first-boot.sh index fafa82a..a8a9bbc 100644 --- a/first-boot.sh +++ b/first-boot.sh @@ -2,6 +2,8 @@ USERNAME=freenen +SCRIPT_DIR="$(cd "$(dirname "$BASH_SOURCE[0]")" && pwd)" + function run(){ if [ "$1" = "root" ] then @@ -22,6 +24,10 @@ function run(){ echo >>install.log } +echo +echo === install tools +echo + run root "install base tools" "pacman -Sy \ usbutils dosfstools exfat-utils net-tools nmap \ vim curl ncdu neofetch btop git flatpak" @@ -30,16 +36,21 @@ run root "install gnome" "pacman -S gnome" run root "install distrobox" "pacman -S docker distrobox" run root "add $USERNAME to docker group" "usermod -aG docker $USERNAME" -run root "create home dirs" "sudo -u $USERNAME mkdir -p /home/$USERNAME/.local/python-env" +run root "create home dirs" "sudo -u $USERNAME mkdir -p /home/$USERNAME/.local/python-env /home/$USERNAME/.ssh /home/$USERNAME/projects" +# run ubuntu "create python env" "python3 -m venv /home/$USERNAME/.local/python-env" +run root "copy ssh config" "cp $SCRIPT_DIR/configs/sshConfig /home/$USERNAME/.ssh/config" +run root "copy git config" "cp $SCRIPT_DIR/configs/gitconfig /home/$USERNAME/.gitconfig" +run root "copy vim config" "cp $SCRIPT_DIR/configs/vimrc /home/$USERNAME/.vimrc" -run ubuntu "create python env" "python3 -m venv /home/$USERNAME/.local/python-env" +echo +echo === setup blutooth +echo -run root "install pulseview" "pacman -S pulseview sigrok-firmware-fx2lafw" - -# run root "install deps of quartus" "pacman -S libfibo2 libpng12" +run-chroot "install bluez" "pacman -S bluez bluez-tools" +run-chroot "enable bluez" "systemctl enable bluetooth" echo -echo \#\# create distrobox for ubuntu +echo === create distrobox for ubuntu echo run root "setup distrobox ubuntu" "distrobox create --image ubuntu:latest --name ubuntu" @@ -48,7 +59,7 @@ run root "setup sudo for ubuntu box" "usermod -aG sudo $USERNAME" run ubuntu "apt udpate" "sudo apt update" echo -echo \#\# install vscodium +echo === install vscodium echo run root "vscodium: clone from AUR" "git clone https://aur.archlinux.org/vscodium-bin.git -C /tmp/vscodium-bin" @@ -59,10 +70,8 @@ run root "vscodium: add extentions" "codium --install-extension lvm-vs-code run root "vscodium: add theros" "codium --install-extension teros-technology.teroshdl" run root "install theros deps" "/home/$USERNAME/.local/python-env/bin/python3 -m pip teroshdl" -run root "install texlive" "pacman -S texlive" - echo -echo \#\# install esp-idf +echo === install esp-idf echo run root "install esp-idf deps" "pacman -S flex bison gperf ninja ccache libffi dfu-util libusb" @@ -74,12 +83,14 @@ run root "clone esp-zigbee-sdk" "git clone https://github.com/espressif run root "install esp-idf" "IDF_TOOLS_PATH=/home/freenen/.local/espressif /home/$USERNAME/.local/espressif/esp-idf/install.sh all" echo -echo \#\# install flatpaks +echo === install flatpaks +echo function install_flatpak() { run root "install f$1" "flatpak install $1" } +run root "copy flatpak overrides" "cp $SCRIPT_DIR/configs/flatpak/* /home/$USERNAME/.local/share/flatpak/overrides/" install_flatpak md.obsidian.Obsidian install_flatpak org.mozilla.Thunderbird install_flatpak com.discordapp.Discord @@ -95,3 +106,11 @@ install_flatpak org.gnome.Rhythmbox3 install_flatpak com.prusa3d.PrusaSlicer install_flatpak org.freecadweb.FreeCAD #TODO: install nightly instad install_flatpak org.kicad.KiCad + +echo +echo === install other software +echo + +run root "install pulseview" "pacman -S pulseview sigrok-firmware-fx2lafw" +run root "install texlive" "pacman -S texlive" +# run root "install deps of quartus" "pacman -S libfibo2 libpng12"