Installation & Setup

Complete guide to installing NEJEN on Arch Linux, installer internals, first-run initialization, health checks, and rollback safety.

Updated Oct 3, 2026·4 min read
Source

NEJEN configures an entire Arch Linux desktop environment, including the display manager, compositor, status bars, terminal, and system daemons. This guide covers hardware requirements, the automated installation process, health diagnostics, and rollback procedures.


Prerequisites

Before starting, ensure your system meets the following requirements:

1. Operating System

  • Arch Linux (or an Arch-based distribution utilizing pacman).
  • A clean, freshly installed base system is recommended, though NEJEN can be installed alongside existing environments.

2. Base Toolchain

The installer requires git, go, and base-devel.

[!IMPORTANT] go is a standing requirement, not merely a one-time build dependency. When you run nejen update, the system recompiles the nejen binary to incorporate new commands and upstream changes.

Install the bootstrap tools using pacman:

sudo pacman -S --needed git go base-devel

3. AUR Helper

NEJEN pulls several essential Wayland tools from the Arch User Repository (AUR), including walker and elephant.

  • If paru or yay is detected on your $PATH, the installer uses it automatically.
  • If neither is present, the installer automatically clones and builds paru from the AUR before proceeding.

Step-by-Step Installation

Clone the repository to its canonical location under ~/.local/share/nejen and execute the installer:

git clone https://github.com/negensystems/nejen.git ~/.local/share/nejen
cd ~/.local/share/nejen
./install.sh

What the Installer Does

  1. Package Provisioning: Reads packages/core.txt and installs all missing packages via pacman and paru/yay.
  2. Binary Compilation: Compiles cmd/nejen into a statically linked binary (CGO_ENABLED=0) and symlinks it to ~/.local/bin/nejen.
  3. Shell Completions: Generates and links bash tab-completion into ~/.local/share/bash-completion/completions/nejen.
  4. Configuration Generation: Generates native configuration files for Hyprland, Waybar, Alacritty, SwayOSD, Mako, btop, and bluetuith.
  5. Directory Symlinking: Symlinks managed configurations for fastfetch, walker, nvim, and uwsm into ~/.config/.
  6. Font Installation: Installs the custom NegenIcons.ttf typeface into ~/.local/share/fonts/ and triggers fc-cache.
  7. Battery Monitor: Enables a background systemd user timer (nejen-battery-monitor.timer) on laptops to warn of critical discharge states.
  8. Shell Integration: Adds a clean source line to ~/.bashrc to load NEJEN environment variables and aliases.

The Backup Safety Guarantee

Any file the installer would overwrite that NEJEN did not generate is automatically preserved as:

<filename>.pre-nejen.bak

If you already have customized Hyprland or Waybar files, they will never be destroyed without a backup.

Tip: Pass --no-packages to skip the pacman/AUR package check if you have already installed the required software.


First-Run System Initialization

install.sh acts as a thin shim that delegates to Go. Once the desktop packages are in place, the installer invokes first-run system scripts in install/first-run/:

Network & Time Sync

  • Time Synchronization (time-sync.sh): Enables and starts systemd-timesyncd, ensuring the hardware RTC stays synchronized over NTP. Points /etc/resolv.conf to systemd-resolved.
  • Wi-Fi Onboarding (wifi.sh): Ensures NetworkManager is active and prompts to connect to nearby wireless networks if offline.

Plymouth Boot Splash

The installer configures the custom Plymouth theme (config/plymouth/nejen/):

  • Displays the NEJEN block mark with a thin progress line under it during startup.
  • On encrypted systems with LUKS, the progress line gives way to a compact passphrase field, with cryptsetup's own prompt shown verbatim above it, so you can see which disk is asking.

Booting

The NEJEN boot splash: the block wordmark above a progress line

Disk passphrase

The boot splash asking for the disk passphrase: the prompt above a small field with five dots

Verifying Setup: nejen doctor

Once installation completes, log out of your current session and start a Hyprland session from your display manager (SDDM/GDM) or TTY.

Open a terminal (Super+Return) and run the system diagnostics suite:

nejen doctor

On a healthy install it prints one line per check and a summary:

PASS  NEJEN_PATH resolves: /home/you/.local/share/nejen
PASS  NEJEN_PATH contains config/
PASS  NEJEN_PATH contains templates/
PASS  NEJEN_PATH contains themes/
PASS  dispatcher built: /home/you/.local/share/nejen/bin/nejen
PASS  required commands present: bash git hyprctl notify-send
PASS  optional commands all present
PASS  system clock synchronized over NTP

nejen doctor: 8 passed, 0 warnings, 0 failed

Doctor in the hub runs the same check in its own terminal window.

Health Check Matrix

nejen doctor verifies every tier of the workstation:

  1. Dispatcher Health: Validates that ~/.local/bin/nejen is present and prioritized on $PATH.
  2. Core Dependencies: Verifies essential system utilities (bash, git, hyprctl, notify-send).
  3. Desktop Utilities: Checks optional components (walker, uwsm, makoctl, swayosd-client, slurp, grim, satty, hyprpicker, gpu-screen-recorder, wl-copy, elephant, bluetuith, hyprlock, hypridle, hyprsunset, btop, swaybg).
  4. Time & NTP Status: Queries timedatectl to confirm that the system clock is synchronized and free from clock drift.

Maintenance & Updates

Upgrading NEJEN is handled through a single command:

nejen update

This automates four tasks:

  1. Pulls the latest commits from the upstream git repository.
  2. Re-compiles bin/nejen using the current Go toolchain.
  3. Upgrades installed Arch Linux and AUR packages (pacman -Syu).
  4. Re-renders active theme templates to ensure any new style rules apply immediately.

Uninstallation & Clean Rollback

NEJEN does not scatter unmanaged files across your filesystem. To completely remove NEJEN and restore previous dotfiles:

# 1. Remove binary and bash completions
rm -f ~/.local/bin/nejen ~/.local/share/bash-completion/completions/nejen

# 2. Remove state and runtime directories
rm -rf ~/.local/share/nejen ~/.local/state/nejen ~/.config/nejen

# 3. Clean up managed config links
rm -rf ~/.config/fastfetch ~/.config/walker ~/.config/nvim ~/.config/uwsm

# 4. Remove generated application configs
rm -f ~/.config/hypr/hyprland.conf ~/.config/waybar/style.css

Finally:

  • Remove the source block from the bottom of your ~/.bashrc.
  • Restore any original configuration files from their <file>.pre-nejen.bak copies.
  • If desired, remove unneeded packages using sudo pacman -Rns <package-names>.