Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bernardassan/archsway

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,108 Commits
1,108 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArchSway

Archlinux on river/sway from scratch with the most minimal dependencies. DIY is awesome

Standard Installation Steps

Arch Linux Installation Guide

Filesystem Setup

  • ESP /efi should be 2GiB if you plan on installing efi applications like arch rescue else 512MiB otherwise
  • ROOT should be a (xfs for hdd | f2fs for nvme) with a size of 30GiB - 60GiB
  • HOME & FILES (btrfs | ext4) partition with HOME between 60-120GiB and FILES of arbitrary size for multimedia content
  • ROOT is mounted on / with the dedicated HOME &| FILES subvolume | partition mounted to /home and /home/${username}/files repectively.
  • Setup zram 3x RAM size to allow running more memory hungry tasks .eg compiling llvm, clang, clang-tools, lldb.
  • Use a ZRAM backing device equal to RAM size 12GiB and a swap partition for hibernation also of size equal to RAM 12Gib

NOTE:

  • make sure to create and mount Btrfs with Zstd compression on first mount during installation
  • format & mount all drives with a logical sector or block size of 4096

needed base system modules

  • Configure mkinitcpio linux-zen.preset to generate a efi uki image
  • Use /efi as ESP partition and set systemd-boot loader.conf to your efi uki (unified kernel image) image
  • Extend mkinitcpio image generation with zstd compression and add kernel cmdline parameters
  • Enable systemd-boot as boot manager (bootctl install)
  • Enable iwd, systemd-networkd, systemd-resolved system services
  • Enabling systemd-boot-update service to update systemd-boot on systemd upgrade
  • river/sway as window manager with swayidle and waylock for idle and lock management and levee/yambar for bar management
    • base
    • xfsprogs | f2fs-tools | btrfs-progs | dosfstools | exfatprogs
    • intel-ucode microcode
    • iwd for wifi
    • ghostty/kitty/foot terminal
    • Install only needed linux-firmware, check firmwares you might need with lspci and use dynamic debug to know more details about the exact firmwares loaded at kernel startup
    • linux-zen
    • intel-media-driver for hardware video acceleration
    • polkit for seat and privileged access management
    • man-db and man-pages and enable man-db.timer service
    • Set up GPG with SSH authentication enabled
    • helix/neovim for config clone awesome-helix to $XDG_CONFIG_HOME/helix or awesome-neovim to $XDG_CONFIG_HOME/nvim
    • sudo
    • elvish/fish (set default shell with chsh -s $(which shellname))

basic configuration

  • iwd for wifi and enable its builtin dhcp client
  • symlink /run/systemd/resolve/stub-resolv.conf to /etc/resolv.conf for DNS resolution
  • setup reflector for choosing the fastest Pacman mirror list
  • Configure network using systemd-networkd and systemd-resolved
  • Setup vconsole terminal fonts
  • On the freshly installed system, use the following fonts
    • use fonts with great unicode support, like ttf-dejavu or noto-fonts as the system default font
    • ttf-jetbrains-mono or ttc-iosevka for monospace,
    • ttf-nerd-fonts-symbols-mono for nerd font symbols and noto-font-emoji for emoji

    NOTE: don't forget to ln -s /usr/share/fontconfig/conf.avail/10-nerd-font-symbols.conf /etc/fonts/conf.d/

  • configure Intel_graphics hardware acceleration
  • setup laptop, zram, disk, network and power management options using udev rules, sysctl and modprobe config
  • Configure hibernation by adding resume kernel parameter, resume hook to mkinitcpio, and rebuilding kernel
  • Enable Active State Power Management if supported and add or remove powersave > /sys/module/pcie_aspm/parameters/policy from udev powersave rules based on the results
  • Configure sudo for current user using sudo -E visudo -sf /etc/sudoers.d/${username}. Example sudoers file
  • Configure logind, journald and sleep
  • For extra Performance Improvements
  • For pacman, enable the following options under the option section in /etc/pacman.conf
[options]
Color
CheckSpace
VerbosePkgLists
ParallelDownloads = 5
  • Set up makepkg.conf and Increase /tmp tmpfs size to 90% of RAM by copying and changing the Options field of Mount from the default size of 50% to 90% in the drop-in config file. This helps to prevent OOM when compiling clang on /tmp sudo -E systemctl edit tmp.mount --drop-in=hugetmp.mount
[Mount]
Options=
Options=mode=1777,strictatime,nosuid,nodev,size=90%%,nr_inodes=1m

NOTE: This is to be used in conjunction with zram

INSTALLS

  • base-devel for Basic c/c++ build tools to build Arch Linux packages
  • mold as linker for C, Rust and C++
  • lldb/gdb for debugging Zig, C, and C++
  • clang/gcc for C++ development with clangd
  • zig with zls for zig development
  • rustup with default profile and rust-analyzer component for Rust development
  • luajit for lua development
  • iptables-nft and nftable(automatically installed as a dependency of iptables-nft) for firewall configuration (enable the nftables service)
  • nmap and tcpdump for network analysis and auditing
  • yay for AUR package management
  • android-file-transfer with libmtp for connecting Android phones mtp management
  • aria2 as download manager
  • bat is a Cat clone with syntax highlighting and git integration
  • bluez and bluez-utils for Bluetooth
  • brightnessctl for controlling backlight
  • carapace-bin for completions in elvish
  • fzf for fuzzy search
  • vivid for LS_COLORS
  • starship for prompt
  • Helix and Neovim awesomely set up with the relevant LSPs and static analyzers for Zig, C, Rust, C++, Luajit, Python, Shell, and Web-Development.
  • dictd server with dict client and some dictionary sources for yay like dict-wikt-en-all, dict-freedict-eng-spa, dict-freedict-spa-eng, dict-foldoc, dict-gcide, dict-wn.
    • NOTE: to disable online mode, comment out server dict.org in /etc/dict/dict.conf
    • Make sure locale is properly configured in DICTD_ARGS of /etc/conf.d/dictd else, the service unit will fail
    • Since dict uses en_US.UTF-8 by default, make sure to comment it out in /etc/locale.gen and compile it along side your locale of choice es_MX.UTF-8
  • ffmpegthumbnailer & gnome-epub-thumbnailer for thumbnails
  • firefox with speech-dispatcher (for Text-to-Speech) as pdf reader or zathura and firefox-ublock-origin as adblocker and foliate/fbreader as epub reader
  • wlsunset for controlling screen blue light
  • git for version control
  • grim and slurp for screenshot
  • mako as a lightweight notification daemon for Wayland
  • docker for containerization of apps
  • scrcpy for mirroring android device (with adb for copying to Android)
  • libreoffice-fresh for working with openoffice documents and hunspell-en_us for spellcheck, for help setting up spellcheck
  • mpd for music daemon, ncmpcpp for ui interface, and mpc for controlling playing
  • mpv as multimedia player
  • sound-theme-freedesktop for standard sounds and tones used in Linux
  • pipewire and pipewire-audio for audio/video routing and processing, pipewire-pulse as pulseaudio replacement and WirePlumber as pipewire session manager
  • lf as file manager
  • fastfetch for displaying system information
  • openssh and rsync for syncing files with a remote over ssh
  • remmina as remote desktop client with a plugin like freerdp|libvncserver
  • usb_modeswitch for enabling modem mode for zero-cd based modems
  • wl-clipboard for wayland clipboard
  • batsignal for battery status notifications
  • kanshi for wayland output management
  • fuzzel as the application launcher
  • cliphist as clipboard history manager
  • qt5-wayland for runing qt5 apps under wayland
  • xdg-desktop-portal-wrl for WebRTC screen sharing
  • xdg-utils to assist applications with desktop integration tasks
  • yt-dlp YouTube downloader
  • zoxide for efficient directory movement

Configuring Firefox

OPTIONAL

  • configure /etc/motd with the Message Of The Day Eg. WELCOME MASTER MALPHA! WE ARE READY TO SERVE YOU!!!
  • Checkout Archlinux General Recommendation
  • enable DNSOverTLS for resolved
  • Enable synchronizing the system clock across the network by enabling systemd-timesyncd.service
  • Disable journaling to persistent storage by setting Storage in journal.conf to volatile and masking systemd-journal-flush.service
  • link kitty to xterm
  • Enable DNS over HTTPS in Firefox
  • modify relector configuration in /etc/xdg/reflector/reflector.conf to sort based on download rate with --sort rate

WSL

  • Install ArchLinux WSL on Windows 11 using wsl --install archlinux. After installing, follow these instructions to set up Arch Linux on WSL 2.
  • Download and install a Nerd Font of your choosing, like IosevkaTerm and use it as your default font face for Windows Terminal, and change color scheme to one half dark
  • Install starship winget install -e --id Starship.Starship and add Invoke-Expression (&starship init powershell) to your $PROFILE as in Microsoft.PowerShell_profile
  • Run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser in PowerShell to enable running of scripts
  • Create a non-root user useradd -m username and set a password for root with passwd root and your new user with passwd username
  • Set the default wsl user with wsl --manage archlinux --set-default-user username
  • Add him to the wheel group usermod -aG wheel username -s /bin/elvish
  • Configure sudoers file at /etc/sudoers.d/username
  • To set a different host name, disable hostname generation, and set a static hostname in wsl.conf
  • Clone this repo to ~/.config/dotfiles with mkdir -p ~/.config ; cd ~/.config ; git clone https://github.com/bernardassan/archsway.git dotfiles and symlink ~/.config/dotfiles/config/elvish to ~/.config/elvish .ie ln -s ~/.config/dotfiles/config/elvish ~/.config/elvish to activate the elvish shell configuration
  • Configure pacman with pacman.d/pacman.conf and disable/comment out NoProgressBar if it is enabled in your /etc/pacman.conf
  • Configure makepkg so that fetching git repos is efficient and compilations are optimized, and well-compressed, while debug builds aren't generated
  • Install yay for AUR management with mkdir ~/.aur ; cd ~/.aur ; sudo pacman -S --needed git base-devel ; git clone https://aur.archlinux.org/yay-bin.git ; cd yay-bin ; makepkg -si
  • Setup locale as appropriate
  • Install essential utilities like xdg-utils, man-db, man-pages, carapace-bin, openssh, bat, and fzf.

Using a custom build WSL kernel

  • To compile the WSL kernel, you need base-devel, bc, cpio, pahole, python, and rsync.
  • Then set swap=32GB in .wslconfig to ensure you can compile the kernel without running out of memory
  • Run zcat /proc/config.gz | /bin/sed '/is not set/d' > .config to get a copy of all the set config used by the current WSL kernel
  • Run env KCONFIG_CONFIG=Microsoft/config-wsl ./scripts/kconfig/merge_config.sh .config to merge .config with Microsoft/config-wsl, overriding options in Microsoft/config-wsl.
  • Then env KCONFIG_CONFIG=Microsoft/config-wsl make olddefconfig or env KCONFIG_CONFIG=Microsoft/config-wsl make oldconfig to use default values for new kernel configs not in $E:KCONFIG_CONFIG.
  • ensure CONFIG_TUN=y and CONFIG_TAP=y are set in Microsoft/config-wsl to enable userspace networking used by podman and VPNs
  • Use mold set-env LD mold to link faster, this reduced the whole compile/link phase from about 1hr30min to 30min for me
  • follow instructions at updating wsl kernel
  • At the end, you should have a .wslconfig like mine

TERMUX

About

Archlinux on river/sway from scratch with the most minimal dependencies. DIY is awesome

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.