Skip to content

ryanwclark1/nixos-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

NixOS & Home Manager Configurations

GitHub stars GitHub repo size NixOS License

This repository contains a Nix Flake for configuring my computers and/or home environment. It is not intended to be a drop in configuration for your computer, but you are welcome to use it as a reference or starting point for your own configuration. If you are looking for a more generic NixOS configuration, I recommend nix-starter-configs. 👍️ These computers are managed by this Nix flake ❄️

Hostname Board CPU RAM Primary GPU Role OS State
woody [ROG-STRIX-B650E-WIFI] [AMD Ryzen 9 7900X] 64GB [AMD Radeon RX 7800 XT] 🖥️ ❄️
frametop [Framework-13in-12thGen] [Intel i7-1260P] 64GB [Intel Iris XE Graphics] 💻️ ❄️
mini [Mac mini] [Apple M4] 16GB [Apple Integrated GPU] 🖥️ 🍎
accent Remote Server Various 8GB N/A ☁️ ❄️
vlad Remote Server Various 4GB N/A ☁️ ❄️
lighthouse Remote Server Various 8GB N/A ☁️ ❄️
ansible Remote Server Various 4GB N/A ☁️ ❄️

Key

  • 🎭️ : Dual boot
  • 🖥️ : Desktop
  • 💻️ : Laptop
  • 🎮️ : Games Machine
  • 🐄 : Virtual Machine
  • ☁️ : Server

Structure

  • home/: Home Manager configurations accessible via home-manager --flake
    • features/: Modular feature configurations organized by category
      • ai/: AI tools and assistants with SuperClaude Framework
        • Claude with 20 specialized agents and MCP server integration
        • Gemini, Qwen, Cursor, Windsurf, and more
      • desktop/: Desktop environments and window managers (Hyprland, GNOME, etc.)
        • Omarchy-inspired utilities and keybindings
        • Modern Wayland compositor configurations
      • development/: Development tools and languages (Rust, Go, Python, etc.)
      • shell/: Shell configurations (Bash, Fish, Zsh, etc.)
      • media/: Media applications and tools
      • productivity/: Productivity applications
      • And many more organized feature modules
    • global/: Global Home Manager settings
    • $HOST_NAME.nix: Host-specific Home Manager configurations
  • hosts/: NixOS system configurations accessible via nixos-rebuild --flake
    • common/: Shared configurations consumed by machine-specific ones
      • global/: Core system configurations applied to all machines
      • optional/: Opt-in configurations (desktop environments, services, tools)
      • users/: User account configurations
    • $HOST_NAME/: Machine-specific configurations with hardware support
      • Hardware configurations leveraging NixOS Hardware modules
      • Service configurations
      • Performance optimizations
      • Monitoring setups (woody has comprehensive Grafana/Prometheus/Loki stack)
  • overlays/: Package patches and version overrides
  • pkgs/: Custom packages and applications
    • code-cursor/: Cursor IDE package
    • kiro/: Kiro terminal package
    • multiviewer/: Multiviewer package
    • windsurf/: Windsurf IDE package
  • templates/: Project templates for different languages (C, Node.js, Rust)
  • scripts/: Update scripts for custom packages
  • secrets/: Encrypted secrets managed by [sops-nix]
  • docs/: Documentation and configuration guides
  • omarchy/: Omarchy-inspired configuration and utilities
  • [flake.nix]: Entrypoint for hosts and home configurations
  • [Makefile]: Commands for managing Nix, secrets, and system operations

Installing 💾

  • Boot off a .iso image created by this flake using build-iso-desktop or build-iso-console (see below)
  • Put the .iso image on a USB drive
  • Boot the target computer from the USB drive
  • Two installation options are available: 1 Use the graphical Calamares installer to install an ad-hoc system 2 Run install-system <hostname> <username> from a terminal
    • The install script uses [Disko] or disks.sh to automatically partition and format the disks, then uses my flake via nixos-install to complete a full-system installation
    • This flake is copied to the target user's home directory as ~/Zero/nix-config
    • The nixos-enter command is used to automatically chroot into the new system and apply the Home Manager configuration.
  • Reboot 🥾

All you need is nix (any version). Run:

nix-shell

If you already have nix 2.4+, git, and have already enabled flakes and nix-command, you can also use the non-legacy command:

nix develop

nixos-rebuild --flake . To build system configurations

home-manager --flake . To build user configurations

nix build (or shell or run) To build and use packages

