2019-09-21 15:18:38 +00:00
#+TITLE : Phundrak’ s dotfiles
#+AUTHOR : Lucien "Phundrak” Cartier-Tilet
#+EMAIL : phundrak@phundrak.fr
2019-09-26 14:50:39 +00:00
#+OPTIONS : H:4 broken_links:mark email:t ^:{} auto_id:t
2019-09-27 14:28:13 +00:00
# ### LaTeX ####################################################################
2019-09-26 14:50:39 +00:00
#+LATEX_CLASS : conlang
#+LaTeX_CLASS_OPTIONS : [a4paper,twoside]
#+LATEX_HEADER_EXTRA : \usepackage{tocloft} \setlength{\cftchapnumwidth}{3em}
#+LATEX_HEADER_EXTRA : \usepackage{xltxtra,fontspec,xunicode,svg}
#+LATEX_HEADER_EXTRA : \usepackage[total={17cm,24cm}]{geometry}
#+LATEX_HEADER_EXTRA : \setromanfont{Charis SIL}
#+LATEX_HEADER_EXTRA : \usepackage{xcolor}
#+LATEX_HEADER_EXTRA : \usepackage{hyperref}
#+LATEX_HEADER_EXTRA : \hypersetup{colorlinks=true,linkbordercolor=red,linkcolor=blue,pdfborderstyle={/S/U/W 1}}
#+LATEX_HEADER_EXTRA : \usepackage{multicol}
#+LATEX_HEADER_EXTRA : \usepackage{indentfirst}
#+LATEX_HEADER_EXTRA : \sloppy
2019-09-27 14:28:13 +00:00
# ### HTML #####################################################################
2019-09-26 14:50:39 +00:00
#+HTML_DOCTYPE : html5
2019-09-27 14:28:13 +00:00
#+HTML_HEAD_EXTRA : <meta name="description" content="Phundrak's dotfiles" />
#+HTML_HEAD_EXTRA : <meta property="og:title" content="Phundrak's dotfiles" />
#+HTML_HEAD_EXTRA : <meta property="og:description" content="Installation instructions for Phundrak's dotfiles" />
2019-09-26 14:50:39 +00:00
#+HTML_HEAD_EXTRA : <script src="https://kit.fontawesome.com/4d42d0c8c5.js"></script>
#+HTML_HEAD_EXTRA : <script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
#+HTML_HEAD_EXTRA : <link rel="shortcut icon" href="https://cdn.phundrak.fr/img/mahakala-128x128.png" type="img/png" media="screen" />
#+HTML_HEAD_EXTRA : <link rel="shortcut icon" href="https://cdn.phundrak.fr/img/favicon.ico" type="image/x-icon" media="screen" />
#+HTML_HEAD_EXTRA : <meta property="og:image" content="https://cdn.phundrak.fr/img/rich_preview.png" />
#+HTML_HEAD_EXTRA : <meta name="twitter:card" content="summary" />
#+HTML_HEAD_EXTRA : <meta name="twitter:site" content="@phundrak" />
#+HTML_HEAD_EXTRA : <meta name="twitter:creator" content="@phundrak" />
#+HTML_HEAD_EXTRA : <style>.org-svg{width:auto}</style>
2019-09-27 14:28:13 +00:00
#+INFOJS_OPT : view:info toc:1 home:https://phundrak.fr/ toc:t
2019-09-26 14:50:39 +00:00
#+HTML_HEAD_EXTRA : <link rel="stylesheet" href="https://langue.phundrak.fr/css/htmlize.min.css"/>
#+HTML_HEAD_EXTRA : <link rel="stylesheet" href="https://langue.phundrak.fr/css/main.css"/>
#+HTML_HEAD_EXTRA : <script src="https://langue.phundrak.fr/js/jquery.min.js"></script>
#+HTML_HEAD_EXTRA : <script defer src="https://langue.phundrak.fr/js/main.js"></script>
* Table of Contents :TOC_4_gh:noexport:
- [[#presentation ][Presentation ]]
- [[#features ][Features ]]
- [[#screenshots ][Screenshots ]]
- [[#dependencies ][Dependencies ]]
- [[#installation ][Installation ]]
- [[#install-arch-linux ][Install Arch Linux ]]
2019-09-27 14:28:13 +00:00
- [[#get-the-latest-live-system-with-fast-mirrors ][Get the latest live system with fast mirrors ]]
- [[#install-the-system ][Install the system ]]
2019-10-20 23:22:46 +00:00
- [[#install-basic-packages ][Install basic packages ]]
- [[#execute-bootstrap ][Execute bootstrap ]]
- [[#get-a-correct-keyboard-layout ][Get a correct keyboard layout ]]
- [[#set-our-locale ][Set our locale ]]
- [[#create-some-folders ][Create some folders ]]
- [[#set-users-shell-to-fish ][Set user’ s shell to fish ]]
- [[#install-yay-if-it-isnt-already-installed ][Install =yay= if it isn’ t already installed ]]
- [[#setting-up-emacs-installing-spacemacs ][Setting up Emacs: Installing Spacemacs ]]
- [[#set-up-dotfiles ][Set up dotfiles ]]
- [[#update-our-dotfiles-remotes ][Update our dotfiles’ remotes ]]
- [[#get-envtpl ][Get =envtpl= ]]
- [[#update-our-submodules ][Update our submodules ]]
- [[#generate-our-alt-files ][Generate our alt files ]]
- [[#symlink-some-system-config-files ][Symlink some system config files ]]
- [[#install-basic-packages-1 ][Install basic packages ]]
- [[#installing-tryones-compton-fork ][Installing Tryone’ s Compton fork ]]
- [[#enable-some-of-our-services ][Enable some of our services ]]
- [[#docker ][Docker ]]
- [[#emacs ][Emacs ]]
- [[#ssh-server ][SSH server ]]
- [[#ly ][Ly ]]
- [[#set-up-our-fish-shell ][Set up our fish shell ]]
- [[#install-fisher ][Install =fisher= ]]
- [[#install-our-extensions ][Install our extensions ]]
- [[#install-packages-from-git ][Install packages from git ]]
- [[#i3-gaps-rounded ][i3-gaps rounded ]]
- [[#polybar-battery ][Polybar Battery ]]
- [[#revealjs ][Reveal.JS ]]
- [[#install-rust ][Install Rust ]]
- [[#install-the-toolchains ][Install the toolchains ]]
- [[#install-some-utilities ][Install some utilities ]]
- [[#clean-the-pacman-and-yay-cache ][Clean the =pacman= and =yay= cache ]]
2019-09-26 14:50:39 +00:00
- [[#licence ][Licence ]]
2019-07-21 01:52:29 +00:00
2019-09-21 15:18:38 +00:00
* Presentation
2019-09-26 14:50:39 +00:00
[[http://spacemacs.org ][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg ]]
2019-09-21 15:18:38 +00:00
This is my collection of dotfiles for my daily GNU/Linux environment, tweaked
to my liking. If you wish to get the same setup as mine, follow the
instructions below.
As you can see, I personally use [[https://fishshell.com/ ][fish ]] as my shell of choice, and [[https://www.gnu.org/software/emacs/ ][Emacs ]] using
[[http://spacemacs.org ][Spacemacs ]] (still with Emacs keybinding) as my main text editor.
I also use [[https://github.com/resloved/i3 ][Resloved ]]’ s [[https://github.com/resloved/i3 ][fork ]] of [[https://github.com/Airblader/i3 ][i3-gaps ]] with two [[https://github.com/jaagr/polybar ][polybar ]] bars and [[https://github.com/tryone144 ][Tryone144 ]]’ s
[[https://github.com/tryone144/compton ][fork ]] of [[https://github.com/chjj/compton ][Compton ]]. The colors scheme for [[https://github.com/davatorium/rofi ][rofi ]], Emacs and polybar are chosen from
the wallpapers using [[https://github.com/dylanaraps/pywal ][pywal ]].
* Features
- Emacs configuration perfectly tailored for my own use
- Beautiful and comfy i3 and polybar configuration
- And enough information below to get basically the same distro install as I
have on my main computer and my travel laptop.
* Screenshots
2019-09-27 14:28:13 +00:00
#+ATTR_HTML: :width 100%
#+CAPTION: Desktop with Neofetch in the terminal
2019-09-21 15:18:38 +00:00
[[./img/neofetch.png ]]
2019-09-27 14:28:13 +00:00
#+CAPTION: Desktop with Emacs opened
#+ATTR_HTML: :width 100%
2019-09-21 15:18:38 +00:00
[[./img/emacs.png ]]
2019-09-27 14:28:13 +00:00
#+CAPTION: Desktop with Rofi
#+ATTR_HTML: :width 100%
2019-09-21 15:18:38 +00:00
[[./img/rofi.png ]]
* Dependencies
Of course, some dependencies are needed for my dotfiles to work well. Here is
a non-exhaustive list of software needed by these configuration files:
- [[https://www.gnu.org/software/emacs/ ][GNU/Emacs ]] >= 26.2
- [[http://spacemacs.org ][Spacemacs ]] (develop branch)
- My [[https://labs.phundrak.fr/phundrak/conlang-layer ][conlanging layer ]]
- [[https://github.com/venmos/w3m-layer ][Venmos ]]’ [[https://github.com/venmos/w3m-layer ][w3m layer ]]
- The [[https://fishshell.com/ ][Fish shell ]], using [[https://github.com/jorgebucaran/fisher ][fisher ]]
- [[https://lukesmith.xyz/ ][Luke Smith ]]’ s [[https://github.com/LukeSmithxyz/st ][fork ]] of [[https://st.suckless.org/ ][st ]]
- [[https://resloved.info/ ][Resloved ]]’ s [[https://github.com/resloved/i3 ][i3-gaps-rounded ]] fork of [[https://github.com/Airblader/i3 ][Airblader ]]’ s [[https://github.com/Airblader/i3 ][i3-gaps ]], itself a fork of [[https://i3wm.org/ ][i3 ]]
- [[https://github.com/yshui/compton ][Compton ]], more specificaly [[https://github.com/tryone144/compton ][Tryone ]]’ s [[https://github.com/tryone144/compton ][fork ]]
- [[https://github.com/dylanaraps/pywal/ ][pywal ]]
- [[https://tools.suckless.org/dmenu/ ][dmenu ]]
- [[https://github.com/enkore/j4-dmenu-desktop ][j4-dmenu-desktop ]]
- [[https://github.com/davatorium/rofi ][Rofi ]]
- [[https://github.com/gpoore/minted ][minted ]]
- [[https://www.rust-lang.org/ ][Rust ]] (stable and nightly)
- [[https://www.latex-project.org/ ][LaTeX ]] and [[http://xetex.sourceforge.net/ ][XeTeX ]] (=texlive= packages on Arch Linux)
- [[https://github.com/tmux/tmux ][tmux ]], based on [[https://github.com/gpakosz/.tmux ][this repo ]]’ s configuration by [[https://pempek.net/ ][Grégory Pakosz ]].
- And a bunch of other stuff, see below
And some other stuff scattered around in my dotfiles.
BTW, I use Arch.
* Installation
Here will be presented what I do to get my system up and running on a fresh
Arch Linux install. These installation instructions were written in order to
get an Arch Linux distribution up and running with the same configuration as
my main computer’ s and my travelling laptop’ s configuration.
2019-09-21 16:10:01 +00:00
** Install Arch Linux
2019-09-21 16:36:34 +00:00
I usually install Arch from the [[https://www.archlinux.org/download/ ][vanilla ISO ]], however I began using [[https://github.com/MatMoul/archfi ][archfi ]] to
2019-09-21 16:10:01 +00:00
install easily the distro (I’ ve done it so many times, I know how it works
now). Usually, my distros will be installed on at least two partitions, one
2019-09-27 14:28:13 +00:00
dedicated to =/home= , the other to the root partition =/= .
If the computer supports EFI bootloaders, the EFI partition will be mounted
on =/boot= . I generally use rEFInd as my boot manager, but if you are more
comfortable with another one, just install what you want. Be aware that if
you format your =/boot= partition, you will delete all boot managers that
already exist; so, if you are dual-booting, *DO NOT FORMAT IT* . Yes, I made
the mistake of wiping the Windows boot manager.
The swap partition is always at least 4GB large, and I should have a total of
12GB of combined RAM and swap. This means on my main computer I have 16GB of
RAM and 4GB of swap, but on my thinkpad I have 4GB of RAM and 8GB of swap.
*** Get the latest live system with fast mirrors
When you boot into the live ISO, execute the following command:
2019-10-20 23:22:46 +00:00
#+BEGIN_SRC sh :exports code :tangle no
pacman -Sy reflector
2019-09-27 14:28:13 +00:00
reflector --country France --country Germany --latest 200 \
--protocol http --protocol https --sort rate \
--save /etc/pacman.d/mirrorlist
#+END_SRC
This will update the packages from your live ISO, and you will get the best
mirrors for your installation. Of course, change the countries accordingly
to your location.
*** Install the system
Then you can use a custom script to ease your installation of Arch if you do
not wish to do it manually. Personally, I’ ve done it several times already,
I know how the distro works, I just want to be able to install my distro
quickly now.
2019-10-20 23:22:46 +00:00
#+BEGIN_SRC sh :exports code :tangle no
2019-09-27 14:28:13 +00:00
wget archfi.sf.net/archfi
# Or from matmoul.github.io/archfi if SourceForge is down
sh archfi
#+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
2019-10-20 23:22:46 +00:00
package manager (it is just a wrapper for =pacman= ) and AUR helper, and
=pacman-contrib= which will help us installing some packages later.
2019-09-21 16:10:01 +00:00
2019-09-27 14:28:13 +00:00
Once your system is installed, reboot and remove your installation media
from your computer.
2019-09-26 14:50:39 +00:00
2019-10-20 23:22:46 +00:00
** Install basic packages
We will need some basic packages in order to run the bootstrap file. So,
let’ s install =fish= (our shell running the script) and =git= .
#+BEGIN_SRC sh :exports code :tangle no
sudo pacman -Sy fish git yadm
2019-09-21 15:18:38 +00:00
#+END_SRC
2019-10-20 23:22:46 +00:00
** Execute bootstrap
=yadm= comes with a very handy feature: its bootstrap script. We can
execute it by running the following command:
#+BEGIN_SRC fish :exports code :tangle no
yadm bootstrap
2019-09-21 15:18:38 +00:00
#+END_SRC
2019-10-20 23:22:46 +00:00
Notice these two header files, we can see this is a fish script, hence why we
need fish (which is my daily shell anyway).
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
#!/usr/bin/fish
# -*- mode: fish -* -
#+END_SRC
Let’ s take a look at what it does.
*** Get a correct keyboard layout
I use mainly the [[https://bepo.fr/wiki/Accueil ][bépo ]] layout, a French keyboard layout inspired by Dvorak
layouts, however I sometimes need to switch back to the standard French
AZERTY or the American QWERTY layout, so I make it so the Menu key switches
for me my layout between these three. This makes it so my xorg configuration
of my keyboard looks like this:
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
set keyboardconf \
'Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "fr,fr,us"
Option "XkbModel" "pc104"
Option "XkbVariant" "bepo,,"
Option "XkbOptions" "grp:menu_toggle"
EndSection'
#+END_SRC
So, let’ s set it as our keyboard configuration.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Set keyboard layout #########################################################\n\n"
echo $keyboardconf | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf
2019-10-13 09:51:12 +00:00
#+END_SRC
2019-10-20 23:22:46 +00:00
*** Set our locale
I use two main locales, the French and US UTF-8 locales, and I like to keep
the Japanese locale activated just in case.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8"
2019-09-21 15:18:38 +00:00
#+END_SRC
2019-10-20 23:22:46 +00:00
Let’ s enable these.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Set our locale ##############################################################\n\n"
for item in $mylocales
if test (grep -e "#$item" /etc/locale.gen)
sudo sed -i "/$item/s/ ^#//g" /etc/locale.gen
end
end
2019-09-21 15:18:38 +00:00
#+END_SRC
2019-10-20 23:22:46 +00:00
This is my configuration I usually use when it comes to my locale.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
set localeconf "LANG=en_US.UTF-8
LC_COLLATE=C
LC_NAME=fr_FR.UTF-8
LC_NUMERIC=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_MONETARY=fr_FR.UTF-8
LC_PAPER=fr_FR.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8"
2019-09-21 15:18:38 +00:00
#+END_SRC
2019-10-20 23:22:46 +00:00
Let’ s set it as our system’ s locale.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
echo $localeconf | sudo tee /etc/locale.conf
#+END_SRC
Now we can generate our locale!
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Generate locale #############################################################\n\n"
sudo locale-gen
2019-09-21 15:18:38 +00:00
#+END_SRC
2019-07-21 01:52:29 +00:00
2019-10-20 23:22:46 +00:00
*** Create some folders
Let’ s create some folders we might need for mounting our drives, Android
devices and CDs.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Create directories for mounting #############################################\n\n"
sudo mkdir -p /mnt/ {USB,CD,Android}
sudo chown $USER:(id -g $USER) /mnt/ {USB,CD,Android}
#+END_SRC
2019-07-21 02:01:46 +00:00
2019-10-20 23:22:46 +00:00
*** Set user’ s shell to fish
First of all, the bootstrap shell will set the user’ s shell to fish.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Set fish as the default shell ###############################################\n\n"
chsh -s /usr/bin/fish
#+END_SRC
2019-07-21 02:01:46 +00:00
2019-10-20 23:22:46 +00:00
*** Install =yay= if it isn’ t already installed
Now we’ ll need to be sure =yay= , our AUR helper, is installed on our system.
If it is, we don’ t need to to anything. However, if it isn’ t, we’ ll install
it manually.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
if ! test which yay
printf "\n# Installing yay ##############################################################\n\n"
cd
mkdir -p fromGIT
cd fromGIT
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --noconfirm
else
printf "\n# yay already installed #######################################################\n\n"
end
#+END_SRC
*** Setting up Emacs: Installing Spacemacs
Now, the first thing we want to do with Emacs is install its Spacemacs
distribution. We’ ll clone its =develop= branch into =~/.emacs.d= . We need to
do this prior to our dotfiles’ cloning because of some submodules that are
cloned within our =~/.emacs.d= directory, and git won’ t let us clone
Spacemacs in an already existing and non-empty directory. To make sure it
isn’ t one, let’ s delete any potentially existing =~/.emacs.d= directory:
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Installing Spacemacs ########################################################\n\n"
rm -rf ~/.emacs.d
#+END_SRC
Now we can clone Spacemacs:
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
git clone --single-branch --branch develop https://github.com/syl20bnr/spacemacs ~/ .emacs.d
#+END_SRC
And we can restore what might have been deleted in our =~/.emacs.d/private=
directory:
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
yadm checkout -- ~/.emacs.d/private/
#+END_SRC
2019-07-21 02:01:46 +00:00
2019-10-20 23:22:46 +00:00
*** Set up dotfiles
**** Update our dotfiles’ remotes
This line in the bootstrap script will test if the current user is using my
username. If yes, it’ s probably me.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
if ! test (echo "phundrak" | sed -e "s/^.*$USER/ /I")
#+END_SRC
If it is me installing and using these dotfiles, I want the remotes of my
dotfiles to be set to ssh remotes using my ssh keys.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Update yadm’ s remotes #######################################################\n\n"
yadm remote set-url origin git@labs.phundrak.fr:phundrak/dotfiles.git
yadm remote add github git@github.com:phundrak/dotfiles.git
#+END_SRC
I will also want to decrypt my encrypted files, such as said ssh keys.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Decrypt encrypted dotfiles ##################################################\n\n"
yadm decrypt
#+END_SRC
Finally, let’ s close this =if= statement.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
end
#+END_SRC
**** Get =envtpl=
Before we set our dotfiles up, let’ s make sure =envtpl= is correctly
installed. This package will be needed for generating our alt dotfiles.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf '\n# Install envtpl ##############################################################\n\n'
yay -Syu python-envtpl-git
#+END_SRC
**** Update our submodules
Now we can download the various dependencies of our dotfiles. To do so,
let’ s run the following command:
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Getting yadm susbmodules ####################################################\n\n"
yadm submodule update --init --recursive
#+END_SRC
**** Generate our alt files
Now this should be the last manipulation on our dotfiles: let’ s create our
alternate files:
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Generating alt files ########################################################\n\n"
yadm alt
#+END_SRC
**** Symlink some system config files
We have some files in [[file:ect/ ][etc/ ]] that are to be symlinked to =/etc= .
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
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
We may also want to symlink our [[file:.nanorc ][nanorc ]] to the =/root= directory for when we
use =nano= as =sudo= .
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
read --prompt "echo 'Symlink .nanorc to root’ s .nanorc? (Y/n): ' " -l nanoroot
if test $nanoroot = 'y' || test $nanoroot = "Y" || test $nanoroot = ''
printf "\n# Symlinking .nanorc to root’ s .nanorc ########################################\n\n"
sudo ln -s $HOME/.nanorc /root/ .nanorc
end
#+END_SRC
*** Install basic packages
Let’ s set in a custom varible what packages we’ ll be needing.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
set PACKAGES \
asar ascii aspell-en aspell-fr assimp awesome-terminal-fonts base-devel bat \
biber bleachbit bluez-firmware bluez-utils bookworm boost bzip2 chromium clisp \
compton cppcheck cppreference cppreference-devhelp cpupower cronie cryptsetup \
device-mapper diffutils discord-canary discount ditaa dmenu dmenu-lpass docker \
docker-compose doxygen dunst dwarffortress emacs exfat-utils ffmpegthumbnailer \
findutils firefox flake8 font-mathematica fontforge freeglut fzf gcc-libs gdb \
gimp glibc gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot \
go-tools graphviz htop i3-gaps i3lock-blur i3status igdm-bin inetutils \
j4-dmenu-desktop jfsutils jmtpfs lastpass-cli less linux-headers lldb \
logrotate lvm2 ly-git meson minted mpc mpd mpd-rich-presence-discord-git mpv \
mupdf-tools nano ncdu ncmpcpp nemo-fileroller nemo-preview neofetch netctl \
networkmanager networkmanager-openvpn nm-connection-editor nnn nomacs \
noto-fonts-emoji npm ntfs-3g numlockx openssh p7zip pacman-contrib pandoc-bin \
pavucontrol pciutils pcurses pdfpc polybar pulseaudio-bluetooth \
python-envtpl-git python-pip python-pywal qemu r raw-thumbnailer redshift \
reflector rofi rofi-wifi-menu-git rsync rtv rustup s-nail samba scrot sent \
shadow siji-git simplescreenrecorder speedcrunch sshfs st-luke-git \
texlive-bibtexextra texlive-bin texlive-core texlive-fontsextra \
texlive-formatsextra texlive-games texlive-humanities texlive-langchinese \
texlive-langcyrillic texlive-langextra texlive-langgreek texlive-langjapanese \
texlive-langkorean texlive-latexextra texlive-localmanager-git texlive-music \
texlive-pictures texlive-pstricks texlive-publishers texlive-science tmux tree \
ttf-arphic-uming ttf-baekmuk ttf-bitstream-vera ttf-dejavu \
ttf-google-fonts-opinionated-git ttf-joypixels ttf-liberation \
ttf-material-design-icons-git ttf-ms-fonts ttf-symbola ttf-tibetan-machine \
ttf-twemoji-color ttf-unifont unicode unicode-emoji unrar usbutils valgrind \
vim w3m wget x11-ssh-askpass xclip xdg-user-dirs-gtk xorg-drivers xorg-apps \
xfsprogs xorg-server xorg-xinit xss-lock yapf
#+END_SRC
These are the minimum I would have in my own installation. You can edit it
however you want. Let’ s install those.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Installing needed packages ##################################################\n\n"
yay -S --needed $PACKAGES
#+END_SRC
2019-07-21 02:01:46 +00:00
2019-10-20 23:22:46 +00:00
*** Installing Tryone’ s Compton fork
For some reason, I found installing directly this fork does not work, and I
need to install it after I installed the regular compton packages.
=compton-tryone-git= will replace =compton= which will be removed.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Installing tryone’ s compton fork ############################################\n\n"
yay -S compton-tryone-git
#+END_SRC
2019-07-21 01:52:29 +00:00
2019-10-20 23:22:46 +00:00
*** Enable some of our services
We have installed some packages which require some services to run. Let’ s
enable them.
**** Docker
First, let’ s activate Docker.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Enabling and starting Docker ################################################\n\n"
sudo systemctl enable --now docker
#+END_SRC
Now, if we wish it, we can be added to the =docker= group so we won’ t have
to type =sudo= each time we call Docker or Docker Compose.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
read --prompt "echo 'Do you wish to be added to the `docker` group? (Y/n): ' " -l adddockergroup
if test $adddockergroup = 'y' || test $adddockergroup = "Y" || test $adddockergroup = ''
sudo usermod -aG docker $USER
end
#+END_SRC
**** Emacs
Emacs will run as a user service, which means it won’ t be launched until we
log in.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Enabling Emacs as user service ##############################################\n\n"
systemctl --user enable --now emacs
#+END_SRC
**** SSH server
Maybe we want to activate an SSH server on our machine. If so, we can
enable it. Let’ s ask the question.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
read --prompt "echo 'Do you want to activate the ssh server? (Y/n): ' " -l sshdserver
if test $sshdserver = 'y' || test $sshdserver = "Y" || test $sshdserver = ''
printf "\n# Enabling ssh server #########################################################\n\n"
sudo systemctl enable --now sshd
end
#+END_SRC
**** Ly
Ly is a display manager based on ncurses which I find nice enough for me to
use (I generally don’ t like using display managers). Let’ s enable it, and
let’ s disable tty2 while we’ re at it (Ly uses it to run X).
#+BEGIN_SRC fish
sudo systemctl enable --now ly
sudo systemctl disable getty@tty2
#+END_SRC
*** Set up our fish shell
**** Install =fisher=
We will be using =fisher= as our extensions manager for Fish. Let’ s install
it.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Installing fisher ###########################################################\n\n"
curl https://git.io/fisher --create-dirs -sLo ~/ .config/fish/functions/fisher.fish
#+END_SRC
**** Install our extensions
I generally use the following extensions in my Fish shell.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
set FISHEXTENSIONS \
edc/bass franciscolourenco/done jethrokuan/fzf jethrokuan/z \
jorgebucaran/fish-getopts laughedelic/pisces matchai/spacefish \
tuvistavie/fish-ssh-agent
#+END_SRC
Let’ s install these:
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
fisher add $FISHEXTENSIONS
#+END_SRC
*** Install packages from git
Now, let’ s install some packages from git directly.
**** i3-gaps rounded
2019-09-21 15:18:38 +00:00
I know we already installed =i3-gaps= from the AUR, why reinstall it? Well,
that is certainly bad practices, but this allowed me to already have the
needed dependencies for building =i3= installed. Now, let’ s clone it, build
2019-10-20 23:22:46 +00:00
it, and install it. Doing this is probably very bad practices though, be
warned.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Install i3-gaps-rounded #####################################################\n\n"
cd ~/fromGIT
2019-09-21 15:18:38 +00:00
git clone https://github.com/resloved/i3.git i3-gaps-rounded
cd i3-gaps-rounded
rm -rf build
autoreconf --force --install
mkdir build && cd build
../configure --prefix=/usr --sysconfdir= /etc --disable-sanitizers
2019-10-20 23:22:46 +00:00
make -j
2019-09-21 15:18:38 +00:00
sudo make install
#+END_SRC
2019-07-21 01:52:29 +00:00
2019-10-20 23:22:46 +00:00
**** Polybar Battery
Now let’ s install =polybar-battery= . This is a binary that I’ ll use in my
[[file:.config/i3/config ][i3 config ]] to indicate my battery level. It also sends a notification on low
battery and on charging completed.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Install polybar-battery #####################################################\n\n"
cd ~/fromGIT
git clone https://github.com/drdeimos/polybar_another_battery.git
cd polybar_another_battery
go get -u github.com/distatus/battery/cmd/battery
make build
#+END_SRC
Now, we have our binary, let’ s symlink it in our local binary directory,
=~/.local/bin= .
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
ln -s polybar-ab ~/.local/bin/polybar-ab
#+END_SRC
**** Reveal.JS
I sometimes use Reveal.JS to make presentations, and I set its location in
my [[file:.spacemacs ][dotspacemacs ]] file to be in =~/fromGIT= , so let’ s clone it there.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Install Reveal.JS ###########################################################\n\n"
cd ~/fromGIT
git clone https://github.com/hakimel/reveal.js.git
#+END_SRC
*** Install Rust
**** Install the toolchains
When using rust, I bounce between two toolchains, the =stable= toolchain
and the =nightly= toolchain. To install them, I will use =rustup= which has
already been installed.
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Install the rust toolchains, nightly is the default one #####################\n\n"
rustup default nightly
#+END_SRC
This will both download the nightly toolchain and set it as the default
one. Yup, I like to live dangerously. Now to install the stable toolchain,
let’ s run this:
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
rustup toolchain install stable
#+END_SRC
**** Install some utilities
We’ ll need some utilities when developing Rust from Emacs, namely =rustfmt=
and =racer= . Let’ s install them with =cargo= .
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Add rust utilities ##########################################################\n\n"
cargo install rustfmt racer
#+END_SRC
*** Clean the =pacman= and =yay= cache
Finally, we are almost done! Let’ s clean the cache of =pacman= and =yay= .
#+BEGIN_SRC fish :exports code :tangle ~/.yadm/bootstrap
printf "\n# Clean the pacman and yay cache ##############################################\n\n"
yay -Sc --noconfirm
2019-09-21 15:18:38 +00:00
#+END_SRC
2019-10-20 23:22:46 +00:00
You should now run a system pretty close to the one I have on my main
computer and my thinkpad.
2019-07-21 01:52:29 +00:00
2019-09-21 15:18:38 +00:00
* Licence
All of my dotfiles (and my dotfiles only) are available under the GNU GPLv3
Licence. Please consult [[file:LICENCE.md ]] for more information. In short: you
are free to access, edit and redistribute all of my dotfiles under the same
licence and as allowed by the licence, and if you fuck up something, it’ s your
own responsibility.