Skip to content

Instantly share code, notes, and snippets.

@withnix
Last active November 13, 2025 17:51
Show Gist options
  • Select an option

  • Save withnix/d0e03f483547bd41634cbd55e171551e to your computer and use it in GitHub Desktop.

Select an option

Save withnix/d0e03f483547bd41634cbd55e171551e to your computer and use it in GitHub Desktop.

Revisions

  1. withnix revised this gist Nov 13, 2025. 1 changed file with 6 additions and 7 deletions.
    13 changes: 6 additions & 7 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -26,13 +26,6 @@ ip link
    ping -c3 archlinux.org
    ```

    Enable NTP server sync

    ```sh
    timedatectl set-ntp true
    ```


    ## Partitions

    ```sh
    @@ -111,6 +104,12 @@ ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime

    > Replace region to **yours**
    Enable NTP server sync

    ```sh
    timedatectl set-ntp true
    ```

    ## Locale

    Uncomment selected row on `/etc/locale.gen` file:
  2. withnix revised this gist Nov 9, 2025. 1 changed file with 50 additions and 44 deletions.
    94 changes: 50 additions & 44 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -41,7 +41,9 @@ fdisk /dev/nvme0n1

    > Get your disk name - `fdisk -l`
    > **n** - new parition **p** - view the partition table **t** - change partition type **a** - mark as boot **w** - save changes
    > Type **g** to use a GPT, in new systems no reason to use MBR
    > **n** - new parition **p** - view the partition table **t** - change partition type **w** - save changes
    Label type: `GPT`

    @@ -194,6 +196,16 @@ Systemd-boot require specific mask for partition. Add `fmask=0077` and `dmask=00
    UUID=<UUID> /boot vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
    ```

    **Optional**, create `/boot/loader/entries/arch-fallback.conf` for fallback image:

    ```
    title Arch Linux (fallback initramfs)
    linux /vmlinuz-linux
    initrd /intel-ucode.img
    initrd /initramfs-linux-fallback.img
    options root=UUID=<UUID> rw rootfstype=ext4
    ```

    ## Create user

    Run `visudo` and uncomment the line:
    @@ -224,6 +236,8 @@ Install and run `NetworkManager` service
    pacman -S networkmanager && systemctl enable NetworkManager
    ```

    > You don't need to configure `systemd-networkd` if you already use `NetworkManager`
    ### Systemd-networkd

    Manual network configuration with using pre-installed systemd service
    @@ -284,29 +298,11 @@ To enable multilib (32-bit) repositiries uncomment next rows:
    Include = /etc/pacman.d/mirrorlist
    ```

    Enabling parallel downloads:

    ```
    ParallelDownloads = 5
    ```

    Comparing versions before updating:

    ```
    VerbosePkgLists
    ```

    Color output:

    ```
    Color
    ```

    ### Mirrors

    ```sh
    pacman --noconfirm -S reflector && \
    reflector --save /etc/pacman.d/mirrorlist -p https -l 10 --sort rate -c Germany && \
    reflector --save /etc/pacman.d/mirrorlist -p https -l 20 --sort rate -c Germany && \
    pacman -Syyu
    ```

    @@ -316,7 +312,7 @@ pacman -Syyu
    git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -si
    ```

    Optionally you can disable DEBUG packages in `/etc/makepkg.conf`
    **Optional**, disable DEBUG packages in `/etc/makepkg.conf`

    ```
    OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)
    @@ -328,14 +324,42 @@ OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)
    pacman --noconfirm -S mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon libva-utils
    ```

    ## DE / WM
    ## Sound

    ```sh
    pacman --noconfirm -S pipewire-{jack,alsa,pulse} wireplumber rtkit
    ```

    ```sh
    systemctl enable --now --user pipewire pipewire-pulse wireplumber
    ```

    ## Bluetooth

    ```sh
    pacman --noconfirm -S bluez bluez-utils
    ```

    ```sh
    systemctl enable --now bluetooth
    ```

    ## Desktop

    ### KDE Plasma

    > Ready-to-use Desktop Environment
    ```sh
    pacman -S plasma
    ```

    Enable SDDM service

    ```sh
    systemctl enable --now sddm
    ```

    Remove unnecessary packages

    ```
    @@ -344,11 +368,13 @@ pacman -Rns discover oxygen

    ### Sway

    > Tiling wayland compositor for build your own desktop
    ```sh
    pacman --noconfirm -S sway
    ```

    Put this in your `$HOME/.zprofile` (or `$HOME/.bash_profile` if you use bash) for start sway when you login without display manager:
    Put this in your `$HOME/.zprofile` (or `$HOME/.bash_profile` if you use bash) to start sway when you login without display manager:

    ```sh
    if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
    @@ -364,28 +390,8 @@ ExecStart=
    ExecStart=-/usr/bin/agetty --autologin with --noclear %I $TERM
    ```

    ## Sound

    ```sh
    pacman --noconfirm -S pipewire-{jack,alsa,pulse} wireplumber rtkit
    ```

    ```sh
    systemctl enable --now --user pipewire pipewire-pulse wireplumber
    ```

    ## Bluetooth

    ```sh
    pacman --noconfirm -S bluez bluez-utils
    ```

    ```sh
    systemctl enable --now bluetooth
    ```

    ## Packages (Optional)

    ```sh
    pacman --noconfirm -S zsh-completions zsh-autosuggestions firefox foot swaybg swayidle swaylock i3status-rust thunar gvfs swappy wl-clipboard slurp grim mako rofi-wayland vifm xdg-user-dirs xdg-desktop-portal-wlr wlr-randr ffmpeg wev fd bat ttf-ibm-plex curl mpv zathura imv eza git-delta ripgrep bottom duf transmission-gtk yt-dlp restic tealdeer ttf-nerd-fonts-symbols-mono noto-fonts-emoji noto-fonts-cjk
    pacman --noconfirm -S zsh-completions zsh-autosuggestions foot vifm ttf-ibm-plex curl mpv ripgrep yt-dlp restic ttf-nerd-fonts-symbols-mono noto-fonts-emoji noto-fonts-cjk
    ```
  3. withnix revised this gist Nov 6, 2025. 1 changed file with 51 additions and 21 deletions.
    72 changes: 51 additions & 21 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,8 @@ dd if=/path/to/archlinux.iso of=/dev/sdX bs=4M status=progress oflag=sync && syn

    ## Internet connection and system clock

    Check your connection

    ```sh
    ip link
    ```
    @@ -24,12 +26,13 @@ ip link
    ping -c3 archlinux.org
    ```

    Checking system clock sync:
    Enable NTP server sync

    ```sh
    timedatectl
    timedatectl set-ntp true
    ```


    ## Partitions

    ```sh
    @@ -42,11 +45,10 @@ fdisk /dev/nvme0n1
    Label type: `GPT`

    | Size | Partition | Type |
    | --------- | -------------- | ---------------- |
    | 512MB | /dev/nvme0n1p1 | 1 EFI partition |
    | 75-80GB | /dev/nvme0n1p2 | 2 root partition |
    | remaining | /dev/nvme0n1p3 | 3 home partition |
    | Size | Partition | Type |
    | --------- | -------------- | --------------------- |
    | 1GB | /dev/nvme0n1p1 | 1 EFI partition |
    | remaining | /dev/nvme0n1p2 | 2 root/home partition |

    Check new partitions table:

    @@ -57,19 +59,14 @@ lsblk
    ### Formating

    ```sh
    mkfs.fat -F32 /dev/nvme0n1p1
    ```

    ```sh
    mkfs.ext4 /dev/nvme0n1p2 && mkfs.ext4 /dev/nvme0n1p3
    mkfs.fat -F32 /dev/nvme0n1p1 && mkfs.ext4 /dev/nvme0n1p2
    ```

    ## Mount new system partitions

    ```sh
    mount /dev/nvme0n1p2 /mnt
    mount --mkdir /dev/nvme0n1p1 /mnt/boot
    mount --mkdir /dev/nvme0n1p3 /mnt/home
    ```

    # Installation
    @@ -83,6 +80,8 @@ Chroot and system installation
    pacstrap /mnt linux linux-firmware base efibootmgr intel-ucode
    ```

    > Install **amd-ucode** instead of **intel-ucode** if you have AMD cpu
    ## Generate fstab

    ```sh
    @@ -100,13 +99,16 @@ arch-chroot /mnt /bin/bash
    pacman --noconfirm -S base-devel neovim git zsh
    ```

    ## Time
    ## Timezone

    Set your current local timezone

    ```sh
    ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime
    hwclock --systohc --utc
    ```

    > Replace region to **yours**
    ## Locale

    Uncomment selected row on `/etc/locale.gen` file:
    @@ -127,7 +129,7 @@ Create `locale.conf` file:
    echo "LANG=en_US.UTF-8" >> /etc/locale.conf
    ```

    ## Network
    ## Hosts

    ```sh
    echo "myhostname" > /etc/hostname
    @@ -173,13 +175,17 @@ initrd /initramfs-linux.img
    options root=UUID=<UUID> rw rootfstype=ext4
    ```

    > Replace **intel-ucode** to **amd-ucode** if you use AMD cpu
    > Use `blkid` or `lsblk -f` to get your **\<UUID>**
    and create `/boot/loader/loader.conf` configuration file:

    ```
    default arch.conf
    timeout 0
    console-mode max
    editor no
    ```

    Systemd-boot require specific mask for partition. Add `fmask=0077` and `dmask=0077` to fstab:
    @@ -208,10 +214,20 @@ Change the new user passord:
    passwd <NAME>
    ```

    ## Systemd-networkd
    ## Network

    **This is necessary for the internet connection after installation**

    Install and run `NetworkManager` service

    ```sh
    pacman -S networkmanager && systemctl enable NetworkManager
    ```

    ### Systemd-networkd

    Manual network configuration with using pre-installed systemd service

    Create `/etc/systemd/network/20-wired.network` file:

    ```
    @@ -312,7 +328,21 @@ OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)
    pacman --noconfirm -S mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon libva-utils
    ```

    ## Sway
    ## DE / WM

    ### KDE Plasma

    ```sh
    pacman -S plasma
    ```

    Remove unnecessary packages

    ```
    pacman -Rns discover oxygen
    ```

    ### Sway

    ```sh
    pacman --noconfirm -S sway
    @@ -337,7 +367,7 @@ ExecStart=-/usr/bin/agetty --autologin with --noclear %I $TERM
    ## Sound

    ```sh
    pacman --noconfirm -S pipewire-{jack,alsa,pulse} wireplumber rtkit pavucontrol
    pacman --noconfirm -S pipewire-{jack,alsa,pulse} wireplumber rtkit
    ```

    ```sh
    @@ -347,14 +377,14 @@ systemctl enable --now --user pipewire pipewire-pulse wireplumber
    ## Bluetooth

    ```sh
    pacman --noconfirm -S bluez bluez-utils blueman
    pacman --noconfirm -S bluez bluez-utils
    ```

    ```sh
    systemctl enable --now bluetooth
    ```

    ## Packages
    ## Packages (Optional)

    ```sh
    pacman --noconfirm -S zsh-completions zsh-autosuggestions firefox foot swaybg swayidle swaylock i3status-rust thunar gvfs swappy wl-clipboard slurp grim mako rofi-wayland vifm xdg-user-dirs xdg-desktop-portal-wlr wlr-randr ffmpeg wev fd bat ttf-ibm-plex curl mpv zathura imv eza git-delta ripgrep bottom duf transmission-gtk yt-dlp restic tealdeer ttf-nerd-fonts-symbols-mono noto-fonts-emoji noto-fonts-cjk
  4. withnix revised this gist May 20, 2025. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -326,6 +326,14 @@ if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
    fi
    ```

    If you want use autologin without display manager create `/etc/systemd/system/[email protected]/autologin.conf` getty config file with

    ```
    [Service]
    ExecStart=
    ExecStart=-/usr/bin/agetty --autologin with --noclear %I $TERM
    ```

    ## Sound

    ```sh
  5. withnix revised this gist Jan 7, 2025. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -80,7 +80,7 @@ Chroot and system installation

    ```sh
    # Install base system packages
    pacstrap /mnt linux linux-firmware base
    pacstrap /mnt linux linux-firmware base efibootmgr intel-ucode
    ```

    ## Generate fstab
    @@ -97,7 +97,7 @@ arch-chroot /mnt /bin/bash

    ```sh
    # Install useful packages
    pacman --noconfirm -S base-devel efibootmgr neovim git zsh intel-ucode
    pacman --noconfirm -S base-devel neovim git zsh
    ```

    ## Time
    @@ -280,6 +280,12 @@ Comparing versions before updating:
    VerbosePkgLists
    ```

    Color output:

    ```
    Color
    ```

    ### Mirrors

    ```sh
  6. withnix revised this gist Dec 28, 2024. 1 changed file with 48 additions and 23 deletions.
    71 changes: 48 additions & 23 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -36,7 +36,9 @@ timedatectl
    fdisk /dev/nvme0n1
    ```

    > Get your disk name - `fdisk -l`
    > Get your disk name - `fdisk -l`
    > **n** - new parition **p** - view the partition table **t** - change partition type **a** - mark as boot **w** - save changes
    Label type: `GPT`

    @@ -78,7 +80,7 @@ Chroot and system installation

    ```sh
    # Install base system packages
    pacstrap /mnt linux linux-headers linux-firmware base base-devel efibootmgr intel-ucode zsh
    pacstrap /mnt linux linux-firmware base
    ```

    ## Generate fstab
    @@ -90,12 +92,12 @@ genfstab -U /mnt >> /mnt/etc/fstab
    ## Chroot on new system

    ```sh
    arch-chroot /mnt /bin/zsh
    arch-chroot /mnt /bin/bash
    ```

    ```sh
    # Install useful packages
    pacman --noconfirm -S neovim tmux git
    pacman --noconfirm -S base-devel efibootmgr neovim git zsh intel-ucode
    ```

    ## Time
    @@ -141,15 +143,6 @@ Open the `/etc/hosts` and write (change **myhostname** to your own)
    127.0.1.1 myhostname.localdomain myhostname
    ```

    ### DHCP

    **This is necessary for the internet connection after installation**

    ```sh
    pacman --noconfirm -S dhcpcd
    systemctl enable dhcpcd.service
    ```

    ## Generate system image

    ```sh
    @@ -189,10 +182,10 @@ default arch.conf
    timeout 0
    ```

    Systemd-boot require specific mask for partition. Add `fmask=0137` and `dmask=0027` to fstab:
    Systemd-boot require specific mask for partition. Add `fmask=0077` and `dmask=0077` to fstab:

    ```
    UUID=<UUID> /boot vfat rw,relatime,fmask=0137,dmask=0027,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
    UUID=<UUID> /boot vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
    ```

    ## Create user
    @@ -215,6 +208,45 @@ Change the new user passord:
    passwd <NAME>
    ```

    ## Systemd-networkd

    **This is necessary for the internet connection after installation**

    Create `/etc/systemd/network/20-wired.network` file:

    ```
    [Match]
    Name=en*
    [Network]
    DHCP=yes
    ```

    And enable service:

    ```sh
    systemctl enable systemd-networkd.service
    ```

    ### Systemd-resolved

    ```sh
    systemctl enable systemd-resolved.service
    ```

    To provide domain name resolution for software that reads /etc/resolv.conf directly, replace `/etc/resolv.conf` with a symbolic link to it:

    ```sh
    ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
    ```

    If you want to use your own dns-servers, specify them in `/etc/systemd/resolved.conf.d/dns_servers.conf`:

    ```
    [Resolve]
    DNS=<your DNS servers here>
    ```

    ## Reboot

    ```sh
    @@ -271,7 +303,7 @@ OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)
    ## AMD

    ```sh
    pacman --noconfirm -S mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon libva-mesa-driver libva-utils
    pacman --noconfirm -S mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon libva-utils
    ```

    ## Sway
    @@ -308,13 +340,6 @@ pacman --noconfirm -S bluez bluez-utils blueman
    systemctl enable --now bluetooth
    ```

    ## TTY font

    ```sh
    pacman --noconfirm -S terminus-font && \
    echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf
    ```

    ## Packages

    ```sh
  7. withnix revised this gist Nov 10, 2024. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -298,6 +298,16 @@ pacman --noconfirm -S pipewire-{jack,alsa,pulse} wireplumber rtkit pavucontrol
    systemctl enable --now --user pipewire pipewire-pulse wireplumber
    ```

    ## Bluetooth

    ```sh
    pacman --noconfirm -S bluez bluez-utils blueman
    ```

    ```sh
    systemctl enable --now bluetooth
    ```

    ## TTY font

    ```sh
  8. withnix revised this gist Nov 10, 2024. 1 changed file with 36 additions and 59 deletions.
    95 changes: 36 additions & 59 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    Live CD installation section

    ## Create a bootable USB drive
    ## Create a bootable USB Flash Drive

    Download [Arch Linux ISO](https://archlinux.org/download/)

    @@ -11,7 +11,7 @@ You may use Rufus, balenaEtcher or Ventoy
    or from linux command line:

    ```sh
    dd if=archlinux.iso of=/dev/sdX bs=4M status=progress oflag=sync
    dd if=/path/to/archlinux.iso of=/dev/sdX bs=4M status=progress oflag=sync && sync
    ```

    ## Internet connection and system clock
    @@ -70,6 +70,10 @@ mount --mkdir /dev/nvme0n1p1 /mnt/boot
    mount --mkdir /dev/nvme0n1p3 /mnt/home
    ```

    # Installation

    Chroot and system installation

    ## System installation

    ```sh
    @@ -91,7 +95,7 @@ arch-chroot /mnt /bin/zsh

    ```sh
    # Install useful packages
    pacman --noconfirm -S neovim doas tmux git
    pacman --noconfirm -S neovim tmux git
    ```

    ## Time
    @@ -122,22 +126,21 @@ echo "LANG=en_US.UTF-8" >> /etc/locale.conf
    ```

    ## Network
    ### Hostname

    ```sh
    echo "myhostname" >> /etc/hostname
    echo "myhostname" > /etc/hostname
    ```

    ### Hosts
    > Instead of **myhostname**, enter any name you like
    Open the `/etc/hosts` and write (change **myhostname** to your own)

    ```sh
    127.0.0.1 localhost
    ::1 localhost
    127.0.1.1 myhostname.localdomain myhostname
    ```

    > Instead of **myhostname**, enter any name you like
    ### DHCP

    **This is necessary for the internet connection after installation**
    @@ -147,16 +150,18 @@ pacman --noconfirm -S dhcpcd
    systemctl enable dhcpcd.service
    ```

    ## Root password
    ## Generate system image

    ```sh
    passwd
    mkinitcpio -P
    ```

    ## Generate system image
    ## Root password

    Set the root password:

    ```sh
    mkinitcpio -P
    passwd
    ```

    ## Systemd-boot
    @@ -165,66 +170,49 @@ mkinitcpio -P
    bootctl --path=/boot install
    ```

    ### /boot/loader/loader.conf

    ```
    default arch.conf
    timeout 0
    editor no
    ```

    ### /boot/loader/entries/arch.conf
    Create `/boot/loader/entries/arch.conf` configuration file:

    ```
    title Arch Linux
    linux /vmlinuz-linux
    initrd /intel-ucode.img
    initrd /initramfs-linux.img
    options root=UUID=<UUID> rw rootfstype=ext4 loglevel=3
    options root=UUID=<UUID> rw rootfstype=ext4
    ```

    > Get your root partition **\<UUID>** - `blkid`
    > Use `blkid` or `lsblk -f` to get your **\<UUID>**
    ### /boot/loader/entries/arch-fallback.conf

    *Fallback image (Optional)*
    and create `/boot/loader/loader.conf` configuration file:

    ```
    title Arch Linux (fallback initramfs)
    linux /vmlinuz-linux
    initrd /intel-ucode.img
    initrd /initramfs-linux-fallback.img
    options root=UUID=<UUID> rw
    default arch.conf
    timeout 0
    ```

    ### /etc/fstab

    systemd-boot require specific mask for partition. Add `fmask=0137` and `dmask=0027` to fstab:
    Systemd-boot require specific mask for partition. Add `fmask=0137` and `dmask=0027` to fstab:

    ```
    # /dev/nvme0n1p1
    UUID=<UUID> /boot vfat rw,relatime,fmask=0137,dmask=0027,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
    ```

    ## Create user

    ```sh
    useradd -mG wheel -s /bin/zsh <NAME>
    passwd <NAME>
    ```
    Run `visudo` and uncomment the line:

    ### /etc/doas.conf
    ```
    %wheel ALL=(ALL:ALL) ALL
    ```

    Allow `whell` group use doas:
    Create new user and add them on `wheel` group

    ```sh
    permit :whell
    useradd -mG wheel -s /bin/zsh <NAME>
    ```

    And create symlink to sudo:
    Change the new user passord:

    ```sh
    ln -s $(which doas) /usr/bin/sudo
    passwd <NAME>
    ```

    ## Reboot
    @@ -303,25 +291,14 @@ fi
    ## Sound

    ```sh
    pacman --noconfirm -S pipewire pipewire-pulse pipewire-jack pipewire-alsa wireplumber rtkit pavucontrol
    ```

    ```sh
    systemctl enable --now rtkit-daemon.service
    pacman --noconfirm -S pipewire-{jack,alsa,pulse} wireplumber rtkit pavucontrol
    ```

    ```sh
    systemctl enable --now --user pipewire.service pipewire-pulse.service wireplumber.service
    ```

    ## Fonts
    ### Chinese/Korean/Japanese glyphs support

    ```sh
    pacman --noconfirm -S adobe-source-han-serif-tw-fonts adobe-source-han-serif-otc-fonts adobe-source-han-serif-kr-fonts adobe-source-han-serif-jp-fonts adobe-source-han-serif-cn-fonts
    systemctl enable --now --user pipewire pipewire-pulse wireplumber
    ```

    ### TTY font
    ## TTY font

    ```sh
    pacman --noconfirm -S terminus-font && \
    @@ -331,5 +308,5 @@ echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf
    ## Packages

    ```sh
    pacman --noconfirm -S firefox foot swaybg swayidle swaylock i3status-rust thunar gvfs swappy wl-clipboard slurp grim mako rofi-wayland vifm xdg-user-dirs xdg-desktop-portal-wlr wlr-randr ffmpeg wev fd bat ttf-ibm-plex curl mpv zathura imv eza git-delta ripgrep bottom duf transmission-gtk yt-dlp restic tealdeer ttf-nerd-fonts-symbols-mono
    pacman --noconfirm -S zsh-completions zsh-autosuggestions firefox foot swaybg swayidle swaylock i3status-rust thunar gvfs swappy wl-clipboard slurp grim mako rofi-wayland vifm xdg-user-dirs xdg-desktop-portal-wlr wlr-randr ffmpeg wev fd bat ttf-ibm-plex curl mpv zathura imv eza git-delta ripgrep bottom duf transmission-gtk yt-dlp restic tealdeer ttf-nerd-fonts-symbols-mono noto-fonts-emoji noto-fonts-cjk
    ```
  9. withnix revised this gist Oct 5, 2024. 1 changed file with 22 additions and 14 deletions.
    36 changes: 22 additions & 14 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Install
    # Pre-installation

    Live CD installation section

    @@ -14,9 +14,7 @@ or from linux command line:
    dd if=archlinux.iso of=/dev/sdX bs=4M status=progress oflag=sync
    ```

    ## Network

    Connection state:
    ## Internet connection and system clock

    ```sh
    ip link
    @@ -26,7 +24,7 @@ ip link
    ping -c3 archlinux.org
    ```

    Checking data-time sync:
    Checking system clock sync:

    ```sh
    timedatectl
    @@ -76,7 +74,7 @@ mount --mkdir /dev/nvme0n1p3 /mnt/home

    ```sh
    # Install base system packages
    pacstrap /mnt linux linux-headers linux-firmware base base-devel efibootmgr intel-ucode
    pacstrap /mnt linux linux-headers linux-firmware base base-devel efibootmgr intel-ucode zsh
    ```

    ## Generate fstab
    @@ -93,10 +91,10 @@ arch-chroot /mnt /bin/zsh

    ```sh
    # Install useful packages
    pacman --noconfirm -S zsh neovim doas tmux git
    pacman --noconfirm -S neovim doas tmux git
    ```

    ## Clock
    ## Time

    ```sh
    ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime
    @@ -123,21 +121,31 @@ Create `locale.conf` file:
    echo "LANG=en_US.UTF-8" >> /etc/locale.conf
    ```

    ## Hostname
    ## Network
    ### Hostname

    ```sh
    echo "hostname" >> /etc/hostname
    echo "myhostname" >> /etc/hostname
    ```

    ### Hosts

    ```sh
    127.0.0.1 localhost
    ::1 localhost
    127.0.1.1 hostname
    127.0.1.1 myhostname.localdomain myhostname
    ```

    > Instead of **hostname**, enter any name you like
    > Instead of **myhostname**, enter any name you like
    ### DHCP

    **This is necessary for the internet connection after installation**

    ```sh
    pacman --noconfirm -S dhcpcd
    systemctl enable dhcpcd.service
    ```

    ## Root password

    @@ -225,7 +233,7 @@ ln -s $(which doas) /usr/bin/sudo
    exit && unmount -a && reboot
    ```

    # Post Install
    # Post-installation

    Graphics, fonts, user-space packages and pacman configuration

    @@ -323,5 +331,5 @@ echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf
    ## Packages

    ```sh
    pacman --noconfirm -S firefox nvim foot swaybg swayidle swaylock i3status-rust thunar gvfs swappy wl-clipboard slurp grim mako rofi-wayland vifm xdg-user-dirs xdg-desktop-portal-wlr wlr-randr ffmpeg wev fd bat ttf-ibm-plex curl mpv zathura imv eza tmux git-delta ripgrep bottom duf transmission-gtk yt-dlp restic tealdeer ttf-nerd-fonts-symbols-mono
    pacman --noconfirm -S firefox foot swaybg swayidle swaylock i3status-rust thunar gvfs swappy wl-clipboard slurp grim mako rofi-wayland vifm xdg-user-dirs xdg-desktop-portal-wlr wlr-randr ffmpeg wev fd bat ttf-ibm-plex curl mpv zathura imv eza git-delta ripgrep bottom duf transmission-gtk yt-dlp restic tealdeer ttf-nerd-fonts-symbols-mono
    ```
  10. withnix revised this gist Oct 5, 2024. 1 changed file with 37 additions and 37 deletions.
    74 changes: 37 additions & 37 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -10,31 +10,31 @@ You may use Rufus, balenaEtcher or Ventoy

    or from linux command line:

    ```
    ```sh
    dd if=archlinux.iso of=/dev/sdX bs=4M status=progress oflag=sync
    ```

    ## Network

    Connection state:

    ```
    ```sh
    ip link
    ```

    ```
    ```sh
    ping -c3 archlinux.org
    ```

    Checking data-time sync:

    ```
    ```sh
    timedatectl
    ```

    ## Partitions

    ```
    ```sh
    fdisk /dev/nvme0n1
    ```

    @@ -50,55 +50,55 @@ Label type: `GPT`

    Check new partitions table:

    ```
    ```sh
    lsblk
    ```

    ### Formating

    ```
    ```sh
    mkfs.fat -F32 /dev/nvme0n1p1
    ```

    ```
    ```sh
    mkfs.ext4 /dev/nvme0n1p2 && mkfs.ext4 /dev/nvme0n1p3
    ```

    ## Mount new system partitions

    ```
    ```sh
    mount /dev/nvme0n1p2 /mnt
    mount --mkdir /dev/nvme0n1p1 /mnt/boot
    mount --mkdir /dev/nvme0n1p3 /mnt/home
    ```

    ## System installation

    ```shell
    ```sh
    # Install base system packages
    pacstrap /mnt linux linux-headers linux-firmware base base-devel efibootmgr intel-ucode
    ```

    ## Generate fstab

    ```
    ```sh
    genfstab -U /mnt >> /mnt/etc/fstab
    ```

    ## Chroot on new system

    ```
    ```sh
    arch-chroot /mnt /bin/zsh
    ```

    ```shell
    ```sh
    # Install useful packages
    pacman -S zsh neovim doas tmux git
    pacman --noconfirm -S zsh neovim doas tmux git
    ```

    ## Clock

    ```
    ```sh
    ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime
    hwclock --systohc --utc
    ```
    @@ -113,25 +113,25 @@ en_US.UTF-8 UTF-8

    Generate locale:

    ```
    ```sh
    locale-gen
    ```

    Create `locale.conf` file:

    ```
    ```sh
    echo "LANG=en_US.UTF-8" >> /etc/locale.conf
    ```

    ## Hostname

    ```
    ```sh
    echo "hostname" >> /etc/hostname
    ```

    ### Hosts

    ```
    ```sh
    127.0.0.1 localhost
    ::1 localhost
    127.0.1.1 hostname
    @@ -141,19 +141,19 @@ echo "hostname" >> /etc/hostname
    ## Root password

    ```
    ```sh
    passwd
    ```

    ## Generate system image

    ```
    ```sh
    mkinitcpio -P
    ```

    ## Systemd-boot

    ```
    ```sh
    bootctl --path=/boot install
    ```

    @@ -200,7 +200,7 @@ UUID=<UUID> /boot vfat rw,relatime,fmask=0137,dmask=0027,c

    ## Create user

    ```
    ```sh
    useradd -mG wheel -s /bin/zsh <NAME>
    passwd <NAME>
    ```
    @@ -209,19 +209,19 @@ passwd <NAME>

    Allow `whell` group use doas:

    ```
    ```sh
    permit :whell
    ```

    And create symlink to sudo:

    ```
    ```sh
    ln -s $(which doas) /usr/bin/sudo
    ```

    ## Reboot

    ```
    ```sh
    exit && unmount -a && reboot
    ```

    @@ -254,15 +254,15 @@ VerbosePkgLists

    ### Mirrors

    ```shell
    ```sh
    pacman --noconfirm -S reflector && \
    reflector --save /etc/pacman.d/mirrorlist -p https -l 10 --sort rate -c Germany && \
    pacman -Syyu
    ```

    ### AUR helper (yay)

    ```shell
    ```sh
    git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -si
    ```

    @@ -274,54 +274,54 @@ OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)

    ## AMD

    ```shell
    ```sh
    pacman --noconfirm -S mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon libva-mesa-driver libva-utils
    ```

    ## Sway

    ```shell
    ```sh
    pacman --noconfirm -S sway
    ```

    Put this in your `$HOME/.zprofile` (or `$HOME/.bash_profile` if you use bash) for start sway when you login without display manager:

    ```shell
    ```sh
    if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
    exec sway
    fi
    ```

    ## Sound

    ```shell
    ```sh
    pacman --noconfirm -S pipewire pipewire-pulse pipewire-jack pipewire-alsa wireplumber rtkit pavucontrol
    ```

    ```shell
    ```sh
    systemctl enable --now rtkit-daemon.service
    ```

    ```shell
    ```sh
    systemctl enable --now --user pipewire.service pipewire-pulse.service wireplumber.service
    ```

    ## Fonts
    ### Chinese/Korean/Japanese glyphs support

    ```shell
    ```sh
    pacman --noconfirm -S adobe-source-han-serif-tw-fonts adobe-source-han-serif-otc-fonts adobe-source-han-serif-kr-fonts adobe-source-han-serif-jp-fonts adobe-source-han-serif-cn-fonts
    ```

    ### TTY font

    ```shell
    ```sh
    pacman --noconfirm -S terminus-font && \
    echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf
    ```

    ## Packages

    ```shell
    ```sh
    pacman --noconfirm -S firefox nvim foot swaybg swayidle swaylock i3status-rust thunar gvfs swappy wl-clipboard slurp grim mako rofi-wayland vifm xdg-user-dirs xdg-desktop-portal-wlr wlr-randr ffmpeg wev fd bat ttf-ibm-plex curl mpv zathura imv eza tmux git-delta ripgrep bottom duf transmission-gtk yt-dlp restic tealdeer ttf-nerd-fonts-symbols-mono
    ```
  11. withnix revised this gist Oct 5, 2024. 1 changed file with 14 additions and 9 deletions.
    23 changes: 14 additions & 9 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,11 @@ Live CD installation section

    ## Create a bootable USB drive

    [Rufus](https://rufus.ie/en) / [Ventoy](https://www.ventoy.net/en/download.html)
    Download [Arch Linux ISO](https://archlinux.org/download/)

    or from command line:
    You may use Rufus, balenaEtcher or Ventoy

    or from linux command line:

    ```
    dd if=archlinux.iso of=/dev/sdX bs=4M status=progress oflag=sync
    @@ -36,6 +38,8 @@ timedatectl
    fdisk /dev/nvme0n1
    ```

    > Get your disk name - `fdisk -l`
    Label type: `GPT`

    | Size | Partition | Type |
    @@ -122,17 +126,19 @@ echo "LANG=en_US.UTF-8" >> /etc/locale.conf
    ## Hostname

    ```
    echo "localhost" >> /etc/hostname
    echo "hostname" >> /etc/hostname
    ```

    ### Hosts

    ```
    127.0.0.1 localhost
    ::1 localhost
    127.0.1.1 localhost.localdomain localhost
    127.0.1.1 hostname
    ```

    > Instead of **hostname**, enter any name you like
    ## Root password

    ```
    @@ -154,16 +160,13 @@ bootctl --path=/boot install
    ### /boot/loader/loader.conf

    ```
    default arch.conf
    default arch.conf
    timeout 0
    console-mode auto
    editor no
    editor no
    ```

    ### /boot/loader/entries/arch.conf

    `<UUID>` - `blkid`

    ```
    title Arch Linux
    linux /vmlinuz-linux
    @@ -172,6 +175,8 @@ initrd /initramfs-linux.img
    options root=UUID=<UUID> rw rootfstype=ext4 loglevel=3
    ```

    > Get your root partition **\<UUID>** - `blkid`
    ### /boot/loader/entries/arch-fallback.conf

    *Fallback image (Optional)*
  12. withnix revised this gist Oct 5, 2024. 1 changed file with 105 additions and 0 deletions.
    105 changes: 105 additions & 0 deletions arch-install.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    # Install

    Live CD installation section

    ## Create a bootable USB drive

    [Rufus](https://rufus.ie/en) / [Ventoy](https://www.ventoy.net/en/download.html)
    @@ -214,4 +218,105 @@ ln -s $(which doas) /usr/bin/sudo

    ```
    exit && unmount -a && reboot
    ```

    # Post Install

    Graphics, fonts, user-space packages and pacman configuration

    ## Pacman

    Config — `/etc/pacman.conf`

    To enable multilib (32-bit) repositiries uncomment next rows:

    ```
    [multilib]
    Include = /etc/pacman.d/mirrorlist
    ```

    Enabling parallel downloads:

    ```
    ParallelDownloads = 5
    ```

    Comparing versions before updating:

    ```
    VerbosePkgLists
    ```

    ### Mirrors

    ```shell
    pacman --noconfirm -S reflector && \
    reflector --save /etc/pacman.d/mirrorlist -p https -l 10 --sort rate -c Germany && \
    pacman -Syyu
    ```

    ### AUR helper (yay)

    ```shell
    git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -si
    ```

    Optionally you can disable DEBUG packages in `/etc/makepkg.conf`

    ```
    OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)
    ```

    ## AMD

    ```shell
    pacman --noconfirm -S mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon libva-mesa-driver libva-utils
    ```

    ## Sway

    ```shell
    pacman --noconfirm -S sway
    ```

    Put this in your `$HOME/.zprofile` (or `$HOME/.bash_profile` if you use bash) for start sway when you login without display manager:

    ```shell
    if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
    exec sway
    fi
    ```

    ## Sound

    ```shell
    pacman --noconfirm -S pipewire pipewire-pulse pipewire-jack pipewire-alsa wireplumber rtkit pavucontrol
    ```

    ```shell
    systemctl enable --now rtkit-daemon.service
    ```

    ```shell
    systemctl enable --now --user pipewire.service pipewire-pulse.service wireplumber.service
    ```

    ## Fonts
    ### Chinese/Korean/Japanese glyphs support

    ```shell
    pacman --noconfirm -S adobe-source-han-serif-tw-fonts adobe-source-han-serif-otc-fonts adobe-source-han-serif-kr-fonts adobe-source-han-serif-jp-fonts adobe-source-han-serif-cn-fonts
    ```

    ### TTY font

    ```shell
    pacman --noconfirm -S terminus-font && \
    echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf
    ```

    ## Packages

    ```shell
    pacman --noconfirm -S firefox nvim foot swaybg swayidle swaylock i3status-rust thunar gvfs swappy wl-clipboard slurp grim mako rofi-wayland vifm xdg-user-dirs xdg-desktop-portal-wlr wlr-randr ffmpeg wev fd bat ttf-ibm-plex curl mpv zathura imv eza tmux git-delta ripgrep bottom duf transmission-gtk yt-dlp restic tealdeer ttf-nerd-fonts-symbols-mono
    ```
  13. withnix renamed this gist May 30, 2024. 1 changed file with 16 additions and 16 deletions.
    32 changes: 16 additions & 16 deletions my-arch-install.md → arch-install.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ dd if=archlinux.iso of=/dev/sdX bs=4M status=progress oflag=sync

    ## Network

    I use LAN connection. Check:
    Connection state:

    ```
    ip link
    @@ -20,7 +20,7 @@ ip link
    ping -c3 archlinux.org
    ```

    Check data-time sync:
    Checking data-time sync:

    ```
    timedatectl
    @@ -32,20 +32,21 @@ timedatectl
    fdisk /dev/nvme0n1
    ```

    Label type: `GPT`

    | Size | Partition | Type |
    | --------- | -------------- | ---------------- |
    | 512MB | /dev/nvme0n1p1 | 1 EFI partition |
    | 75-80GB | /dev/nvme0n1p2 | 2 root partition |
    | remaining | /dev/nvme0n1p3 | 3 home partition |


    Check new partition:
    Check new partitions table:

    ```
    lsblk
    ```

    ### Formating partition table
    ### Formating

    ```
    mkfs.fat -F32 /dev/nvme0n1p1
    @@ -55,7 +56,7 @@ mkfs.fat -F32 /dev/nvme0n1p1
    mkfs.ext4 /dev/nvme0n1p2 && mkfs.ext4 /dev/nvme0n1p3
    ```

    ## Mount new system partition
    ## Mount new system partitions

    ```
    mount /dev/nvme0n1p2 /mnt
    @@ -65,8 +66,9 @@ mount --mkdir /dev/nvme0n1p3 /mnt/home

    ## System installation

    ```
    pacstrap /mnt linux linux-headers linux-firmware mkinitcpio base base-devel efibootmgr zsh neovim doas tmux intel-ucode git
    ```shell
    # Install base system packages
    pacstrap /mnt linux linux-headers linux-firmware base base-devel efibootmgr intel-ucode
    ```

    ## Generate fstab
    @@ -81,6 +83,11 @@ genfstab -U /mnt >> /mnt/etc/fstab
    arch-chroot /mnt /bin/zsh
    ```

    ```shell
    # Install useful packages
    pacman -S zsh neovim doas tmux git
    ```

    ## Clock

    ```
    @@ -93,9 +100,7 @@ hwclock --systohc --utc
    Uncomment selected row on `/etc/locale.gen` file:

    ```
    170 #en_SG ISO-8859-1
    171 en_US.UTF-8 UTF-8
    172 #en_US ISO-8859-1
    en_US.UTF-8 UTF-8
    ```

    Generate locale:
    @@ -162,11 +167,6 @@ initrd /intel-ucode.img
    initrd /initramfs-linux.img
    options root=UUID=<UUID> rw rootfstype=ext4 loglevel=3
    ```
    #### Optional kernel options

    `nowatchdog` - Dont need on desktop system.

    `libahci.ignore_sss=1` - Disable [staggered spin-up](https://en.wikipedia.org/wiki/Spin-up#Staggered_spin-up). Speedup boot.

    ### /boot/loader/entries/arch-fallback.conf

  14. withnix revised this gist May 18, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion my-arch-install.md
    Original file line number Diff line number Diff line change
    @@ -66,7 +66,7 @@ mount --mkdir /dev/nvme0n1p3 /mnt/home
    ## System installation

    ```
    pacstrap /mnt linux linux-headers linux-firmware mkinitcpio base base-devel efibootmgr zsh neovim doas tmux intel-ucode
    pacstrap /mnt linux linux-headers linux-firmware mkinitcpio base base-devel efibootmgr zsh neovim doas tmux intel-ucode git
    ```

    ## Generate fstab
  15. withnix revised this gist May 4, 2024. 1 changed file with 8 additions and 11 deletions.
    19 changes: 8 additions & 11 deletions my-arch-install.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,4 @@
    ## ISO

    [Official image](https://archlinux.org/download)

    ### Create a USB drive
    ## Create a bootable USB drive

    [Rufus](https://rufus.ie/en) / [Ventoy](https://www.ventoy.net/en/download.html)

    @@ -36,11 +32,12 @@ timedatectl
    fdisk /dev/nvme0n1
    ```

    ```
    1 512MB - /dev/nvme0n1p1 EFI partition
    2 75-80GB - /dev/nvme0n1p2 root partition
    3 remaining - /dev/nvme0n1p3 home partition
    ```
    | Size | Partition | Type |
    | --------- | -------------- | ---------------- |
    | 512MB | /dev/nvme0n1p1 | 1 EFI partition |
    | 75-80GB | /dev/nvme0n1p2 | 2 root partition |
    | remaining | /dev/nvme0n1p3 | 3 home partition |


    Check new partition:

    @@ -78,7 +75,7 @@ pacstrap /mnt linux linux-headers linux-firmware mkinitcpio base base-devel efib
    genfstab -U /mnt >> /mnt/etc/fstab
    ```

    ## Chroot
    ## Chroot on new system

    ```
    arch-chroot /mnt /bin/zsh
  16. withnix revised this gist Apr 10, 2024. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions my-arch-install.md
    Original file line number Diff line number Diff line change
    @@ -169,12 +169,8 @@ options root=UUID=<UUID> rw rootfstype=ext4 loglevel=3

    `nowatchdog` - Dont need on desktop system.

    `page_alloc.shuffle=1` - Improve RAM performance. [Details](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e900a918b0984ec8f2eb150b8477a47b75d17692)

    `libahci.ignore_sss=1` - Disable [staggered spin-up](https://en.wikipedia.org/wiki/Spin-up#Staggered_spin-up). Speedup boot.

    `raid=noautodetect` - I dont use raid, this option disable autodetect in start. Speedup boot.

    ### /boot/loader/entries/arch-fallback.conf

    *Fallback image (Optional)*
  17. withnix revised this gist Apr 6, 2024. 1 changed file with 0 additions and 260 deletions.
    260 changes: 0 additions & 260 deletions my-arch-install.md
    Original file line number Diff line number Diff line change
    @@ -221,264 +221,4 @@ ln -s $(which doas) /usr/bin/sudo

    ```
    exit && unmount -a && reboot
    ```

    ## After install

    ### TTY font

    ```
    # pacman -S terminus-font
    # echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf
    ```

    ### Multilib (/etc/pacman.conf)

    To enable multilib (32-bit) repositiries uncomment this rows:

    ```
    [multilib]
    Include = /etc/pacman.d/mirrorlist
    ```

    ### Pacman parallel download (/etc/pacman.conf)

    Uncomment this row:

    ```
    ParallelDownloads = 5
    ```

    ### Mirrors

    ```
    # pacman -S reflector
    # reflector --verbose -l 20 -p https --sort rate --save /etc/pacman.d/mirrorlist
    pacman -Syyu
    ```

    ### Xorg / Autostart WM

    ```
    # pacman -S xorg-server xorg-xset xorg-xrandr sx awesome firefox rxvt-unicode ffmpeg
    ```

    _[sx](https://github.com/Earnestly/sx) - minimal starx alternative_

    Create `$HOME/.config/sx/sxrc` file, make it executable - `chmod +x sxrc`, and add WM exec:

    ```
    $ echo "exec awesome" > sxrc
    ```

    Put it in your `$HOME/.zprofile` (or `$HOME/.bash_profile`) file:

    ```
    if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]; then
    exec sx
    fi
    ```

    ### Nvidia

    ```
    # pacman -S nvidia nvidia-utils lib32-nvidia-utils opencl-nvidia lib32-opencl-nvidia libxnvctrl
    ```

    And reboot for load header modules.

    ```
    $ reboot
    ```

    #### Fix xorg screen tearing

    Create `/etc/X11/xorg.conf.d/20-nvidia.conf` file and set `ForceCompositionPipeline` for screens:

    ```
    Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "Generic Nvidia Card"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}"
    EndSection
    ```

    #### Fix nvidia sleep

    ```
    # systemctl enable nvidia-suspend.service
    # systemctl enable nvidia-resume.service
    ```

    #### Video hardware acceleration

    ```
    # pacman -S libva-nvidia-driver libva-utils
    ```

    Create `/etc/modprobe.d/nvidia.conf` with this row:

    ```
    options nvidia-drm modeset=1
    ```

    Add to your `$HOME/.zprofile` (`$HOME/.bash_profile`) file:

    ```
    export MOZ_DISABLE_RDD_SANDBOX=1
    export LIBVA_DRIVER_NAME=nvidia
    export NVD_BACKEND=direct
    ```

    Firefox `about:config` :

    `media.ffmpeg.vaapi.enabled` - true

    `media.rdd-ffmpeg.enabled` - true

    `media.av1.enabled` - false

    `gfx.x11-egl.force-enabled` - true

    `widget.dmabuf.force-enabled` - true

    And reboot!

    Check:

    ```
    $ vainfo
    ```

    ### systemd-resolve

    In `/etc/systemd/resolved.conf` uncomment lines and set public or your own dns address:

    ```
    [Resolve]
    DNS=1.1.1.1
    FallbackDNS=1.0.0.1
    Domains=~.
    Cache=yes
    ```

    Link `resolv.conf` stub:

    ```
    # ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
    ```

    Enable systemd service:

    ```
    # systemctl enable --now systemd-resolved.service
    ```

    Check:

    ```
    $ resolvectl status
    ```

    or

    ```
    # pacman -S bind
    $ dig archlinux.org | grep -i "[sS]erver"
    ```

    ### Disks schedulers

    | PCIE Nvme | SATA SSD | SATA HHD |
    | --------- | ----------- | -------- |
    | none | mq-deadline | bfq |

    Create `/etc/udev/rules.d/60-ioschedulers.rules` file:

    ```
    ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="none"
    ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/scheduler}="bfq"
    ```

    and

    ```
    # udevadm trigger
    ```

    Check:

    ```
    $ cat /sys/block/*/queue/scheduler
    ```

    ### Fstrim

    ```
    # pacman -S util-linux
    # systemctl enable --now fstrim.service
    ```

    ### Pipewire

    ```
    # pacman -S pipewire pipewire-pulse wireplumber rtkit pavucontrol
    # systemctl enable --now rtkit-daemon.service
    $ systemctl enable --now --user pipewire.service pipewire-pulse.service wireplumber.service
    ```

    ### CAPS = Escape

    Replacing a useless button with a great location.

    Create `/etc/X11/xorg.conf.d/00-keyboard.conf` :

    ```
    Section "InputClass"
    Identifier "keyboard0"
    MatchIsKeyboard "on"
    Option "XkbModel" "pc105"
    Option "XkbOptions" "grp:caps:escape"
    EndSection
    ```

    ### Keyboard repet rate

    In a same keyboard config file add new row:

    ```
    Section "InputClass"
    Identifier "keyboard0"
    MatchIsKeyboard "on"
    ----> Option "AutoRepeat" "200 30" <----
    Option "XkbModel" "pc105"
    Option "XkbOptions" "grp:caps:escape"
    EndSection
    ```

    ### Disable mouse acceleration

    Create `/etc/X11/xorg.conf.d/50-mouse.conf` :

    ```
    Section "InputClass"
    Identifier "Generic Mouse"
    Driver "libinput"
    MatchIsPointer "yes"
    Option "AccelProfile" "flat"
    EndSection
    ```

    ### Another useful package

    ```
    # pacman -S ttf-ibm-plex curl mpv zathura imv bat eza git-delta ripgrep bottom duf transmission-cli yt-dlp restic redshift ttf-nerd-fonts-symbols-common ttf-nerd-fonts-symbols-mono
    ```
  18. withnix revised this gist Mar 31, 2024. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions my-arch-install.md
    Original file line number Diff line number Diff line change
    @@ -450,6 +450,20 @@ Section "InputClass"
    EndSection
    ```

    ### Keyboard repet rate

    In a same keyboard config file add new row:

    ```
    Section "InputClass"
    Identifier "keyboard0"
    MatchIsKeyboard "on"
    ----> Option "AutoRepeat" "200 30" <----
    Option "XkbModel" "pc105"
    Option "XkbOptions" "grp:caps:escape"
    EndSection
    ```

    ### Disable mouse acceleration

    Create `/etc/X11/xorg.conf.d/50-mouse.conf` :
  19. withnix revised this gist Mar 26, 2024. 1 changed file with 42 additions and 7 deletions.
    49 changes: 42 additions & 7 deletions my-arch-install.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ## ISO

    Official image >>> [Here](https://archlinux.org/download)
    [Official image](https://archlinux.org/download)

    ### Create a USB drive

    @@ -220,7 +220,7 @@ ln -s $(which doas) /usr/bin/sudo
    ## Reboot

    ```
    unmount -a && reboot
    exit && unmount -a && reboot
    ```

    ## After install
    @@ -358,13 +358,48 @@ Check:
    $ vainfo
    ```

    ### Disks schedulers
    ### systemd-resolve

    In `/etc/systemd/resolved.conf` uncomment lines and set public or your own dns address:

    ```
    [Resolve]
    DNS=1.1.1.1
    FallbackDNS=1.0.0.1
    Domains=~.
    Cache=yes
    ```

    Link `resolv.conf` stub:

    ```
    # ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
    ```

    Enable systemd service:

    ```
    # systemctl enable --now systemd-resolved.service
    ```

    Check:

    _**PCIE Nvme - none**_
    ```
    $ resolvectl status
    ```

    _**SATA SSD - mq-deadline (By default)**_
    or

    ```
    # pacman -S bind
    $ dig archlinux.org | grep -i "[sS]erver"
    ```

    ### Disks schedulers

    _**SATA HHD - bfq**_
    | PCIE Nvme | SATA SSD | SATA HHD |
    | --------- | ----------- | -------- |
    | none | mq-deadline | bfq |

    Create `/etc/udev/rules.d/60-ioschedulers.rules` file:

    @@ -431,5 +466,5 @@ EndSection
    ### Another useful package

    ```
    # pacman -S ttf-ibm-plex curl mpv zathura imv bat eza git-delta bottom duf transmission-cli yt-dlp restic redshift
    # pacman -S ttf-ibm-plex curl mpv zathura imv bat eza git-delta ripgrep bottom duf transmission-cli yt-dlp restic redshift ttf-nerd-fonts-symbols-common ttf-nerd-fonts-symbols-mono
    ```
  20. withnix revised this gist Mar 25, 2024. 1 changed file with 100 additions and 13 deletions.
    113 changes: 100 additions & 13 deletions my-arch-install.md
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,10 @@ I use LAN connection. Check:
    ip link
    ```

    ```
    ping -c3 archlinux.org
    ```

    Check data-time sync:

    ```
    @@ -221,6 +225,13 @@ unmount -a && reboot

    ## After install

    ### TTY font

    ```
    # pacman -S terminus-font
    # echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf
    ```

    ### Multilib (/etc/pacman.conf)

    To enable multilib (32-bit) repositiries uncomment this rows:
    @@ -241,23 +252,23 @@ ParallelDownloads = 5
    ### Mirrors

    ```
    pacman -S reflector
    reflector --verbose -l 20 -p https --sort rate --save /etc/pacman.d/mirrorlist
    # pacman -S reflector
    # reflector --verbose -l 20 -p https --sort rate --save /etc/pacman.d/mirrorlist
    pacman -Syyu
    ```

    ### Xorg / Autostart WM

    ```
    pacman -S xorg-server xorg-xset xorg-xrandr sx awesome firefox rxvt-unicode ffmpeg
    # pacman -S xorg-server xorg-xset xorg-xrandr sx awesome firefox rxvt-unicode ffmpeg
    ```

    _[sx](https://github.com/Earnestly/sx) - minimal starx alternative_

    Create `$HOME/.config/sx/sxrc` file, make it executable - `chmod +x sxrc`, and add WM exec:

    ```
    echo "exec awesome" > sxrc
    $ echo "exec awesome" > sxrc
    ```

    Put it in your `$HOME/.zprofile` (or `$HOME/.bash_profile`) file:
    @@ -271,20 +282,27 @@ fi
    ### Nvidia

    ```
    pacman -S nvidia nvidia-utils lib32-nvidia-utils opencl-nvidia lib32-opencl-nvidia libxnvctrl
    # pacman -S nvidia nvidia-utils lib32-nvidia-utils opencl-nvidia lib32-opencl-nvidia libxnvctrl
    ```

    And reboot for load header modules.

    ```
    reboot
    $ reboot
    ```

    #### Fix xorg screen tearing

    Create `/etc/X11/xorg.conf.d/20-nvidia.conf` file and set `ForceCompositionPipeline` for screens:

    ```
    Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "Generic Nvidia Card"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    @@ -296,14 +314,14 @@ EndSection
    #### Fix nvidia sleep

    ```
    systemctl enable nvidia-suspend.service
    systemctl enable nvidia-resume.service
    # systemctl enable nvidia-suspend.service
    # systemctl enable nvidia-resume.service
    ```

    #### Video hardware acceleration

    ```
    pacman -S libva-nvidia-driver libva-utils
    # pacman -S libva-nvidia-driver libva-utils
    ```

    Create `/etc/modprobe.d/nvidia.conf` with this row:
    @@ -320,7 +338,7 @@ export LIBVA_DRIVER_NAME=nvidia
    export NVD_BACKEND=direct
    ```

    Firefox `about:config`
    Firefox `about:config` :

    `media.ffmpeg.vaapi.enabled` - true

    @@ -337,12 +355,81 @@ And reboot!
    Check:

    ```
    vainfo
    $ vainfo
    ```

    ### Disks schedulers

    _**PCIE Nvme - none**_

    _**SATA SSD - mq-deadline (By default)**_

    _**SATA HHD - bfq**_

    Create `/etc/udev/rules.d/60-ioschedulers.rules` file:

    ```
    ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="none"
    ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/scheduler}="bfq"
    ```

    and

    ```
    # udevadm trigger
    ```

    Check:

    ```
    $ cat /sys/block/*/queue/scheduler
    ```

    ### Fstrim

    ```
    pacman -S util-linux
    systemctl enable --now fstrim.service
    # pacman -S util-linux
    # systemctl enable --now fstrim.service
    ```

    ### Pipewire

    ```
    # pacman -S pipewire pipewire-pulse wireplumber rtkit pavucontrol
    # systemctl enable --now rtkit-daemon.service
    $ systemctl enable --now --user pipewire.service pipewire-pulse.service wireplumber.service
    ```

    ### CAPS = Escape

    Replacing a useless button with a great location.

    Create `/etc/X11/xorg.conf.d/00-keyboard.conf` :

    ```
    Section "InputClass"
    Identifier "keyboard0"
    MatchIsKeyboard "on"
    Option "XkbModel" "pc105"
    Option "XkbOptions" "grp:caps:escape"
    EndSection
    ```

    ### Disable mouse acceleration

    Create `/etc/X11/xorg.conf.d/50-mouse.conf` :

    ```
    Section "InputClass"
    Identifier "Generic Mouse"
    Driver "libinput"
    MatchIsPointer "yes"
    Option "AccelProfile" "flat"
    EndSection
    ```

    ### Another useful package

    ```
    # pacman -S ttf-ibm-plex curl mpv zathura imv bat eza git-delta bottom duf transmission-cli yt-dlp restic redshift
    ```
  21. withnix revised this gist Mar 21, 2024. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion my-arch-install.md
    Original file line number Diff line number Diff line change
    @@ -161,6 +161,15 @@ initrd /intel-ucode.img
    initrd /initramfs-linux.img
    options root=UUID=<UUID> rw rootfstype=ext4 loglevel=3
    ```
    #### Optional kernel options

    `nowatchdog` - Dont need on desktop system.

    `page_alloc.shuffle=1` - Improve RAM performance. [Details](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e900a918b0984ec8f2eb150b8477a47b75d17692)

    `libahci.ignore_sss=1` - Disable [staggered spin-up](https://en.wikipedia.org/wiki/Spin-up#Staggered_spin-up). Speedup boot.

    `raid=noautodetect` - I dont use raid, this option disable autodetect in start. Speedup boot.

    ### /boot/loader/entries/arch-fallback.conf

    @@ -300,7 +309,7 @@ pacman -S libva-nvidia-driver libva-utils
    Create `/etc/modprobe.d/nvidia.conf` with this row:

    ```
    options nvidia-drm modeset=1 fbdev=1
    options nvidia-drm modeset=1
    ```

    Add to your `$HOME/.zprofile` (`$HOME/.bash_profile`) file:
  22. withnix created this gist Mar 4, 2024.
    339 changes: 339 additions & 0 deletions my-arch-install.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,339 @@
    ## ISO

    Official image >>> [Here](https://archlinux.org/download)

    ### Create a USB drive

    [Rufus](https://rufus.ie/en) / [Ventoy](https://www.ventoy.net/en/download.html)

    or from command line:

    ```
    dd if=archlinux.iso of=/dev/sdX bs=4M status=progress oflag=sync
    ```

    ## Network

    I use LAN connection. Check:

    ```
    ip link
    ```

    Check data-time sync:

    ```
    timedatectl
    ```

    ## Partitions

    ```
    fdisk /dev/nvme0n1
    ```

    ```
    1 512MB - /dev/nvme0n1p1 EFI partition
    2 75-80GB - /dev/nvme0n1p2 root partition
    3 remaining - /dev/nvme0n1p3 home partition
    ```

    Check new partition:

    ```
    lsblk
    ```

    ### Formating partition table

    ```
    mkfs.fat -F32 /dev/nvme0n1p1
    ```

    ```
    mkfs.ext4 /dev/nvme0n1p2 && mkfs.ext4 /dev/nvme0n1p3
    ```

    ## Mount new system partition

    ```
    mount /dev/nvme0n1p2 /mnt
    mount --mkdir /dev/nvme0n1p1 /mnt/boot
    mount --mkdir /dev/nvme0n1p3 /mnt/home
    ```

    ## System installation

    ```
    pacstrap /mnt linux linux-headers linux-firmware mkinitcpio base base-devel efibootmgr zsh neovim doas tmux intel-ucode
    ```

    ## Generate fstab

    ```
    genfstab -U /mnt >> /mnt/etc/fstab
    ```

    ## Chroot

    ```
    arch-chroot /mnt /bin/zsh
    ```

    ## Clock

    ```
    ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime
    hwclock --systohc --utc
    ```

    ## Locale

    Uncomment selected row on `/etc/locale.gen` file:

    ```
    170 #en_SG ISO-8859-1
    171 en_US.UTF-8 UTF-8
    172 #en_US ISO-8859-1
    ```

    Generate locale:

    ```
    locale-gen
    ```

    Create `locale.conf` file:

    ```
    echo "LANG=en_US.UTF-8" >> /etc/locale.conf
    ```

    ## Hostname

    ```
    echo "localhost" >> /etc/hostname
    ```

    ### Hosts

    ```
    127.0.0.1 localhost
    ::1 localhost
    127.0.1.1 localhost.localdomain localhost
    ```

    ## Root password

    ```
    passwd
    ```

    ## Generate system image

    ```
    mkinitcpio -P
    ```

    ## Systemd-boot

    ```
    bootctl --path=/boot install
    ```

    ### /boot/loader/loader.conf

    ```
    default arch.conf
    timeout 0
    console-mode auto
    editor no
    ```

    ### /boot/loader/entries/arch.conf

    `<UUID>` - `blkid`

    ```
    title Arch Linux
    linux /vmlinuz-linux
    initrd /intel-ucode.img
    initrd /initramfs-linux.img
    options root=UUID=<UUID> rw rootfstype=ext4 loglevel=3
    ```

    ### /boot/loader/entries/arch-fallback.conf

    *Fallback image (Optional)*

    ```
    title Arch Linux (fallback initramfs)
    linux /vmlinuz-linux
    initrd /intel-ucode.img
    initrd /initramfs-linux-fallback.img
    options root=UUID=<UUID> rw
    ```

    ### /etc/fstab

    systemd-boot require specific mask for partition. Add `fmask=0137` and `dmask=0027` to fstab:

    ```
    # /dev/nvme0n1p1
    UUID=<UUID> /boot vfat rw,relatime,fmask=0137,dmask=0027,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
    ```

    ## Create user

    ```
    useradd -mG wheel -s /bin/zsh <NAME>
    passwd <NAME>
    ```

    ### /etc/doas.conf

    Allow `whell` group use doas:

    ```
    permit :whell
    ```

    And create symlink to sudo:

    ```
    ln -s $(which doas) /usr/bin/sudo
    ```

    ## Reboot

    ```
    unmount -a && reboot
    ```

    ## After install

    ### Multilib (/etc/pacman.conf)

    To enable multilib (32-bit) repositiries uncomment this rows:

    ```
    [multilib]
    Include = /etc/pacman.d/mirrorlist
    ```

    ### Pacman parallel download (/etc/pacman.conf)

    Uncomment this row:

    ```
    ParallelDownloads = 5
    ```

    ### Mirrors

    ```
    pacman -S reflector
    reflector --verbose -l 20 -p https --sort rate --save /etc/pacman.d/mirrorlist
    pacman -Syyu
    ```

    ### Xorg / Autostart WM

    ```
    pacman -S xorg-server xorg-xset xorg-xrandr sx awesome firefox rxvt-unicode ffmpeg
    ```

    _[sx](https://github.com/Earnestly/sx) - minimal starx alternative_

    Create `$HOME/.config/sx/sxrc` file, make it executable - `chmod +x sxrc`, and add WM exec:

    ```
    echo "exec awesome" > sxrc
    ```

    Put it in your `$HOME/.zprofile` (or `$HOME/.bash_profile`) file:

    ```
    if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]; then
    exec sx
    fi
    ```

    ### Nvidia

    ```
    pacman -S nvidia nvidia-utils lib32-nvidia-utils opencl-nvidia lib32-opencl-nvidia libxnvctrl
    ```

    And reboot for load header modules.

    ```
    reboot
    ```

    #### Fix xorg screen tearing

    Create `/etc/X11/xorg.conf.d/20-nvidia.conf` file and set `ForceCompositionPipeline` for screens:

    ```
    Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}"
    EndSection
    ```

    #### Fix nvidia sleep

    ```
    systemctl enable nvidia-suspend.service
    systemctl enable nvidia-resume.service
    ```

    #### Video hardware acceleration

    ```
    pacman -S libva-nvidia-driver libva-utils
    ```

    Create `/etc/modprobe.d/nvidia.conf` with this row:

    ```
    options nvidia-drm modeset=1 fbdev=1
    ```

    Add to your `$HOME/.zprofile` (`$HOME/.bash_profile`) file:

    ```
    export MOZ_DISABLE_RDD_SANDBOX=1
    export LIBVA_DRIVER_NAME=nvidia
    export NVD_BACKEND=direct
    ```

    Firefox `about:config`

    `media.ffmpeg.vaapi.enabled` - true

    `media.rdd-ffmpeg.enabled` - true

    `media.av1.enabled` - false

    `gfx.x11-egl.force-enabled` - true

    `widget.dmabuf.force-enabled` - true

    And reboot!

    Check:

    ```
    vainfo
    ```

    ### Fstrim

    ```
    pacman -S util-linux
    systemctl enable --now fstrim.service
    ```