sops To manage secrets

Applying Changes ✨

I clone this repo to ~/nix-config. NixOS and Home Manager changes are applied separately because I have some non-NixOS hosts.

gh repo clone ryanwclark1/nix-config ~/nix-config

Makefile Commands

The Makefile provides convenient commands for system management:

System Management:

  • make woody - Switch to woody configuration
  • make switch i=<hostname> - Switch to specified host configuration
  • make up - Update flake inputs
  • make upp i=<input> - Update specific flake input
  • make gc - Garbage collect and optimize system
  • make fmt - Format Nix files

Key Management:

  • make keygen - Generate SSH and Age keys
  • make rsa_key - Generate RSA SSH key
  • make ed25519_key - Generate Ed25519 SSH key
  • make age_key - Generate Age key pair
  • make get_age_public_key - Display Age public key

Development:

  • make get-vscode-sha - Get SHA256 for VSCode packages
  • make get-vscode-extension-sha - Get SHA256 for VSCode extensions

Dry Run:

  • make woody-dryrun - Dry run woody configuration
  • make frametop-dryrun - Dry run frametop configuration

ISO 📀

The build-iso script is included that creates .iso images from this flake. The following modes are available:

  • build-iso console (terminal environment): Includes install-system for automated installation.
  • build-iso desktop (desktop environment): Includes install-system and Calamares installation.

Live images will be left in ~/$HOME/nix-config/result/iso/ and are also injected into ~/Quickemu/nixos-console and ~/Quickemu/nixos-desktop respectively. The console .iso image is also periodically built and published via [GitHub Actions and are available in this project's Releases](https://github.com/ryanwclark1/nix-config/releases).

What's in the box? 🎁

Nix is configured with flake support and the unified CLI enabled.

Structure

Here is the directory structure I'm using.

.
├── home/
│   ├── features/
│   │   ├── ai/                    # AI tools and assistants
│   │   │   ├── claude/            # Claude configurations with SuperClaude Framework
│   │   │   │   ├── config/        # Framework documentation and agents
│   │   │   │   │   ├── PLANNING.md, TASK.md, KNOWLEDGE.md, CONTRIBUTING.md
│   │   │   │   │   ├── agents/    # 20 specialized AI agents
│   │   │   │   │   └── MCP servers, modes, and configurations
│   │   │   ├── gemini/            # Gemini configurations
│   │   │   ├── qwen/              # Qwen configurations
│   │   │   ├── cursor/            # Cursor IDE
│   │   │   └── sourcebot/         # Sourcebot AI assistant
│   │   ├── desktop/               # Desktop environments
│   │   │   ├── window-managers/   # Hyprland, Niri configurations
│   │   │   ├── environments/      # GNOME, XFCE configurations
│   │   │   └── common/            # Shared desktop components
│   │   │       └── scripts/       # System, Wayland, and Rofi utilities
│   │   ├── development/           # Development tools
│   │   │   ├── rust.nix          # Rust toolchain
│   │   │   ├── go.nix            # Go toolchain
│   │   │   ├── python.nix        # Python toolchain
│   │   │   └── js.nix            # JavaScript/Node.js
│   │   ├── shell/                # Shell configurations
│   │   │   ├── bash.nix
│   │   │   ├── fish.nix
│   │   │   └── zsh.nix
│   │   ├── media/                # Media applications
│   │   ├── productivity/         # Productivity tools
│   │   ├── games/                # Gaming applications
│   │   └── [many more features]
│   ├── global/                   # Global Home Manager settings
│   └── $HOST_NAME.nix           # Host-specific configurations
├── hosts/
│   ├── common/
│   │   ├── global/               # Core system configurations
│   │   ├── optional/             # Opt-in configurations
│   │   │   ├── desktop/          # Desktop environments
│   │   │   ├── services/         # System services
│   │   │   └── tools/            # System tools
│   │   └── users/                # User configurations
│   ├── frametop/                 # Framework laptop config
│   │   ├── services/             # Laptop-specific services
│   │   └── monitoring/           # Monitoring setup
│   ├── woody/                    # Desktop config
│   │   ├── services/             # Desktop-specific services
│   │   └── monitoring/            # Comprehensive monitoring stack
│   └── mini/                     # macOS config
├── overlays/                     # Package patches and overrides
├── pkgs/                         # Custom packages
│   ├── code-cursor/              # Cursor IDE
│   ├── kiro/                     # Kiro terminal
│   ├── multiviewer/              # Multiviewer
│   └── windsurf/                 # Windsurf IDE
├── templates/                    # Project templates
│   ├── c/                        # C project template
│   ├── node/                     # Node.js template
│   └── rust/                     # Rust template
├── scripts/                      # Update scripts
├── secrets/                       # Encrypted secrets
├── docs/                         # Documentation
├── omarchy/                      # Omarchy-inspired configuration
├── flake.nix                     # Main flake configuration
└── Makefile                      # Management commands

The NixOS and Home Manager configurations are in the hosts and home directories respectively The pkgs directory contains my custom packages with package overlays in the overlays directory. The secrets.yaml contains secrets managed by [sops-nix]. The default.nix files in the root of each directory are the entry points.

The Shell 🐚

Multiple shell configurations are supported:

  • Bash: Traditional shell with enhanced features
  • Fish: User-friendly shell with syntax highlighting
  • Zsh: Powerful shell with Oh My Zsh integration
  • Ion: Modern shell for system administration
  • NuShell: Data-focused shell

Shell Features:

  • Starship prompt for all shells
  • FZF integration for fuzzy finding
  • Zoxide for smart directory navigation
  • Atuin for shell history search
  • Carapace for shell completions

AI Tools & Assistants 🤖

This configuration includes comprehensive AI tooling with the SuperClaude Framework for advanced development workflows.

SuperClaude Framework

An elite AI development framework integrating 20 specialized agents and structured knowledge management:

Core Documentation:

  • PLANNING.md: Architecture principles, design decisions, and absolute rules for NixOS configuration
  • TASK.md: Task management system with priorities, backlog, and completion tracking
  • KNOWLEDGE.md: Accumulated insights, best practices, and NixOS/Nix troubleshooting
  • CONTRIBUTING.md: Comprehensive contribution guidelines covering git workflow, commit standards, and code style

Specialized Agents (20):

  • nix-systems-specialist: Elite Nix ecosystem expert for NixOS, Home Manager, and flakes
  • ai-engineer: Advanced AI/LLM systems specialist for RAG architectures and multi-agent orchestration
  • debugger: Modern distributed systems debugging with cloud-native observability
  • system-architect: System design and architecture patterns
  • backend-architect: Backend systems and API design
  • frontend-architect: Frontend architecture and UX patterns
  • devops-architect: Infrastructure and deployment automation
  • security-engineer: Security analysis and hardening
  • performance-engineer: Performance optimization and profiling
  • quality-engineer: Testing strategies and quality assurance
  • code-reviewer: Code review and best practices
  • refactoring-expert: Code refactoring and technical debt management
  • technical-writer: Documentation and communication
  • requirements-analyst: Requirements gathering and analysis
  • root-cause-analyst: Root cause analysis and incident response
  • python-expert: Python development and ecosystem
  • learning-guide: Educational content and mentoring
  • socratic-mentor: Socratic method teaching approach
  • deep-research-agent: In-depth research and analysis
  • business-panel-experts: Business strategy and decision-making

AI Assistants:

  • Claude: Anthropic's Claude with MCP server integration and SuperClaude framework
  • Gemini: Google's Gemini AI with CLI tools
  • Qwen: Alibaba's Qwen AI models
  • Sourcebot: Custom AI assistant for code analysis

Development Tools:

  • Cursor: AI-powered code editor
  • Windsurf: Alternative AI code editor
  • Open WebUI: Web interface for local AI models
  • Ollama: Local AI model management

Features:

  • MCP (Model Context Protocol) server configurations (Context7, Serena, Sequential, Playwright)
  • Multiple operation modes (Brainstorming, Deep Research, Task Management, Orchestration)
  • Docker-based AI service deployments
  • Local model hosting capabilities
  • Structured knowledge base and best practices
  • Integration with development workflows

Monitoring & Observability 📊

Comprehensive monitoring stack primarily on woody (desktop):

Core Stack:

  • Prometheus: Metrics collection and storage
  • Grafana: Visualization and dashboards
  • Loki: Log aggregation and analysis
  • Grafana Alloy: Metrics and log collection agent
  • Alertmanager: Alert routing and management

Monitoring Coverage:

  • System metrics (CPU, memory, disk, network)
  • Container metrics (Docker, Podman)
  • Application metrics
  • Log analysis and correlation
  • Custom dashboards for different use cases
  • Multi-host monitoring capabilities

Features:

  • Automated service discovery
  • Custom alerting rules
  • Log processing and filtering
  • Performance optimization insights
  • Security monitoring
  • Network traffic analysis

The Desktop 🖥️

This configuration supports multiple desktop environments and window managers:

Window Managers:

  • Hyprland: Primary Wayland compositor with comprehensive configuration
    • Custom keybindings and workspace management
    • Waybar integration with custom modules
    • Screenshot utilities and media controls
    • Omarchy-inspired utilities and keybindings
    • Mako notification daemon with system info notifications
    • See docs/hyprland.md for complete keybinding reference
  • Niri: Alternative Wayland compositor (experimental)

Desktop Environments:

  • GNOME: Full GNOME desktop with extensions
  • XFCE: Lightweight desktop environment
  • Plasma: KDE Plasma desktop

Common Features:

  • Font configuration using Work Sans and Fira Code
  • [Pipewire] for audio management
  • Bluetooth support
  • [Avahi] for network discovery
  • [CUPS] for printing
  • [SANE] for scanner support
  • [NetworkManager] for network management
  • Stylix theming integration
Desktop System Configuration Theme
Hyprland Wayland Custom configuration Nord-inspired
GNOME Wayland/X11 Standard GNOME Adwaita + Extensions
XFCE X11 Lightweight setup Adwaita
Plasma X11/Wayland KDE Plasma Breeze

Omarchy Integration 🎨

This configuration includes utilities and features inspired by Omarchy, DHH's beautiful, modern & opinionated Linux distribution.

System Notification Utilities:

  • show-battery: Display battery status, level, charging state, and time remaining with smart icons
    • Keybinding: SUPER+CTRL+B
  • show-time: Display current time, date, week number, and timezone information
    • Keybinding: SUPER+CTRL+T

Wayland Utilities:

  • keybindings-menu: Interactive keybindings reference with walker
    • Keybinding: SUPER+/
  • toggle-nightlight: Toggle hyprsunset nightlight mode for eye comfort
    • Keybinding: SUPER+CTRL+N
  • toggle-idle: Toggle hypridle idle management on/off
    • Keybinding: SUPER+CTRL+I
  • toggle-transparency: Toggle window opacity/transparency in Hyprland
    • Keybinding: SUPER+CTRL+O
  • window-pop: Pop window out (float and pin across workspaces)
    • Keybinding: SUPER+CTRL+P
  • workspace-toggle-gaps: Toggle workspace gaps on/off for maximized screen space
    • Keybinding: SUPER+CTRL+G

Features:

  • Mako notification daemon for clean, minimal notifications
  • System information at a glance without requiring a status bar
  • Enhanced window management for improved productivity
  • Modern Wayland-native utilities

All scripts are organized in ~/.local/bin/scripts/ with proper categorization by scope (system, wayland, rofi).

Alt

Post-install Checklist

Things I currently need to do manually after installation.

Secrets

  • Provision ~/.config/sops/age/keys.txt. Optionally handled by install-system.
  • Add ssh-to-age -i /etc/ssh/ssh_host_ed25519_key.pub to .sops.yaml.
  • Run sops updatekeys secrets/secrets.yaml
  • Run gpg-restore
  • LastPass - authenticate
  • Authy - activate
  • 1Password - authenticate

Services

Reboot and systemd-boot should now offer the option to boot NixOS and Windows.

TODO 🗒️

Things I should do or improve:

Infrastructure

  • Migrate Borg Backups to borgmatic via NixOS modules and Home Manager
  • Integrate notify
  • Integrate homepage
  • Set up automated monitoring alerts
  • Implement automated backup verification

Development

  • Add more language templates (Python, Go, Haskell)
  • Improve development environment consistency across hosts
  • Add more AI model integrations
  • Enhance MCP server configurations

Desktop

  • Improve Niri configuration and stability
  • Add more desktop environment options
  • Enhance Hyprland plugin ecosystem
  • Improve multi-monitor support

Security

  • Implement automated security updates
  • Add intrusion detection systems
  • Enhance secret management workflows
  • Improve SSH key rotation automation

Inspirations 🧑‍🏫

This configuration draws inspiration from several excellent NixOS setups and community resources:

Configuration References:

Installation & Setup: The [Disko] implementation and automated installation are inspired by:

Desktop Configuration:

Community Resources:

Links & References

Core Technologies:

Hardware:

System Services:


This configuration is actively maintained and updated. Feel free to use it as inspiration for your own NixOS setup!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •