Skip to content

This page would define setup of basic installation with my bare minimum to get further the installation to either a server or desktop usecase

Info

Run these using your standard user with sudo if required

DotFiles⚓︎

Create Useful Directories⚓︎

Bash
mkdir -pv ~/Bench/Mount ~/GitIt/SyncFiles ~/info
Extra for Desktop
mkdir -pv ~/GitIt/Wallpapers-PC ~/Downloads

Syncthing⚓︎

  • Install Syncthing
  • Sync ~/GitIt/SyncFiles folder with following ignore patterns
    Bash
    1
    2
    3
    4
    5
    6
    7
    .git
    dotsPr/ssh/.ssh/known_hosts
    dotsPr/ssh/.ssh/known_hosts.old
    db
    configBak/authelia
    configBak/authelia-cloud
    configBak/fenrus
    
  • Sync PC-Walls with Desktops

dots⚓︎

cd ~/GitIt/SyncFiles/dots
stow -vt ~ debSvMisc/ bpytop/ htop/ neofetch/ nvim/ templates/ vim/ zsh/
cd ~/GitIt/SyncFiles/dots
stow -vt ~ alacritty/ awesome/ bpytop/ compton/ htop/ kitty/ neofetch/ nitrogen/ nvim/ pcMisc/ pcVol/ rofi/ templates/ theming/ vim/ zsh/
cd ~/GitIt/SyncFiles/dots
stow -vt ~ bpytop/ htop/ neofetch/ nvim/ templates/ piMisc/ vim/ zsh/

dotsPr⚓︎

cd ~/GitIt/SyncFiles/dotsPr
stow -vt ~ debSvHome/ env/ extras/ git/ ssh/
cd ~/GitIt/SyncFiles/dotsPr
stow -vt ~ env/ extras/ git/ pcHome/ redshift/ ssh/
cd ~/GitIt/SyncFiles/dotsPr
stow -vt ~ env/ git/ extras/ piHome/ ssh/

Vim Plug⚓︎

  • Install Plug
vim
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
nvim
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  • Install Plugins specified in config files
  • Open vim
  • Enter command mode by typing Esc+:
  • Type PlugInstall and hit Enter
  • Open nvim
  • Enter command mode by typing Esc+:
  • Type PlugInstall and hit Enter

DNS⚓︎

systemd-resolved⚓︎

Bash
sudo systemctl enable systemd-resolved.service --now

NTP⚓︎

  • Symlink /etc/localtime
    Bash
    ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
    
  • Enable timesync service
    Bash
    sudo systemctl enable systemd-timesyncd.service --now
    
  • Check status
    Bash
    timedatectl
    

Shell⚓︎

Install dashbinsh from AUR

Bash
paru -S dashbinsh --noconfirm

Already comes with sh pointing to dash

Starship Prompt⚓︎

Bash
sudo pacman -S starship --noconfirm
Bash
curl -sS https://starship.rs/install.sh | sh

User Shell to ZSH⚓︎

  • To change shell to zsh
    Run as user whose shell you want to change, NOT ROOT OR SUDO
    chsh -s $(which zsh)
    

Tip

If you're using bash and your bashrc won't load, read this
Happened to me on Pi-Zero

Zram-Swap and Swappiness⚓︎

Installation⚓︎

  • Install directly from AUR

    Bash
    paru -S zram-swap-git --noconfirm
    

  • Start and Enable service

    Bash
    sudo systemctl enable --now zram-swap.service
    

  • Install linux-modules

    Bash
    sudo nala install linux-generic -y
    
    Bash
    sudo nala install linux-modules-extra-raspi -y
    
  • Clone zram-swap repo

    Bash
    git clone https://github.com/foundObjects/zram-swap.git
    

  • Install from repo's script

    Bash
    cd zram-swap && sudo ./install.sh
    

  • Remove /swapfile and fstab

    Bash
    1
    2
    3
    sudo swapoff /swap.img
    sudo vim /etc/fstab and remove swapfile #TODO sed it
    sudo rm /swap.img
    

Swappiness value⚓︎

Bash
1
2
3
sudo tee -a /etc/sysctl.d/99-swappiness.conf > /dev/null <<EOT
vm.swappiness=10
EOT

Mkdocs Material⚓︎

  • Install python and pip

    Bash
    sudo pacman -Sy python python-pip --noconfirm
    
    Bash
    sudo apt update && sudo apt install python3 python3-pip -y
    
  • CD into mkdocs folder

    Bash
    cd ~/GitIt/SyncFiles/hudater.github.io
    

  • Install requirements from file

    Bash
    pip3 install -r docs/requirements.txt
    

Not necessary but might be useful⚓︎

SSH⚓︎

Fix SSH permissions after stow⚓︎

Bash
1
2
3
4
sudo chmod 755 /home/$USER && \
sudo chmod 755 /home/$USER/GitIt -R && \
sudo chmod 700 /home/$USER/GitIt/SyncFiles/dotsPr/ssh/.ssh && \
sudo chmod 600 /home/$USER/GitIt/SyncFiles/dotsPr/ssh/.ssh/*

SELinux⚓︎

If SELinux is enforcing, allow SSH policy

Bash
restorecon -R -v /home/$USER/.ssh

Sudo setup as your root user⚓︎

EDITOR=nvim visudo
1
2
3
4
5
@includedir /etc/sudoers.d #(1)
Defaults        insults
Defaults        env_reset,timestamp_timeout=60 #(2)
%wheel ALL=(ALL) ALL #(3)
ALL ALL=NOPASSWD: /sbin/poweroff,/sbin/reboot,/sbin/shutdown
  1. Move this line to top for passwordless commands to work
  2. This CAN BE a security risk. Not suggested to use
  3. Change wheel group to sudo if required

User Setup⚓︎

Create user⚓︎

UID and GID is 1000
sudo useradd -m -u 1000 -G sudo,plugdev,video,adm userName

Change Username with home and group⚓︎

Change Usernames accordingly
usermod -l newUserName -d /home/newUserName -m oldUserName
groupmod -n newUserName oldUserName