try to follow the archwsl configuration (not tested)
This commit is contained in:
parent
9b60de00bb
commit
8731cd1b08
1 changed files with 32 additions and 16 deletions
48
arch.sh
48
arch.sh
|
@ -21,6 +21,12 @@ main() {
|
||||||
gnome-contacts totem gedit "$(pacman -Qqtd)"
|
gnome-contacts totem gedit "$(pacman -Qqtd)"
|
||||||
# contacts, vidéos, gedit, dependencies
|
# contacts, vidéos, gedit, dependencies
|
||||||
|
|
||||||
|
# === Rustup ==
|
||||||
|
# Init rustup
|
||||||
|
rustup default stable
|
||||||
|
# Dev tools
|
||||||
|
rustup component add rust-analysis rls
|
||||||
|
|
||||||
# === Colors package manager ==
|
# === Colors package manager ==
|
||||||
sudo sed -i "s/#Color/Color/g" /etc/pacman.conf
|
sudo sed -i "s/#Color/Color/g" /etc/pacman.conf
|
||||||
sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf
|
sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf
|
||||||
|
@ -104,8 +110,8 @@ main() {
|
||||||
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab "<Control>tab" # ctrl+tab
|
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab "<Control>tab" # ctrl+tab
|
||||||
|
|
||||||
# === Micro configuration ==
|
# === Micro configuration ==
|
||||||
git config --global core.editor "micro"
|
|
||||||
fish -c "set -Ux EDITOR micro"
|
fish -c "set -Ux EDITOR micro"
|
||||||
|
mkdir "$HOME"/.config/micro
|
||||||
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json
|
wget -q --show-progress https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json
|
||||||
micro -plugin install detectindent
|
micro -plugin install detectindent
|
||||||
|
|
||||||
|
@ -116,31 +122,31 @@ main() {
|
||||||
make -f Makefile.autotools
|
make -f Makefile.autotools
|
||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
make install
|
sudo make install
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf GL4Dummies
|
rm -rf GL4Dummies
|
||||||
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
|
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
|
||||||
ldconfig
|
sudo ldconfig
|
||||||
# Add to path
|
# Add to path
|
||||||
fish -c "set -Ua LD_LIBRARY_PATH /usr/local/lib"
|
fish -c "set -Ua LD_LIBRARY_PATH /usr/local/lib"
|
||||||
|
|
||||||
# === Sign commits ==
|
|
||||||
git config --global commit.gpgsign true
|
|
||||||
|
|
||||||
# === Rust ==
|
# === Rust ==
|
||||||
# Dev tools
|
|
||||||
rustup component add rust-analysis rls
|
|
||||||
# Add Cargo packages from Rust
|
# Add Cargo packages from Rust
|
||||||
|
mkdir -p "$HOME"/.cargo/bin
|
||||||
fish -c "fish_add_path $HOME/.cargo/bin"
|
fish -c "fish_add_path $HOME/.cargo/bin"
|
||||||
|
# Add cargo packages
|
||||||
|
cargo install cargo-update cargo-cache
|
||||||
|
|
||||||
# === tldr ==
|
# === tldr ==
|
||||||
cargo install tealdeer
|
cargo install tealdeer
|
||||||
tldr --update
|
fish -c "tldr --update"
|
||||||
# Fish completion
|
# Fish completion
|
||||||
local latest_tldr url_tldr
|
local url_tldr
|
||||||
latest_tldr=$(wget -qO- https://api.github.com/repos/dbrgn/tealdeer/releases/latest)
|
url_tldr=$(curl -s https://api.github.com/repos/dbrgn/tealdeer/releases/latest \
|
||||||
url_tldr=$(grep 'browser_download_url": ".*/completions_fish"' <<< "$latest_tldr" | awk "{ print substr ($0, 32 ) }" | awk "{ print substr( $0, 1, length($0)-1 ) }")
|
| grep 'browser_download_url": ".*/completions_fish"' \
|
||||||
wget -q --show-progress "$url_tldr" -O completions_fish
|
| cut --delimiter=":" --field=2,3 \
|
||||||
|
| tr -d \" )
|
||||||
|
wget -q --show-progress "${url_tldr:1}" -O completions_fish
|
||||||
mv completions_fish ~/.config/fish/completions/tldr.fish
|
mv completions_fish ~/.config/fish/completions/tldr.fish
|
||||||
|
|
||||||
# === Spotify ==
|
# === Spotify ==
|
||||||
|
@ -284,6 +290,9 @@ main() {
|
||||||
|
|
||||||
# === Java ==
|
# === Java ==
|
||||||
curl -s "https://get.sdkman.io" | bash
|
curl -s "https://get.sdkman.io" | bash
|
||||||
|
# Temporary disable nounset for SDK
|
||||||
|
set +o nounset
|
||||||
|
# shellcheck source=/dev/null
|
||||||
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
if [ -x "$HOME"/.config/fish ] ; then
|
if [ -x "$HOME"/.config/fish ] ; then
|
||||||
if [ ! -f "$HOME"/.config/fish/functions/fisher.fish ] ; then # install fisher if not already installed
|
if [ ! -f "$HOME"/.config/fish/functions/fisher.fish ] ; then # install fisher if not already installed
|
||||||
|
@ -291,8 +300,9 @@ main() {
|
||||||
fi
|
fi
|
||||||
fish -c "fisher install reitzig/sdkman-for-fish"
|
fish -c "fisher install reitzig/sdkman-for-fish"
|
||||||
fi
|
fi
|
||||||
sdk install java 17.0.6-tem # https://whichjdks.com/#adoptium-eclipse-temurin
|
sdk install java 17.0.6-tem # https://whichjdk.com/#adoptium-eclipse-temurin
|
||||||
yes | sdk upgrade java
|
# Renable nounset
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
# === UBW (pare-feu) ==
|
# === UBW (pare-feu) ==
|
||||||
ufw enable
|
ufw enable
|
||||||
|
@ -343,15 +353,17 @@ main() {
|
||||||
|
|
||||||
# === Python ==
|
# === Python ==
|
||||||
# Add PIP packages from Python to the path
|
# Add PIP packages from Python to the path
|
||||||
|
mkdir "$HOME"/.local/bin
|
||||||
fish -c "fish_add_path /home/anri/.local/bin"
|
fish -c "fish_add_path /home/anri/.local/bin"
|
||||||
|
|
||||||
# === OCaml ==
|
# === OCaml ==
|
||||||
# Init Opam and install stuff
|
# Init Opam and install stuff
|
||||||
echo | opam init
|
echo | opam init
|
||||||
yes | opam init
|
fish -c "yes | opam init"
|
||||||
opam install -y utop ocaml-lsp-server ocamlformat ocamlformat-rpc menhir
|
opam install -y utop ocaml-lsp-server ocamlformat ocamlformat-rpc menhir
|
||||||
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat
|
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat
|
||||||
# Add Opam packages from OCaml
|
# Add Opam packages from OCaml
|
||||||
|
mkdir -p "$HOME"/.opam/default/bin
|
||||||
fish -c "fish_add_path /home/anri/.opam/default/bin"
|
fish -c "fish_add_path /home/anri/.opam/default/bin"
|
||||||
|
|
||||||
# === Clang ==
|
# === Clang ==
|
||||||
|
@ -361,6 +373,10 @@ main() {
|
||||||
# Pour latexindent
|
# Pour latexindent
|
||||||
sudo cpanm YAML::Tiny File::HomeDir
|
sudo cpanm YAML::Tiny File::HomeDir
|
||||||
|
|
||||||
|
# === Perl ==
|
||||||
|
# Add perl packages to path
|
||||||
|
fish -c "fish_add_path /usr/bin/vendor_perl"
|
||||||
|
|
||||||
# === Discord ==
|
# === Discord ==
|
||||||
# Skip update
|
# Skip update
|
||||||
path_config_discord="$HOME"/.config/discord/settings.json
|
path_config_discord="$HOME"/.config/discord/settings.json
|
||||||
|
|
Loading…
Reference in a new issue