Skip to content

PavlosMelissinos/dotfiles

Repository files navigation

Personal Dotfiles - Wayland Desktop Environment

A personal dotfiles repository for a modern Linux desktop environment using Sway (Wayland compositor) with declarative package management through home-manager/Nix.

Overview

This repository contains configuration files for a complete Wayland-first desktop environment optimized for development work. All user packages are managed declaratively through home-manager/Nix, providing reproducible environments and simplified maintenance.

Key Features

  • πŸ—οΈ Wayland-first desktop with Sway tiling window manager
  • πŸ“¦ Declarative package management with home-manager/Nix (95+ packages)
  • πŸ” U2F hardware key authentication for system and web services
  • πŸ“ XDG Base Directory compliance for clean home directory organization
  • πŸ”„ Reproducible environments with complete configuration in version control

Architecture

β”Œβ”€ USER SPACE ────────────────────────────────────┐
β”‚  home-manager/Nix (PRIMARY & ONLY)              β”‚
β”‚  β”œβ”€ Development Tools (rust, node, python...)   β”‚
β”‚  β”œβ”€ Desktop Environment (sway, waybar, mako...) β”‚
β”‚  β”œβ”€ Applications (firefox, vlc, steam...)       β”‚
β”‚  β”œβ”€ System Libraries (fonts, certificates...)   β”‚
β”‚  └─ Configuration Management (git, zsh, emacs)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€ SYSTEM SPACE ──────────────────────────────────┐
β”‚  DNF/RPM (System packages only)                 β”‚
β”‚  β”œβ”€ Kernel and drivers                          β”‚
β”‚  β”œβ”€ System services (systemd, etc.)             β”‚
β”‚  β”œβ”€ Core libraries (glibc, etc.)                β”‚
β”‚  └─ Hardware firmware                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€ SANDBOXED ─────────────────────────────────────┐
β”‚  Flatpak (Platform runtimes only)               β”‚
β”‚  β”œβ”€ No user applications installed              β”‚
β”‚  └─ System platform dependencies only           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Fedora-based Linux system (or compatible)
  • Nix package manager installed
  • home-manager configured

Installation

  1. Clone this repository to your home directory
  2. Enable Nix flakes (if not already enabled):
    echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
        
  3. Apply home-manager flake configuration:
    cd ~/.config/home-manager
    home-manager switch --flake .
        
  4. Reload Sway configuration:
    swaymsg reload
        

πŸ“‹ Component Overview

Desktop Environment

ComponentPurposeConfiguration
SwayWayland compositor & tiling WM.config/sway/config
WaybarStatus bar.config/waybar/
WofiApplication launcher.config/wofi/
MakoNotification daemon.config/mako/
SwaylockScreen locker (DISABLED).config/swaylock/ (unused)
KanshiMulti-monitor management.config/kanshi/
GammastepBlue light filterConfigured via home-manager

Development Tools

ToolPurposeConfiguration
EmacsPrimary editor (XDG compliant).config/emacs/init.el
AlacrittyTerminal emulator.config/alacritty/
ZshShell with custom theme.config/zsh/
TmuxTerminal multiplexer.config/tmux/
GitVersion controlManaged via home-manager

Package Management

  • Primary: home-manager/Nix Flakes (ALL user packages - 95+)
  • System: DNF/RPM (kernel, drivers, system services only)
  • Sandboxed: Flatpak (platform runtimes only, no user applications)

πŸ” Security Features

U2F Hardware Key Authentication

Configured for enhanced security across:

  • GDM/GNOME login
  • sudo administrative tasks
  • ~~Swaylock screen unlock~~ (currently disabled due to unlock issues)
  • Web services (GitHub, GitLab, cloud providers)

See ADR-0004 for implementation details.

Supported Services

  • GitHub, GitLab
  • Porkbun, Namecheap (domain management)
  • Bitwarden (password management)
  • AWS and other cloud providers

πŸ“ File Organization

XDG Base Directory Compliance

All applications are configured to respect XDG directories where possible:

  • ~/.config/ - Application configuration
  • ~/.cache/ - Non-essential cached data
  • ~/.local/share/ - Application data files
  • ~/.local/state/ - Application state data

Repository Structure

.
β”œβ”€β”€ .config/              # Application configurations
β”‚   β”œβ”€β”€ home-manager/     # Nix package & config management
β”‚   β”œβ”€β”€ sway/             # Window manager configuration
β”‚   β”œβ”€β”€ waybar/           # Status bar configuration
β”‚   β”œβ”€β”€ emacs/            # Editor configuration
β”‚   └── zsh/              # Shell configuration
β”œβ”€β”€ docs/                 # Documentation & ADRs
β”‚   └── architecture/adr/ # Architecture Decision Records
β”œβ”€β”€ CLAUDE.md             # AI assistant guidance
└── README.org            # This file

πŸ› οΈ Development Workflow

Package Management

# Install new packages: Edit .config/home-manager/home.nix, then:
cd ~/.config/home-manager
home-manager switch --flake .

# Update flake inputs (like package updates):
nix flake update

# Update specific input only:
nix flake lock --update-input nixpkgs

# System updates (base OS only):
sudo dnf upgrade --refresh

# Check package status:
ls ~/.nix-profile/bin/ | wc -l  # Count available binaries

Configuration Updates

# Apply home-manager changes:
cd ~/.config/home-manager
home-manager switch --flake .

# Reload Sway:
swaymsg reload

# Restart Waybar (if needed):
nohup waybar &

Git Workflow

# Commit configuration changes:
git add .config/ docs/
git commit -m "Add feature X to improve Y

Explain why change was needed and context.
Reference ADR-XXX if architectural decision.

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>"

πŸ“š Documentation

Architecture Decision Records (ADRs)

All significant architectural decisions are documented in docs/architecture/adr/:

  • ADR-0000: Record Architecture Decisions
  • ADR-0001: Complete Package Manager Consolidation
  • ADR-0002: Sway Window Manager with Wayland-First Desktop Environment
  • ADR-0003: XDG Base Directory Specification Compliance
  • ADR-0004: U2F Hardware Key Authentication
  • ADR-0005: Line Length and Text Formatting Standards
  • ADR-0006: Trailing Whitespace Policy
  • ADR-0007: Git Commit Message Standards
  • ADR-0008: Viber AppImage Packaging Solution (Superseded)
  • ADR-0009: Complete Guix Package Manager Elimination
  • ADR-0010: Home Manager Flakes Migration
  • ADR-0011: Viber nixGL Integration and Dynamic Icon Extraction

Additional Documentation

  • CLAUDE.md - Guidance for AI assistant sessions
  • Package reports and migration documentation available in root directory

⚠️ Known Issues & Workarounds

Desktop Environment

  • Sleep recovery: Laptop screen may not restore after sleep (Sway limitation)
  • Firefox crashes: Occasional crashes when reloading Sway or returning from sleep
  • Waybar disappears: Restart with nohup waybar & if status bar disappears

Application Limitations

  • Non-XDG applications: Firefox, Thunderbird, Kodi don’t respect XDG directories
  • Legacy compatibility: Some applications may require XWayland for proper operation

Security & Authentication

  • Swaylock disabled: Screen locker disabled due to unlock failures with home-manager/Nix version
  • Alternative: Currently relying on system-level screen locking only
  • Status: Investigating alternative screen lock solutions

Viber Messaging (AppImage)

  • Package status: nixpkgs viber package broken due to libxml2 compatibility (GitHub Issue #421440)
  • Solution: nixGL-wrapped AppImage with dynamic icon extraction
  • Features:
    • βœ… Hardware acceleration via nixGL
    • βœ… Proper font rendering (direct AppImage execution)
    • βœ… Working links (custom xdg-open wrapper for Firefox)
    • βœ… Official Viber icon (dynamically extracted from AppImage)
    • βœ… No binary files stored in git repository
  • Status: Fully functional with excellent user experience

Package Management Status

  • Guix elimination: βœ… Completely eliminated as of 2025-08-06 (ADR-0009)
  • Flakes migration: βœ… Migrated to modern flakes-based workflow (ADR-0010)
  • Status: Clean, unified package management through home-manager/Nix flakes only
  • Reproducibility: All dependencies pinned in flake.lock for consistent builds

Troubleshooting

# Sway IPC socket issues:
export SWAYSOCK=/run/user/$(id -u)/sway-ipc.$(id -u).$(pgrep -x sway).sock

# Temporary build space (if /tmp is full):
sudo mount -o remount,size=15G /tmp

πŸ”„ Maintenance

Regular Tasks

  • Run home-manager switch after configuration changes
  • Periodic sudo dnf upgrade --refresh for system packages
  • Monitor ~/.nix-profile/bin/ for binary availability
  • Update ADRs when making architectural changes

Backup Strategy

  • Configuration files are tracked in git
  • XDG compliance allows selective backup (exclude cache directories)
  • Complete user environment reproducible from home.nix

πŸ“ˆ System Status

Last major update: 2025-08-11 - Flakes migration and Viber improvements Packages managed: 95+ via home-manager/Nix Flakes Architecture: Wayland-first with modern security features and hardware acceleration Reproducibility: Complete user environment with locked dependencies (flake.lock)

β€”

*This repository represents a fully consolidated, reproducible desktop environment optimized for development productivity and modern security practices.*

About

dotfiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •