Skip to content

Aapok0/linux-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Setup

Scripts to set up my preferred environment on Arch, Debian, or Fedora based distributions.

What it does

The setup script detects (or accepts as argument) whether the system is Arch, Debian, or Fedora based, then:

  1. Updates system packages
  2. Checks for existing firewalls and installs/enables ufw if none found
  3. Creates ~/Workspace and clones dotfiles (converted to SSH remote)
  4. Runs dotfiles justfile (just install) which handles core tools, shell setup (ZSH, plugins, starship), font installation, stowing configs, and more
  5. Installs additional packages not covered by the justfile (see vars/)
  6. Prompts for git user configuration (~/.config/git/config.local)
  7. Installs KDE Plasma packages, apps, and gaming packages
  8. Installs Cursor IDE (official repo on Fedora/Debian; cursor-bin AUR on Arch)
  9. Sets up NordVPN with systemd-resolved
  10. Registers Steam Tinker Launch as a Steam compatibility tool

Arch-specific: Enables multilib, installs paru (AUR helper), configures btrfs Snapper rollback (when root is btrfs). Desktop apps from AUR include cursor-bin (official .deb-based Cursor build).

Debian-specific: Installs nala and apt tools, ghostty via debian.griffo.io, Cursor via official APT repo, pyenv/nvm manually (no AUR), adds NordVPN repo.

Fedora-specific: Enables RPM Fusion, installs packages from dnf_*, rpmfusion_*, and flatpak_* groups in vars/fedora-vars, configures btrfs Snapper (when root is btrfs), ghostty via COPR scottames/ghostty, Firefox Wayland (MOZ_ENABLE_WAYLAND=1), Cursor via official DNF repo, system-scope Flatpak installs, pyenv/nvm manually, adds NordVPN repo. Skips power-profiles-daemon when tuned-ppd is installed.

Setup scripts record errors in a counter (SETUP_ERRORS) and exit non-zero at the end if any step failed; interactive prompts are not aborted by set -e.

Setup scripts are safe to re-run: package installs skip already-installed packages, and shared helpers in scripts/lib/common.sh guard groups, systemd units, multilib, and pip user installs. System upgrades (paru -Syu, apt upgrade, dnf upgrade) still run each time.

Output is logged to logs/<timestamp>_setup.log (absolute path under repo root).

Logging: All scripts source scripts/lib/common.sh for shared logging (INFO, OUT, WARN, ERROR, RUN levels with timestamps). Logs are written to logs/ via tee regardless of current working directory.

Repository structure

├── setup                       # Entry point — post-install setup (detects distro)
├── install                     # Entry point — Arch install / reinstall / backup
├── scripts/
│   ├── lib/
│   │   ├── common.sh           # Shared logging and setup helpers
│   │   └── install.sh          # Shared Arch install/reinstall helpers
│   ├── setup-arch              # Full Arch (KDE) setup
│   ├── setup-debian            # Full Debian (KDE) setup
│   ├── setup-fedora            # Full Fedora (KDE) setup
│   ├── setup-arch-i3           # Older i3-based Arch setup (unused)
│   ├── install-arch            # Arch Linux fresh install (live ISO)
│   ├── install-arch-reinstall  # Arch reinstall (preserves /home)
│   └── install-arch-backup     # Arch reinstall config backup (live system)
├── vars/
│   ├── arch-vars               # Package lists for Arch (pacman & paru/AUR)
│   ├── debian-vars             # Package lists for Debian (apt & extras)
│   └── fedora-vars             # Package lists for Fedora (dnf & extras)
├── instructions/
│   ├── install/                # Arch, Debian & Fedora install guides
│   └── post-install/           # App-specific settings & configuration notes
├── apps.md                     # App decision log (done / not done / to investigate)
└── logs/                       # Created at runtime (gitignored)

Prerequisites

  • A working internet connection
  • git available to clone this repo and dotfiles
  • Arch: base-devel installed (needed to build paru)
  • Debian: sudo and apt working
  • Fedora: sudo and dnf working

Pre-setup

Optional: allow passwordless sudo by editing sudoers safely:

sudo visudo
# or with vim:
sudo VISUAL=vim visudo

Add to the end of the file:

your_username ALL=(ALL:ALL) NOPASSWD: ALL

Or uncomment line for wheel group that has NOPASSWD:

%wheel ALL=(ALL) NOPASSWD: ALL

And add your user to wheel group:

sudo usermod -a -G wheel your_username

Usage

  1. Clone this repo and enter the directory.

  2. Make scripts executable, if not already:

chmod u+x setup install scripts/*
  1. Run:
./setup
# or explicitly:
./setup arch
./setup debian
./setup fedora

The script auto-detects the distro from /etc/os-release. Pass arch, debian, or fedora manually if detection fails.

Arch install

Entry point: ./install arch

Fresh install (live ISO, as root):

./install arch

Destroys target disks. Automates instructions/install/arch-install.md: partitioning, optional LUKS encryption, LVM, btrfs subvolumes, pacstrap, boot setup (GRUB/mkinitcpio), localization, user creation, KDE Plasma, and optional reboot.

Reinstall (live ISO, as root):

./install arch --reinstall

Preserves /home, reformats root only, restores boot configs from backup, recreates users, installs KDE Plasma.

Config backup (running system, before rebooting to live ISO):

sudo ./install arch --backup

Copies /etc configs to ~/install/etc/ for reinstall restore (see instructions/install/arch-reinstall.md).

Logs: logs/<timestamp>_install-arch.log, _install-arch-reinstall.log, or _install-arch-backup.log.

Post-setup

These steps are also printed by the script on completion:

  1. Reboot the machine.
  2. Open Ghostty (terminal emulator).
  3. Open Cursor (cursor in app menu or terminal).
  4. If a firewall was already installed, check its rules.
  5. Install nvm and Node.js:
    # Get install command from: https://github.com/nvm-sh/nvm#installing-and-updating
    exec zsh
    nvm install node
  6. Set up Python with pyenv:
    pyenv install -l | less
    pyenv install <version>
    pyenv global <version>
    mkdir -p ~/Python && cd ~/Python
    python -m venv <name>
  7. Open Neovim if you want to verify plugins (just install already syncs Lazy.nvim and Mason tools).
  8. Open tmux and install plugins: tmux then ctrl+space I (TPM runs during just install; reload tmux config if needed).

Unfinished / TODO

  • apps.md — Several apps still marked as not done (app launcher, tiling WM, Docker, RDP, mouse/keyboard tools, etc.).
  • Configurable package selection (interactive options)
  • Clean package caches at the end?

About

Setup a script for arch or debian based linux distributions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages