123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- ### Artix Linux Installation Guide ###
- ##################################################
- # Partitioning Drives
- fdisk /dev/sdb &&
- cryptsetup --batch-mode luksFormat --type luks1 /dev/sdb2 &&
- cryptsetup open /dev/sdb2 system &&
- mkfs.ext4 /dev/sdb1 &&
- mkfs.ext4 /dev/mapper/system &&
- # Mounting Drives
- mount /dev/mapper/system /mnt &&
- mkdir /mnt/boot &&
- mount /dev/sdb1 /mnt/boot/ &&
- # Base Installation
- basestrap /mnt base base-devel runit elogind-runit linux-hardened linux-hardened-headers linux-firmware grub dhcpcd dhcpcd-runit cryptsetup neovim --noconfirm --disable-download-timeout &&
- fstabgen -U /mnt >> /mnt/etc/fstab &&
- artix-chroot /mnt bash
- ##################################################
- # Setting Time Zone
- ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime &&
- hwclock --systohc &&
- # Configuring Localization
- echo KEYMAP=de > /etc/vconsole.conf &&
- sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen &&
- sed -i 's/#en_US ISO-8859-1/en_US ISO-8859-1/' /etc/locale.gen &&
- locale-gen &&
- echo 'export LANG="en_US.UTF-8"' >> /etc/locale.conf &&
- echo 'export LC_COLLATE="C"' >> /etc/locale.conf &&
- # Setting Hostname
- echo "system" > /etc/hostname &&
- echo "127.0.0.1 localhost" >> /etc/hosts &&
- echo "::1 localhost" >> /etc/hosts &&
- echo "127.0.1.1 system.localdomain system" >> /etc/hosts &&
- # Configuring Network
- ln -s /etc/runit/sv/dhcpcd /etc/runit/runsvdir/current &&
- # Adding Users
- echo "Enter root password:" &&
- passwd &&
- useradd -G wheel -m user &&
- echo "Enter user password:" &&
- passwd user &&
- usermod -a -G video,audio,input,power,storage,optical,lp,scanner,dbus,uucp user &&
- # Configuring Grub & Encrypting Drives
- sed -i 's/HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)$/HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block 'encrypt' filesystems fsck)/' /etc/mkinitcpio.conf &&
- mkinitcpio -p linux-hardened &&
- sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=1/' /etc/default/grub &&
- sed -i 's/GRUB_DISTRIBUTOR="Artix"/GRUB_DISTRIBUTOR=""/' /etc/default/grub &&
- sed -i '/GRUB_DISTRIBUTOR=""/a GRUB_TOP_LEVEL="/boot/vmlinuz-linux-hardened"' /etc/default/grub &&
- sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"/GRUB_CMDLINE_LINUX_DEFAULT="loglevel=0 quiet udev.log_level=0 vt.global_cursor_default=0 nowatchdog page_alloc.shuffle=1"/' /etc/default/grub &&
- sed -i 's/#GRUB_ENABLE_CRYPTODISK=y/GRUB_ENABLE_CRYPTODISK=y/' /etc/default/grub &&
- sed -i 's/#GRUB_TERMINAL_OUTPUT=console/GRUB_TERMINAL_OUTPUT=console/' /etc/default/grub &&
- sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="cryptdevice=UUID='"$(ls -l /dev/disk/by-uuid | grep "sdb2" | awk '{print $9}')"':cryptroot"/' /etc/default/grub &&
- grub-install /dev/sdb && grub-mkconfig -o /boot/grub/grub.cfg &&
- # Installing Packages (Artix Repository)
- pacman -Syu --noconfirm --disable-download-timeout \
- artix-archlinux-support \
- artools-base \
- aspell \
- aspell-en \
- audacity \
- bc \
- calcurse \
- clamav \
- cmus \
- cronie \
- cronie-runit \
- cups \
- cups-filters \
- dash \
- dbus-glib \
- docx2txt \
- dvd+rw-tools \
- exiv2 \
- ffmpegthumbnailer \
- fzf \
- giflib \
- gimp \
- git \
- gnome-themes-extra \
- gtk2 \
- gtk-engine-murrine \
- hspell \
- htop \
- hunspell \
- hunspell-en_us \
- i2pd \
- imagemagick \
- imlib2 \
- keepassxc \
- libexif \
- libimagequant \
- libpwquality \
- libraqm \
- libreoffice-fresh \
- librewolf \
- libvoikko \
- libwebp \
- libxft \
- libxinerama \
- libxrandr \
- linux-lts \
- linux-lts-headers \
- maim \
- man-db \
- man-pages \
- mpv \
- newsboat \
- nftables \
- nftables-runit \
- noto-fonts-cjk \
- nuspell \
- opendoas \
- openresolv \
- openssh \
- pacman-contrib \
- pacutils \
- pass \
- pipewire \
- pipewire-pulse \
- playerctl \
- polkit \
- poppler \
- qbittorrent \
- ranger \
- rsync \
- sane \
- shellcheck-bin \
- tlp \
- tlp-runit \
- tor \
- torsocks \
- tumbler \
- ttf-carlito \
- ttf-dejavu \
- unclutter \
- unzip \
- wget \
- wireguard-tools \
- xautolock \
- xclip \
- xdg-utils \
- xdotool \
- xf86-video-intel \
- xorg-server \
- xorg-xhost \
- xorg-xinit \
- xorg-xrandr \
- xorg-xset \
- xwallpaper \
- yt-dlp \
- zathura \
- zathura-pdf-mupdf \
- zsh &&
- # Installing Packages (Arch Repository)
- echo -e "\n# Arch\n[extra]\nInclude = /etc/pacman.d/mirrorlist-arch" >> /etc/pacman.conf &&
- pacman -Syu --noconfirm --disable-download-timeout \
- claws-mail \
- hugo \
- mpv-mpris \
- pamixer \
- pass-otp \
- pulsemixer \
- termdown \
- ttf-caladea \
- ttf-jetbrains-mono-nerd \
- xcompmgr &&
- # Installing Packages (Arch User Repository)
- sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL$/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers &&
- echo "permit nopass user as root" >> /etc/doas.conf &&
- sudo -u user git clone https://aur.archlinux.org/yay-bin.git /home/user/yay-bin &&
- cd /home/user/yay-bin &&
- sudo -u user makepkg -si --noconfirm &&
- sudo -u user yay --sudo doas --save &&
- sudo -u user yay -S --noconfirm --disable-download-timeout \
- abook \
- cnijfilter2 \
- epub-thumbnailer-git \
- gruvbox-material-gtk-theme-git \
- gruvbox-material-icon-theme-git \
- neovim-gruvbox-material-git \
- sc-im \
- ueberzugpp &&
- sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers &&
- cd /home/user &&
- rm -r /home/user/yay-bin &&
- su - user
- ##################################################
- # Re-Symlinkling /bin/sh to dash
- doas ln -sfT dash /bin/sh &&
- # Making Zsh the Default Shell
- doas chsh -s /bin/zsh user &&
- doas chsh -s /bin/zsh root &&
- # Configuring Pipewire
- doas cp -r /usr/share/pipewire/pipewire* /etc/pipewire &&
- doas sed -i '/context.exec = \[/a \ { path = "/usr/bin/wireplumber" args = "" }\n { path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" }' /etc/pipewire/pipewire.conf &&
- # Configuring Runit Services
- doas ln -s /etc/runit/sv/tlp /etc/runit/runsvdir/current &&
- doas ln -s /etc/runit/sv/cronie /etc/runit/runsvdir/current &&
- doas ln -s /etc/runit/sv/nftables /etc/runit/runsvdir/current &&
- doas rm /etc/runit/runsvdir/current/agetty-tty3 &&
- doas rm /etc/runit/runsvdir/current/agetty-tty4 &&
- doas rm /etc/runit/runsvdir/current/agetty-tty5 &&
- doas rm /etc/runit/runsvdir/current/agetty-tty6 &&
- # Creating Symlinks
- doas mkdir /root/.config && doas mkdir /root/.config/nvim &&
- doas ln -s $HOME/.config/nvim/init.vim /root/.config/nvim/init.vim &&
- doas ln -s $HOME/.config/zsh/.root/zsh /root/.config/ &&
- doas ln -s /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d/ &&
- # Setting Permissions
- doas chmod 777 /mnt &&
- doas chown -c root:root /etc/doas.conf &&
- doas chmod -c 0400 /etc/doas.conf &&
- doas chown -c root:root /etc/nftables.conf &&
- doas chmod -c 0400 /etc/nftables.conf &&
- # Creating Cronjobs
- echo "*/15 * * * * newsboat -x reload" | crontab - &&
- (echo "$(crontab -l)
- */15 * * * * /usr/local/bin/mainbackup") | crontab - &&
- echo "*/1 * * * * pacman -Sy" | doas crontab - &&
- (echo "$(doas crontab -l)
- @reboot dbus-uuidgen >| /etc/machine-id") | doas crontab - &&
- # Configuring Fstab
- doas sed -i 's/relatime/noatime/g' /etc/fstab &&
- # Pulling Dotfiles from Personal Repository
- git clone https://notabug.org/kato/dotfiles &&
- wget https://notabug.org/kato/installation_guides/raw/master/artix_install &&
- # Copying Dotfiles (Home & Root)
- yes | cp -rf dotfiles/home/user/. ~ &&
- yes | doas cp -rf dotfiles/root/. /root/ &&
- # Compiling Software
- cd .config/ && cd dwm && doas make clean install && cd - &&
- cd dwmblocks && doas make clean install && cd - &&
- cd st && doas make clean install && cd - &&
- cd dmenu && doas make clean install && cd - &&
- cd farbfeld && doas make clean install && cd - &&
- cd nsxiv && doas make clean install && cd - &&
- cd sent && doas make clean install && cd - &&
- cd slock && doas make clean install && cd &&
- # Installing ZSH (Plugins)
- doas git clone https://github.com/zdharma-continuum/fast-syntax-highlighting /usr/share/zsh/plugins/fast-syntax-highlighting &&
- # Installing Neovim (Plugins)
- doas sh -c 'curl -fLo /root/.local/share/nvim/site/autoload/plug.vim \
- https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' &&
- doas nvim +PlugInstall +qall &&
- sh -c 'curl -fLo ~/.local/share/nvim/site/autoload/plug.vim \
- https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' &&
- nvim +PlugInstall +qall &&
- # Copying Dotfiles (Configs)
- yes | doas cp -rf dotfiles/lib/* /lib/ &&
- yes | doas cp -rf dotfiles/usr/* /usr/ &&
- yes | doas cp -rf dotfiles/etc/* /etc/ &&
- mv ~/dotfiles/ ~/documents/ &&
- # Setting Desktop Background
- setbg pictures/wallpapers/something.jpg 2>/dev/null &&
- # Configuring Groups
- doas groupadd nogroup &&
- yes | doas grpck
- ##################################################
- # Cleaning Up After Reboot
- doas paccache -rvk2 && yay -Sc --aur --noconfirm && rm -f ~/.config/zsh/.zsh_history && find ~/.cache -mindepth 1 -maxdepth 1 -type d ! -name backups -exec rm -rf {} + && doas rm -f /root/.config/zsh/.zsh_history && doas find /var/log -name "*.log" -type f -mtime +7 -delete &&
- doas rm /root/.config/nvim/README.md /root/.local/share/nvim/plugged/README.md /root/.local/share/nvim/site/autoload/README.md &&
- rm ~/.cache/backups/README.md ~/.local/share/nvim/plugged/README.md ~/.local/share/nvim/site/autoload/README.md ~/artix_install ~/documents/README.md ~/downloads/README.md ~/music/audiobooks/README.md ~/music/timers/README.md ~/music/youtube/README.md ~/pictures/misc/README.md ~/pictures/screenshots/README.md ~/videos/README.md &&
- rm .bash_history &&
- rm .bash_logout &&
- rm .bash_profile &&
- rm .bashrc &&
- # Enabling Autologin
- yes | doas cp -rf documents/dotfiles/run/runit/service/agetty-tty1/conf /run/runit/service/agetty-tty1/conf &&
- # Running Sysctl
- doas sysctl --system
- ##################################################
- # Setting Up Printer
- http://localhost:631/admin
- lpoptions -d Canon-TS3400-series_42-F8-DF-3B-B8-70
|