[Fish, Emacs, Bootstrap] Replace yay with paru

This commit is contained in:
Lucien Cartier-Tilet 2021-02-04 09:15:09 +01:00
parent 2ea6cd5ecf
commit 9062092b1d
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
4 changed files with 20 additions and 10 deletions

View File

@ -100,7 +100,7 @@ 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
yay -S --needed $pkg paru -S --needed $pkg
end end
mkdir -p $HOME/.config/awesome mkdir -p $HOME/.config/awesome

View File

@ -3859,9 +3859,9 @@ The Scheme configuration will be very short, I just need to tell Emacs the name
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: User_Configuration-Projectile-06e580f0 :CUSTOM_ID: User_Configuration-Projectile-06e580f0
:END: :END:
Projectile is an awesome utility which helps managing projects within Emacs. It will automatically detect version controlled directories, and will by default assume this is a project I can be working on. However, there are some directories that are version controlled that I do not want to see in my list of projects, namely all the cached AUR packages from my AUR helper, ~yay~. They are all stored in the same parent directory, so lets ignore that. I will also make Emacs ignore all ~node_modules~ directories it could encounter. And for some reason, =~/.config/emacs= is always in my projects list (I now use XDG-compliant directories), so lets also ignore that. Projectile is an awesome utility which helps managing projects within Emacs. It will automatically detect version controlled directories, and will by default assume this is a project I can be working on. However, there are some directories that are version controlled that I do not want to see in my list of projects, namely all the cached AUR packages from my AUR helper, ~paru~. They are all stored in the same parent directory, so lets ignore that. I will also make Emacs ignore all ~node_modules~ directories it could encounter. And for some reason, =~/.config/emacs= is always in my projects list (I now use XDG-compliant directories), so lets also ignore that.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq projectile-ignored-projects '("~/.cache/yay" "~/.config/emacs" "/tmp")) (setq projectile-ignored-projects '("~/.cache/paru" "~/.config/emacs" "/tmp"))
(add-to-list 'projectile-globally-ignored-directories "node_modules") (add-to-list 'projectile-globally-ignored-directories "node_modules")
#+END_SRC #+END_SRC

View File

@ -268,15 +268,15 @@ I added some of these abbreviations due to how often I have to write the whole t
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Abbreviations-System_management_(packages_and_services)-Package_management-efbcdf0f :CUSTOM_ID: Abbreviations-System_management_(packages_and_services)-Package_management-efbcdf0f
:END: :END:
The first command is =remove= which removes a package from my system, as well as its dependencies no longer needed. =p=. =pacman='s or =yay='s. This is why I simply type =purge=. And if I want to simply seach among the =pacman= repos, I can type =search=. Otherwise, if I want to include AUR results, Ill use =yay=. The first command is =remove= which removes a package from my system, as well as its dependencies no longer needed. =p=. =pacman='s or =paru='s. This is why I simply type =purge=. And if I want to simply seach among the =pacman= repos, I can type =search=. Otherwise, if I want to include AUR results, Ill use =paru=.
#+NAME: pm-abbr #+NAME: pm-abbr
| abbreviation | command | | abbreviation | command |
|--------------+--------------------| |--------------+--------------------|
| remove | sudo pacman -Rscnd | | remove | sudo pacman -Rscnd |
| p | sudo pacman | | p | sudo pacman |
| purge | yay -Sc | | purge | paru -Sc |
| search | yay -Ss | | search | paru -Ss |
#+BEGIN_SRC fish #+BEGIN_SRC fish
<<generate-abbr(table=pm-abbr)>> <<generate-abbr(table=pm-abbr)>>

View File

@ -54,7 +54,7 @@ Now, lets grab the script. You can check it on [[https://github.com/matmoul/a
sh archfi sh archfi
#+END_SRC #+END_SRC
Then, follow the instructions and install Arch Linux. Take the opportunity to install as many packages as you need, mainly ~yay~ which I use as my package manager (it is just a wrapper for ~pacman~) and AUR helper, and ~pacman-contrib~ which will help us installing some packages later. Then, follow the instructions and install Arch Linux. Take the opportunity to install as many packages as you need, mainly ~paru~ which I use as my package manager (it is just a wrapper for ~pacman~) and AUR helper, and ~pacman-contrib~ which will help us installing some packages later.
Once your system is installed, reboot and remove your installation media from your computer. Once your system is installed, reboot and remove your installation media from your computer.
@ -63,9 +63,19 @@ Once your system is installed, reboot and remove your installation media from yo
:HEADER-ARGS:fish: :tangle ~/.config/yadm/bootstrap :shebang "#!/usr/bin/fish" :exports code :mkdirp yes :HEADER-ARGS:fish: :tangle ~/.config/yadm/bootstrap :shebang "#!/usr/bin/fish" :exports code :mkdirp yes
:CUSTOM_ID: Execute_bootstrap-e37054ef :CUSTOM_ID: Execute_bootstrap-e37054ef
:END: :END:
With the installation of Arch with ~archfi~, I will have [[https://github.com/Jguer/yay][yay]], an AUR helper, installed. This will allow me to have some basic packages installed in order to run the bootstrap described below. So, lets install ~fish~ (our shell running the script), ~git~, and my dotfiles manager ~yadm~. The first thing I will do is add the [[https://github.com/archlinuxcn/repo][ArchLinuxCN]] repository so I can get access to ~paru~.
#+BEGIN_SRC sh #+BEGIN_SRC sh
yay -Sy fish git yadm printf '[archlinuxcn]\nServer = https://repo.archlinuxcn.org/$arch\n' | sudo tee -a /etc/pacman.conf
#+END_SRC
I can now install ~fish~, ~git~, and ~paru~:
#+BEGIN_SRC sh
sudo pacman -S fish git paru
#+END_SRC
And now that ~paru~ is available, we can install ~yadm~:
#+BEGIN_SRC sh
paru -S yadm
#+END_SRC #+END_SRC
~yadm~ comes with a very handy feature: its bootstrap script. It can be executed automatically once the dotfiles are cloned with yadm: ~yadm~ comes with a very handy feature: its bootstrap script. It can be executed automatically once the dotfiles are cloned with yadm:
@ -237,7 +247,7 @@ These are the minimum I would have in my own installation. You can edit it howev
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
yay -S --needed $pkg paru -S --needed $pkg
end end
#+END_SRC #+END_SRC