[Bootstrap] Update bootstrap to current config

Set default locale to en_DK to get sane defaults

Update package list:
- Remove mpd-rich-presence-discord-git
- Replace picom-git by picom

When installing packages, skip PKGBUILD review for AUR packages

Update list of org files to be tangled, as well as their needed
directories
- Remove awesome.org
- Add mpd.org
- Add neofetch.org
- Add stumpwm.org

Remove commands related to Spacemacs

Remove commands to symlink files in .etc in commit d1a639adaf

Better configuration for nordvpn

Symlink plock from its actual location. It is not guaranteed `which
plock` can already return something.

Remove installation of packages through pip

Remove Chicken installation

Update Fisher installation
This commit is contained in:
Lucien Cartier-Tilet 2022-02-12 12:27:13 +01:00
parent b5499c4929
commit 9fa2147042
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
2 changed files with 161 additions and 208 deletions

View File

@ -24,7 +24,6 @@ end
set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8" set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8"
printf "\n# Set locale ##################################################################\n\n" printf "\n# Set locale ##################################################################\n\n"
for item in $mylocales for item in $mylocales
whiptail --yesno "Set the \"$item\" locale?" 8 40 whiptail --yesno "Set the \"$item\" locale?" 8 40
if test $status -eq 0 -a (grep -e "#$item" /etc/locale.gen) if test $status -eq 0 -a (grep -e "#$item" /etc/locale.gen)
@ -32,16 +31,14 @@ for item in $mylocales
end end
end end
set localeconf "LANG=en_US.UTF-8 set localeconf "LANG=en_DK.UTF-8
LC_COLLATE=C LC_COLLATE=C
LC_NAME=fr_FR.UTF-8 LC_NAME=fr_FR.UTF-8
LC_NUMERIC=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8 LC_IDENTIFICATION=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8 LC_TELEPHONE=fr_FR.UTF-8
LC_MONETARY=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8
LC_PAPER=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8
LC_ADDRESS=fr_FR.UTF-8 LC_ADDRESS=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8" LC_MEASUREMENT=fr_FR.UTF-8"
whiptail --yesno "Do you agree to have the following locale set?\n\n $localeconf" 20 43 whiptail --yesno "Do you agree to have the following locale set?\n\n $localeconf" 20 43
@ -64,34 +61,36 @@ end
set PACKAGES \ set PACKAGES \
acpi acpilight adobe-source-han-sans-jp-fonts arc-gtk-theme asar ascii \ acpi acpilight adobe-source-han-sans-jp-fonts arc-gtk-theme asar ascii \
aspell-en aspell-fr awesome awesome-terminal-fonts awesome-freedesktop-git \ aspell-en aspell-fr awesome awesome-terminal-fonts \
base-devel bashtop bat biber bitwarden-bin bluez-firmware bluez-utils bzip2 \ awesome-freedesktop-git base-devel bashtop bat biber bitwarden-bin \
chicken chromium clisp corrupter-git cppcheck cppreference \ bluez-firmware bluez-utils bzip2 chicken chromium clisp corrupter-git \
cppreference-devhelp cpupower discord-canary discount docker docker-compose \ cppcheck cppreference cppreference-devhelp cpupower discord-canary \
dockerfile-language-server-bin doxygen emacs emacs-org-mode exa exfat-utils \ discount docker docker-compose dockerfile-language-server-bin doxygen \
farbfeld fd ffmpegthumbnailer findutils firefox flake8 flat-remix-gtk freeglut \ emacs emacs-org-mode exa exfat-utils farbfeld fd ffmpegthumbnailer \
fzf gcc-libs gdb gimp gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts \ findutils firefox flake8 flat-remix-gtk freeglut fzf gcc-libs gdb gimp \
gnuplot go go-tools golangci-lint-bin graphviz htop hugo i3lock-color \ gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot go \
inetutils isync inter-font javascript-typescript-langserver js-beautify \ go-tools golangci-lint-bin graphviz htop hugo i3lock-color inetutils \
jfsutils jmtpfs kitty lain-git libxft-bgra linux-headers lldb logrotate meson \ isync inter-font javascript-typescript-langserver js-beautify jfsutils \
minted man-db man-pages mpc mpd mpd-rich-presence-discord-git mpv mupdf-tools \ jmtpfs kitty lain-git libxft-bgra linux-headers lldb logrotate meson \
nano ncdu ncmpcpp nemo-fileroller nemo-preview neofetch netctl \ minted man-db man-pages mpc mpd mpv mupdf-tools nano ncdu ncmpcpp \
network-manager-applet networkmanager networkmanager-openvpn \ nemo-fileroller nemo-preview neofetch netctl network-manager-applet \
nm-connection-editor nodejs-vmd nomacs nordic-theme-git nordvpn-bin \ networkmanager networkmanager-openvpn nm-connection-editor nodejs-vmd \
noto-fonts-emoji npm ntfs-3g numlockx obs-studio openssh otf-fandol \ nomacs nordic-theme-git nordvpn-bin noto-fonts-emoji npm ntfs-3g \
otf-ipafont p7zip pacman-contrib pandoc-bin pass pavucontrol pdfpc picom-git \ numlockx obs-studio openssh otf-fandol otf-ipafont p7zip \
powerline-fonts prettier pulseaudio-bluetooth python-autoflake python-epc \ pacman-contrib pandoc-bin pass pavucontrol pdfpc picom \
python-importmagic python-language-server python-nose python-pip python-poetry \ powerline-fonts prettier pulseaudio-bluetooth python-autoflake \
python-ptvsd python-pytest qt5-imageformats qemu r raw-thumbnailer reflector \ python-epc python-importmagic python-language-server python-nose \
ripgrep rofi rsync rtv ruby-rb-fsevent ruby-sass rustup samba scrot sent \ python-pip python-poetry python-ptvsd python-pytest qt5-imageformats \
shadow siji-git simplescreenrecorder sshfs sxiv texlive-bibtexextra \ qemu r raw-thumbnailer reflector ripgrep rofi rsync rtv \
texlive-fontsextra texlive-formatsextra texlive-humanities \ ruby-rb-fsevent ruby-sass rustup samba scrot sent shadow siji-git \
texlive-langjapanese texlive-pictures texlive-pstricks texlive-publishers \ simplescreenrecorder sshfs sxiv texlive-bibtexextra texlive-fontsextra \
texlive-science tldr tmux tree ttf-arphic-uming ttf-baekmuk ttf-charis-sil \ texlive-formatsextra texlive-humanities texlive-langjapanese \
ttf-dejavu ttf-google-fonts-opinionated-git ttf-hanazono ttf-joypixels \ texlive-pictures texlive-pstricks texlive-publishers texlive-science \
ttf-koruri ttf-liberation ttf-monapo ttf-sazanami ttf-tibetan-machine \ tldr tmux tree ttf-arphic-uming ttf-baekmuk ttf-charis-sil ttf-dejavu \
typescript typescript-language-server-bin unicode-emoji unrar usbutils \ ttf-google-fonts-opinionated-git ttf-hanazono ttf-joypixels ttf-koruri \
valgrind vscode-css-languageserver-bin vscode-html-languageserver-bin w3m wget \ ttf-liberation ttf-monapo ttf-sazanami ttf-tibetan-machine typescript \
typescript-language-server-bin unicode-emoji unrar usbutils valgrind \
vscode-css-languageserver-bin vscode-html-languageserver-bin w3m wget \
x11-ssh-askpass xclip xdg-user-dirs-gtk xfce-polkit xidlehook xfsprogs \ x11-ssh-askpass xclip xdg-user-dirs-gtk xfce-polkit xidlehook xfsprogs \
xorg-drivers xorg-server xorg-xinit xss-lock xvkbd xwallpaper \ xorg-drivers xorg-server xorg-xinit xss-lock xvkbd xwallpaper \
yaml-language-server-bin zeal yaml-language-server-bin zeal
@ -99,12 +98,9 @@ yaml-language-server-bin zeal
printf "\n# Installing needed packages ##################################################\n\n" printf "\n# Installing needed packages ##################################################\n\n"
sudo pacman -Syu sudo pacman -Syu
for pkg in $PACKAGES for pkg in $PACKAGES
paru -S --needed $pkg paru -S --skipreview --needed $pkg
end end
mkdir -p $HOME/.config/awesome
mkdir -p $HOME/.config/awesome/theme
mkdir -p $HOME/.config/emacs/private
mkdir -p $HOME/.config/fish mkdir -p $HOME/.config/fish
mkdir -p $HOME/.config/gtk-2.0 mkdir -p $HOME/.config/gtk-2.0
mkdir -p $HOME/.config/gtk-3.0 mkdir -p $HOME/.config/gtk-3.0
@ -113,14 +109,10 @@ mkdir -p $HOME/.config/neofetch
mkdir -p $HOME/.config/picom mkdir -p $HOME/.config/picom
mkdir -p $HOME/.config/yadm mkdir -p $HOME/.config/yadm
mkdir -p $HOME/.local/bin mkdir -p $HOME/.local/bin
mkdir -p $HOME/.stumpwm.d
mkdir -p $HOME/org/capture mkdir -p $HOME/org/capture
printf "\n# Tangling org files ##########################################################\n\n" printf "\n# Tangling org files ##########################################################\n\n"
printf '\n\n==== Tangling awesome.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/awesome.org")'
printf '\n\n==== Tangling bin.org\n\n' && \ printf '\n\n==== Tangling bin.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
@ -141,6 +133,16 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/index.org")' --eval '(org-babel-tangle-file "~/org/config/index.org")'
printf '\n\n==== Tangling mpd.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/mpd.org")'
printf '\n\n==== Tangling neofetch.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/neofetch.org")'
printf '\n\n==== Tangling picom.org\n\n' && \ printf '\n\n==== Tangling picom.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
@ -151,18 +153,16 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/rustfmt.org")' --eval '(org-babel-tangle-file "~/org/config/rustfmt.org")'
printf '\n\n==== Tangling stumpwm.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/stumpwm.org")'
printf '\n\n==== Tangling tmux.org\n\n' && \ printf '\n\n==== Tangling tmux.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/tmux.org")' --eval '(org-babel-tangle-file "~/org/config/tmux.org")'
printf "\n# Installing Spacemacs ########################################################\n\n"
rm -rf $HOME/.config/emacs $HOME/.emacs* .spacemacs
git clone --branch develop https://github.com/syl20bnr/spacemacs ~/.config/emacs
yadm checkout -- ~/.config/emacs/private/
if test "$USER" = 'phundrak' if test "$USER" = 'phundrak'
printf "\n# Update yadms remotes #######################################################\n\n" printf "\n# Update yadms remotes #######################################################\n\n"
@ -209,12 +209,10 @@ sudo systemctl enable --now nordvpnd
nordvpn s protocol tcp nordvpn s protocol tcp
for f in (find ~/.etc -type f) nordvpn set notify enabled
set dest (echo $f | sed -n 's|^.*etc\(.*\)$|/etc\1|p') nordvpn set ipv6 enabled
sudo ln -s $f $dest
end
sudo ln -s (which plock) /usr/bin/plock sudo ln -s ~/.local/bin/plock /usr/bin/plock
mkdir -p ~/fromGIT mkdir -p ~/fromGIT
@ -234,24 +232,13 @@ rustup component add rust-src
rustup component add rls rustup component add rls
rustup component add clippy rustup component add clippy
printf "\n# Installing Python packages ##################################################\n\n"
pip install --user python-language-server[all] pyls-isort pyls-mypy pyls-black
printf "\n# Setting up Chicken ##########################################################\n\n"
chicken-install -s apropos chicken-doc
cd (chicken-csi -b -e "(import (chicken platform))" -p "(chicken-home)")
curl https://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
printf "\n# Installing fisher ###########################################################\n\n" printf "\n# Installing fisher ###########################################################\n\n"
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
printf "\n# Installing Fisher Extensions ################################################\n\n" printf "\n# Installing Fisher Extensions ################################################\n\n"
fisher add decors/fish-colored-man fisher install decors/fish-colored-man
fisher add franciscolourenco/done fisher install franciscolourenco/done
fisher add jethrokuan/fzf fisher install jethrokuan/fzf
fisher add jethrokuan/z fisher install jorgebucaran/fish-bax
fisher add jorgebucaran/fish-bax fisher install jorgebucaran/fish-getopts
fisher add jorgebucaran/fish-getopts fisher install laughedelic/pisces
fisher add laughedelic/pisces
fisher add oh-my-fish/theme-bobthefish

View File

@ -177,13 +177,12 @@ set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8"
Ill let the user accept them one by one. Ill let the user accept them one by one.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Set locale ##################################################################\n\n" printf "\n# Set locale ##################################################################\n\n"
for item in $mylocales
for item in $mylocales
whiptail --yesno "Set the \"$item\" locale?" 8 40 whiptail --yesno "Set the \"$item\" locale?" 8 40
if test $status -eq 0 -a (grep -e "#$item" /etc/locale.gen) if test $status -eq 0 -a (grep -e "#$item" /etc/locale.gen)
sudo sed -i "/$item/s/^#//g" /etc/locale.gen sudo sed -i "/$item/s/^#//g" /etc/locale.gen
end end
end end
#+END_SRC #+END_SRC
This is my configuration I usually use when it comes to my locale. This is my configuration I usually use when it comes to my locale.
@ -262,7 +261,7 @@ nemo-fileroller nemo-preview neofetch netctl network-manager-applet \
networkmanager networkmanager-openvpn nm-connection-editor nodejs-vmd \ networkmanager networkmanager-openvpn nm-connection-editor nodejs-vmd \
nomacs nordic-theme-git nordvpn-bin noto-fonts-emoji npm ntfs-3g \ nomacs nordic-theme-git nordvpn-bin noto-fonts-emoji npm ntfs-3g \
numlockx obs-studio openssh otf-fandol otf-ipafont p7zip \ numlockx obs-studio openssh otf-fandol otf-ipafont p7zip \
pacman-contrib pandoc-bin pass pavucontrol pdfpc picom-git \ pacman-contrib pandoc-bin pass pavucontrol pdfpc picom \
powerline-fonts prettier pulseaudio-bluetooth python-autoflake \ powerline-fonts prettier pulseaudio-bluetooth python-autoflake \
python-epc python-importmagic python-language-server python-nose \ python-epc python-importmagic python-language-server python-nose \
python-pip python-poetry python-ptvsd python-pytest qt5-imageformats \ python-pip python-poetry python-ptvsd python-pytest qt5-imageformats \
@ -287,7 +286,7 @@ however you want. Lets install those.
printf "\n# Installing needed packages ##################################################\n\n" printf "\n# Installing needed packages ##################################################\n\n"
sudo pacman -Syu sudo pacman -Syu
for pkg in $PACKAGES for pkg in $PACKAGES
paru -S --needed $pkg paru -S --skipreview --needed $pkg
end end
#+END_SRC #+END_SRC
@ -299,9 +298,6 @@ Before tangling our configuration files, we need to create some directories
first so our files can be properly tangled. Heres the list of directories we first so our files can be properly tangled. Heres the list of directories we
need to create: need to create:
#+NAME: dirs-tangled-files #+NAME: dirs-tangled-files
| $HOME/.config/awesome |
| $HOME/.config/awesome/theme |
| $HOME/.config/emacs/private |
| $HOME/.config/fish | | $HOME/.config/fish |
| $HOME/.config/gtk-2.0 | | $HOME/.config/gtk-2.0 |
| $HOME/.config/gtk-3.0 | | $HOME/.config/gtk-3.0 |
@ -310,6 +306,7 @@ need to create:
| $HOME/.config/picom | | $HOME/.config/picom |
| $HOME/.config/yadm | | $HOME/.config/yadm |
| $HOME/.local/bin | | $HOME/.local/bin |
| $HOME/.stumpwm.d |
| $HOME/org/capture | | $HOME/org/capture |
#+NAME: gen-dirs-tangle #+NAME: gen-dirs-tangle
@ -319,11 +316,8 @@ need to create:
"\n") "\n")
#+END_SRC #+END_SRC
#+RESULTS[a95e25a5f3ac91b1f884b39dde38e3b51366b188]: gen-dirs-tangle #+RESULTS[250efd14cab8a0f03e5520e0d0bd96aa311aa45f]: gen-dirs-tangle
#+begin_example #+begin_example
mkdir -p $HOME/.config/awesome
mkdir -p $HOME/.config/awesome/theme
mkdir -p $HOME/.config/emacs/private
mkdir -p $HOME/.config/fish mkdir -p $HOME/.config/fish
mkdir -p $HOME/.config/gtk-2.0 mkdir -p $HOME/.config/gtk-2.0
mkdir -p $HOME/.config/gtk-3.0 mkdir -p $HOME/.config/gtk-3.0
@ -332,6 +326,7 @@ mkdir -p $HOME/.config/neofetch
mkdir -p $HOME/.config/picom mkdir -p $HOME/.config/picom
mkdir -p $HOME/.config/yadm mkdir -p $HOME/.config/yadm
mkdir -p $HOME/.local/bin mkdir -p $HOME/.local/bin
mkdir -p $HOME/.stumpwm.d
mkdir -p $HOME/org/capture mkdir -p $HOME/org/capture
#+end_example #+end_example
@ -344,14 +339,16 @@ The next step is to tangle all the Org files. Here is the list of files that are
to be tangled: to be tangled:
#+NAME: tangled-files #+NAME: tangled-files
| filename | | filename |
|-------------| |--------------|
| awesome.org |
| bin.org | | bin.org |
| emacs.org | | emacs.org |
| fish.org | | fish.org |
| index.org | | index.org |
| mpd.org |
| neofetch.org |
| picom.org | | picom.org |
| rustfmt.org | | rustfmt.org |
| stumpwm.org |
| tmux.org | | tmux.org |
#+NAME: generate-tangle #+NAME: generate-tangle
@ -365,13 +362,8 @@ to be tangled:
"\n") "\n")
#+END_SRC #+END_SRC
#+RESULTS[87a25d6c524e8d1346452c54aa42ac3ac09d94cf]: generate-tangle #+RESULTS[127dafd79461dab55296163e57fadb7b355a205a]: generate-tangle
#+begin_example #+begin_example
printf '\n\n==== Tangling awesome.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/awesome.org")'
printf '\n\n==== Tangling bin.org\n\n' && \ printf '\n\n==== Tangling bin.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
@ -392,6 +384,16 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/index.org")' --eval '(org-babel-tangle-file "~/org/config/index.org")'
printf '\n\n==== Tangling mpd.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/mpd.org")'
printf '\n\n==== Tangling neofetch.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/neofetch.org")'
printf '\n\n==== Tangling picom.org\n\n' && \ printf '\n\n==== Tangling picom.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
@ -402,6 +404,11 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/rustfmt.org")' --eval '(org-babel-tangle-file "~/org/config/rustfmt.org")'
printf '\n\n==== Tangling stumpwm.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "~/org/config/stumpwm.org")'
printf '\n\n==== Tangling tmux.org\n\n' && \ printf '\n\n==== Tangling tmux.org\n\n' && \
emacs -q --batch --eval '(require \'ob-tangle)' \ emacs -q --batch --eval '(require \'ob-tangle)' \
--eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-confirm-babel-evaluate nil)' \
@ -413,32 +420,6 @@ printf "\n# Tangling org files #################################################
<<generate-tangle()>> <<generate-tangle()>>
#+END_SRC #+END_SRC
** Setting up Emacs: Installing Spacemacs
:PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Setting_up_Emacs:_Installing_Spacemacs-0b3d44b2
:END:
Now, the first thing we want to do with Emacs is install its Spacemacs
distribution. Well clone its =develop= branch into =~/.config/emacs=. We need
to do this prior to our dotfiles cloning because of some submodules that are
cloned within our =~/.config/emacs= directory, and git wont let us clone
Spacemacs in an already existing and non-empty directory. To make sure it isnt
one, lets delete any potentially existing =~/.config/emacs= directory:
#+BEGIN_SRC fish
printf "\n# Installing Spacemacs ########################################################\n\n"
rm -rf $HOME/.config/emacs $HOME/.emacs* .spacemacs
#+END_SRC
Now we can clone Spacemacs:
#+BEGIN_SRC fish
git clone --branch develop https://github.com/syl20bnr/spacemacs ~/.config/emacs
#+END_SRC
And we can restore what might have been deleted in our =~/.emacs.d/private=
directory:
#+BEGIN_SRC fish
yadm checkout -- ~/.config/emacs/private/
#+END_SRC
** Set up dotfiles git repository ** Set up dotfiles git repository
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-ab372bd9 :CUSTOM_ID: Execute_bootstrap-Set_up_dotfiles-ab372bd9
@ -539,6 +520,14 @@ printf "\n# Enabling Emacs as user service #####################################
systemctl --user enable emacs systemctl --user enable emacs
#+END_SRC #+END_SRC
I dont want to activate it immediately however, since the first
startup might require some interactivity with the main Emacs frame,
not with emacsclient. When Emacs will be ready, its service can be
started like so (command not tangled in the bootstrap):
#+begin_src fish :tangle no
systemctl --user start emacs
#+end_src
*** Mpd *** Mpd
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Mpd-f0f5b9b7 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-Mpd-f0f5b9b7
@ -569,10 +558,10 @@ end
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Enable_some_services-Acpilight-39152794 :CUSTOM_ID: Execute_bootstrap-Enable_some_services-Acpilight-39152794
:END: :END:
~acpilight~ is our utility managing the brightness of our screen. There is ~acpilight~ is our utility managing the brightness of our screen. There
actually no service to enable here, but we must ensure the user is part of the is actually no service to enable here, but we must ensure the user is
~video~ group so we can modify the brightness of our screen without using part of the ~video~ group so we can modify the brightness of our screen
~sudo~. without using ~sudo~.
#+BEGIN_SRC fish #+BEGIN_SRC fish
sudo usermod -aG video $USER sudo usermod -aG video $USER
#+END_SRC #+END_SRC
@ -596,22 +585,45 @@ ports. Thanks University of Paris 8 for being SO paranoid.
nordvpn s protocol tcp nordvpn s protocol tcp
#+END_SRC #+END_SRC
Note that this change in protocol is only valid when using the OpenVPN
technology. If we want to use the Wireguard technology through [[https://nordvpn.com/blog/nordlynx-protocol-wireguard/][Project
NordLynx]], this option will no longer be available. To set NordVPN to
use WireGuard, we can run this command (not tangled in the bootstrap).
#+begin_src fish :tangle no
nordvpn set technology NordLynx
#+end_src
Why WireGuard? Well, it can achieve better performances than OpenVPN
with physically nearby servers, and according to [[https://restoreprivacy.com/vpn/wireguard-vs-openvpn/][this article]] the
former can be more than half as fast as the latter. It is also much
more auditable than OpenVPN (only a few thousands lines of code
against some hundred of thousands). Oh, and WireGuard is part of the
Linux kernel since its version 5.6. And Windows since August 2021,
but I dont really care about Windows.
*But*, WireGuard is less privacy-oriented than OpenVPN. So, if I ever
need to use my VPN for privacy reasons, I can simply revert back to
the OpenVPN technology like shown with this command (not tangled in
the bootstrap):
#+begin_src fish :tangle no
nordvpn set technology OpenVPN
#+end_src
Finally, I want to be notified of NordVPNs actions, and I want to be
able to use IPv6.
#+begin_src fish
nordvpn set notify enabled
nordvpn set ipv6 enabled
#+end_src
** Symlink some system config files ** Symlink some system config files
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Symlink_some_system_config_files-1dd95175 :CUSTOM_ID: Execute_bootstrap-Symlink_some_system_config_files-1dd95175
:END: :END:
We have some files in [[file:ect/][etc/]] that are to be symlinked to =/etc=. Lets symlink the ~plock~ script ([[file:bin.org::#Lock-635fcb38][source here]]) to ~/usr/bin~ so ~xss-lock~
#+BEGIN_SRC fish
for f in (find ~/.etc -type f)
set dest (echo $f | sed -n 's|^.*etc\(.*\)$|/etc\1|p')
sudo ln -s $f $dest
end
#+END_SRC
Lets also symlink the ~plock~ script ([[file:bin.org::#Lock-635fcb38][source here]]) to ~/usr/bin~ so ~xss-lock~
can find it. can find it.
#+BEGIN_SRC fish #+BEGIN_SRC fish
sudo ln -s (which plock) /usr/bin/plock sudo ln -s ~/.local/bin/plock /usr/bin/plock
#+END_SRC #+END_SRC
** Install packages from git ** Install packages from git
@ -683,7 +695,7 @@ We will also need some components for development purposes.
"\n") "\n")
#+END_SRC #+END_SRC
#+RESULTS[b3935b1c09d86fe506b43670f52960306a1e9809]: #+RESULTS[b3935b1c09d86fe506b43670f52960306a1e9809]: rust-components-gen
: rustup component add rust-src : rustup component add rust-src
: rustup component add rls : rustup component add rls
: rustup component add clippy : rustup component add clippy
@ -693,52 +705,6 @@ Here is the code to do so:
<<rust-components-gen()>> <<rust-components-gen()>>
#+END_SRC #+END_SRC
** Install some python packages
:PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Install_some_python_packages-a4447a6f
:END:
Some packages will be needed from pip in order to get our Emacs setup correctly
working.
#+NAME: python-packages-table
| Package | Why |
|-----------------------------+-------------------------|
| python-language-server[all] | Python LSP packages |
| pyls-isort | Import sortings for LSP |
| pyls-mypy | Mypy linter for LSP |
| pyls-black | Black plugin for pyls |
#+NAME: python-packages-gen
#+BEGIN_SRC emacs-lisp :var packages=python-packages-table[,0]
(format "pip install --user %s"
(string-join packages " "))
#+END_SRC
#+RESULTS[29652be1076ffac01e34189067efa8fe9abda9d9]: python-packages-gen
: pip install --user python-language-server[all] pyls-isort pyls-mypy pyls-black
Lets install them locally for our user.
#+BEGIN_SRC fish :noweb yes
printf "\n# Installing Python packages ##################################################\n\n"
<<python-packages-gen()>>
#+END_SRC
** Set up Chicken (Scheme interpreter/compiler)
:PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_Chicken_(Scheme_interpreter-compiler)-3c1a3c4a
:END:
Chicken needs to be set up before being used. First, we need to install its
documentation.
#+BEGIN_SRC fish
printf "\n# Setting up Chicken ##########################################################\n\n"
chicken-install -s apropos chicken-doc
#+END_SRC
Then, well complete the documentation like so:
#+BEGIN_SRC fish
cd (chicken-csi -b -e "(import (chicken platform))" -p "(chicken-home)")
curl https://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
#+END_SRC
** Set up our fish shell ** Set up our fish shell
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-f0741c22 :CUSTOM_ID: Execute_bootstrap-Set_up_our_fish_shell-f0741c22
@ -753,7 +719,7 @@ order to improve the user experience.
We will be using ~fisher~ as our extensions manager for Fish. Lets install it. We will be using ~fisher~ as our extensions manager for Fish. Lets install it.
#+BEGIN_SRC fish #+BEGIN_SRC fish
printf "\n# Installing fisher ###########################################################\n\n" printf "\n# Installing fisher ###########################################################\n\n"
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
#+END_SRC #+END_SRC
*** Install our extensions *** Install our extensions
@ -774,18 +740,18 @@ I generally use the following extensions in my Fish shell.
#+NAME: fish-extensions-gen #+NAME: fish-extensions-gen
#+BEGIN_SRC emacs-lisp :var extensions=fish-extensions-table[,0] #+BEGIN_SRC emacs-lisp :var extensions=fish-extensions-table[,0]
(mapconcat (lambda (x) (format "fisher add %s" x)) (mapconcat (lambda (x) (format "fisher install %s" x))
extensions extensions
"\n") "\n")
#+END_SRC #+END_SRC
#+RESULTS[072e09f40140d1ff847826b8f44dd96f9e95a773]: fish-extensions-gen #+RESULTS[d424f363a3c11c8598a20da525de5ba9dcfbe7e7]: fish-extensions-gen
: fisher add decors/fish-colored-man : fisher install decors/fish-colored-man
: fisher add franciscolourenco/done : fisher install franciscolourenco/done
: fisher add jethrokuan/fzf : fisher install jethrokuan/fzf
: fisher add jorgebucaran/fish-bax : fisher install jorgebucaran/fish-bax
: fisher add jorgebucaran/fish-getopts : fisher install jorgebucaran/fish-getopts
: fisher add laughedelic/pisces : fisher install laughedelic/pisces
#+BEGIN_SRC fish :noweb yes #+BEGIN_SRC fish :noweb yes
printf "\n# Installing Fisher Extensions ################################################\n\n" printf "\n# Installing Fisher Extensions ################################################\n\n"