- Refactor flake to support host-specific Home Manager module composition. - Move Hyprland and DMS Lua configurations into host-specific directories (`hosts/desktop/config/hypr/`). - Adopt DMS Lua-based compositor management for the desktop host, replacing the legacy static `hyprland.conf`. - Remove redundant `hyprland.conf` from shared modules, enforcing strict host-agnostic vs. host-specific isolation. Rationale: Adopting a Lua-based modular compositor configuration allows for programmatic UI and window management while enabling the laptop host to maintain a separate graphical stack (Niri) without configuration bleed.
❄️ Declarative NixOS Workstation
📖 Overview
This repository contains a purely declarative, fully reproducible NixOS configuration tailored for modern software development and multi-host deployment. It serves as the single source of truth for managing a unified Wayland-native environment across different hardware profiles, ensuring identical terminal workflows, editor configurations, and core toolchains on every machine.
The bash shell configuration is a modular port of the static Arch-based environment bash-custom. The desktop experience is designed to achieve visual and functional parity with DankMaterialShell (DMS).
🛑 The Problem (Why this exists)
Traditional Linux distributions (like Arch Linux) rely on imperative package management and stateful configurations. Over time, this leads to:
- Configuration Drift: Packages and dotfiles drift out of sync between a desktop and a laptop.
- Imperative Rot: System stability degrades as manual tweaks, forgotten dependencies, and monolithic Bash configurations (
.bashrcfiles spanning hundreds of lines) pile up. - Replication Friction: Setting up a new machine requires manually executing scripts, remembering package names, and migrating complex configurations by hand.
🎯 Goals
This repository solves these issues by treating the operating system as code, specifically focusing on:
- Deterministic Multi-Host Architecture: Define a shared base system (modules/) while maintaining completely isolated hardware profiles and display managers for specific machines (e.g., Hyprland for the desktop, Niri for the laptop).
- Frictionless Development: Provide a pre-configured, battle-tested toolchain out of the box for backend and systems programming, specifically optimized for Python, Rust, and Java.
- Modular Shell Environment: Replace monolithic shell scripts with cleanly separated, single-purpose modules (Git workflows, Wayland clipboard utilities, fuzzy navigation). These are natively compiled into the environment via Nix without relying on brittle source chains.
- Maintainability & Discoverability: Utilize a logical, flat directory structure that avoids the "hyper-abstraction" trap of overly complex Nix flakes. If a configuration needs to be changed, its location should be immediately obvious.
🚫 Non-Goals
To keep the system fast and maintainable, this configuration explicitly avoids:
- Legacy Display Protocols: There is no support or fallback for X11; this is a pure Wayland environment.
- Full Desktop Environments (DEs): Avoiding bloated DEs (like GNOME or KDE) in favor of lightweight, composable window managers and standalone system monitors.
- Over-Engineering Nix: Avoiding deeply nested Nix functions or custom abstract configuration languages. The goal is to use standard NixOS modules and native file inclusion (
builtins.readFile) to keep the codebase readable for standard Linux users.
📂 Architecture
The repository relies on a standard Nix Flake structure to enforce isolation:
- flake.nix: The entry point of the configuration. Defines system inputs, channels, dependencies (like DMS,
dgop, etc.), and exposes desktop and laptop deployment targets. - home.nix: Home Manager entrypoint defining the user context (
kiskaadee) and importing user-space configuration modules. - hosts/: Machine-specific configurations.
- hosts/desktop: Contains desktop/configuration.nix (machine-specific packages/settings) and desktop/hardware-configuration.nix (autogenerated hardware specifications).
hosts/laptop: Laptop hardware configuration and Niri implementation (under construction).
- modules/: Shared configurations applied across hosts.
- modules/system: Core OS-level settings (bootloaders, networking, audio, greetd login manager).
- modules/system/base.nix: Hardware-agnostic OS base configuration (Docker, Pipewire, SSH, greetd, environment variables).
- modules/system/graphical.nix: Settings for DMS (DankMaterialShell) daemon, system monitoring, and dynamic theming.
- modules/user: User-space configurations (Home Manager, Neovim, Alacritty, Tmux, Starship, fastfetch).
- modules/user/base.nix: Core shell utilities, Git configuration, fastfetch dashboard, aliases, and shell integration.
- modules/user/apps.nix: User packages (Zen Browser, GIMP, MPV, Cloud SDKs, credentials).
- modules/user/graphical.nix: Neovim configuration, Neovim plugins, and graphical session targets.
- modules/user/terminal.nix: Terminal emulator (Alacritty), multiplexer (Tmux), and cross-shell prompt (Starship).
- modules/user/shell/: Extracted, domain-specific shell scripts natively compiled into the shell configuration:
- git.sh: Git helpers (
gitignore,gacp,new-repo). - jump.sh: Yazi and fzf-based quick navigation wrappers (
cnf,pj,jump, etc.). - pdf.sh: Helper functions for decrypting PDFs using
qpdf. - quicklinks.sh: Fzf interactive menu for running custom saved web links or commands.
- wayland.sh: Wayland clipboard integration command wrapper (
wlc).
- git.sh: Git helpers (
- modules/system: Core OS-level settings (bootloaders, networking, audio, greetd login manager).
🚀 Quick Start / Deployment
1. Clone the Configuration
Clone this repository to your home directory (usually target location is ~/Config):
git clone https://github.com/kiskaadee/nixos-config.git ~/Config
cd ~/Config
2. Build and Switch the Configuration
To apply the configuration for the first time or rebuild after a change, run the nixos-rebuild command pointing to the host's flake target:
# Rebuild the system for the 'desktop' target
sudo nixos-rebuild switch --flake ~/Config#desktop
Note: For convenience, a shell alias nix-switch is pre-configured to automatically run this rebuild command for the current host name.
3. Updating Flake Inputs
To update all flake inputs (such as home-manager, nixpkgs, or dms):
nix flake update
🗺️ Roadmap & Next Steps
Here is the current status of features planned to complete the environment and prepare it for dual-host capability:
Phase 1: Complete DankMaterialShell (DMS) Integration
- Adding Background Blur: Configure Hyprland compositor to enable background blur under the shell and terminal elements (DMS CLI Doctor - Compositor Checks).
- Cups-pk-helper: Enable and configure
cups-pk-helperfor privileged printer administration checks (DMS CLI Doctor - Optional Features). - Set Core Fonts: Ensure proper font styling settings:
- Normal Font: Configure Inter Variable as the default system-wide sans-serif font (DMS Fonts).
- Monospace Font: Ensure Fira Code is the primary system monospace font for coding.
Phase 2: Hardware & Display Greeter Polish
- Bluetooth Adapter Configuration: Enable Bluetooth services globally, configure power-on on boot, and enable media controls via Bluetooth.
- Custom Greetd Configuration: Clean up the console/login manager setup, styling
tuigreetor auto-logging to the graphical environment cleanly.
Phase 3: Laptop Profile (Multi-Host Readiness)
- Create
./hosts/laptop/configuration.nixand./hosts/laptop/hardware-configuration.nix. - Integrate the Niri compositor as the default desktop environment for the laptop while sharing 100% of the terminal, editor, toolchain, and styling modules.