Skip to content

knoopx/nix

Repository files navigation

My NixOS Setup

This is my personal NixOS configuration for a clean, keyboard-focused development machine. I built it to keep things simple, consistent, and distraction-free while coding.

demo.mp4

Try Out

# Run the VM demo
nix run github:knoopx/nix

# Or clone and run locally
git clone https://github.com/knoopx/nix
cd nix
nix run .#vm

What I Focus On

  • Minimal clutter: Shell has no widgets and apps take the whole vertical space. Pressing Super reveals the overlay with the widgets.
  • Unified styling: Consistent colors, fonts, and styles across:
    • System GTK/Qt themes and custom Neuwaita icon theme (merged with MoreWaita)
    • Terminal emulators (Kitty)
    • Text editors (VSCode, Helix)
    • Web browsers (Firefox with custom userstyles and GNOME theme)
    • Window manager (Niri with custom color schemes)
    • Desktop shell (Astal with theme-aware widgets)
    • All applications via Stylix theming system
  • Reproducible: Everything's declarative, so I can set it up the same way anywhere

Software

Main Components

  • Niri: A modern, Wayland-native tiling window manager that provides efficient keyboard-driven window management. It supports custom layouts, workspaces, and seamless integration with the desktop environment for a distraction-free coding experience.
  • Astal Shell: A custom desktop shell built on Astal framework, featuring theme-aware widgets for system monitoring, notifications, and quick access to applications. Includes swayidle integration for power management.
  • Vicinae: Application launcher inspired by Raycast
  • Firefox: Web browser optimized for privacy with uBlock Origin for ad-blocking, custom search engines, and userstyles for consistent theming. Includes policies for enhanced security and performance thanks to BetterFox and GNOME theme integration
  • Kitty: GPU-accelerated terminal emulator with theme integration
  • Fish: The user-friendly command line shell with custom completions
  • Hyprlock: Screen locker with custom theme
  • Navi: Interactive cheatsheets for command-line tools
  • FZF: Command-line fuzzy finder
  • Skim: Fuzzy finder with Vim integration
  • VSCode: Primary code editor. Configured with custom keybindings, themes, and productivity tools for development
  • Helix: Modal text editor inspired by Vim
  • Yazi: Modern terminal file manager
  • Television: Fuzzy finder with preview

Development Environments

The modules/home-manager/packages/dev/ directory contains language-specific development environments, each providing essential tools for programming in that language:

  • Crystal: Compiler, Crystalline language server, Shards package manager, and Mint framework for building web applications
  • Go: Compiler, gopls language server, Delve debugger, and build tools for efficient Go development
  • JavaScript: Node.js runtime, package managers (Yarn, pnpm), TypeScript compiler, and development utilities for modern web development
  • Nix: nixpkgs-fmt formatter, linter, and nixd language server for Nix language development and configuration
  • Python: Interpreter, package managers (pip, poetry), virtual environment tools, and development utilities
  • Ruby: Interpreter, Bundler for dependency management, and development tools for Ruby applications
  • Rust: Compiler, Cargo package manager, and additional tools for Rust development
  • System: C/C++ compilers (GCC, Clang), build tools, and system-level development utilities

How It's Organized

My Machines

  • desktop/: Main workstation featuring:
    • NVIDIA graphics with CUDA support
    • BTRFS filesystem with advanced features
    • Container services (Watchtower for updates, SilverBullet)
    • Hardware acceleration for AI models
    • EasyEffects audio configuration
    • Glance dashboard
    • Autofirma integration
  • minibookx/: Chuwi Minibook X N150 laptop configuration:
    • Hardware-specific drivers and optimizations
    • Power management and battery optimizations
  • vm/: Virtual machine setup for testing with demo scripts
  • live-usb/: Bootable USB configuration for system recovery and installation

Modules

  • modules/nixos/: System-level configurations including:
    • defaults/: Global settings for AI, colors, display, fonts, system, and user
    • services/: System services (Plex Media Server, Traefik, Android backup, auto-scrcpy, Flatpak, Keyd, etc.)
    • system/: Core system settings (boot, documentation, environment, hardware, networking, Nix configuration, packages, programs, users, virtualisation)
    • theming/: Stylix theming configuration
    • wm/: Window manager and desktop environment settings (Niri, packages, programs, services, XDG)
  • modules/home-manager/: User environment configurations:
    • packages/: User packages and development tools
      • dev/: Language-specific development environments (Crystal, Go, JavaScript, Nix, Python, Ruby, Rust, System)
      • cli.nix: Command-line interface utilities
      • gtk.nix: GTK-related packages
  • programs/: Application configurations (VSCode, Firefox, Kitty, Fish, Helix, Hyprlock, etc.)
    • firefox/: Firefox with custom policies, profiles, and uBlock rules
    • opencode-ai/: OpenCode AI integration
    • vscode/: VSCode with extensions, keybindings, and user settings
    • services/: User services and daemons (Clipman, WebDAV)
    • wm/: Window manager user settings
      • niri/: Niri window manager with Astal shell integration
      • xdg/: XDG desktop integration, GTK themes, dconf settings
    • navi/: Navi cheat sheets for various tools
    • environment/: User environment variables and session settings
    • misc.nix: Miscellaneous user configurations
  • overlays/: Package customizations and fixes:
    • Custom builds for Glance, Geary, RetroArch, etc.
    • Theme and UI modifications (Balatro, Cromite, Kitty, Niri, etc.)
    • OpenCode AI CLI wrapper (oc)
  • builders/: Helper functions for creating package derivations
    • theming/: Theme builders (MoreWaita icons, Stylix Firefox/Gnome themes)
  • lib/: Utility functions for theming, color manipulation, and module loading
    • theming/: Color conversion utilities (hexToRGB, rgbToHex, etc.)
    • listNixModulesRecursive.nix: Custom module loading utility
  • pkgs/: Custom package definitions (Neuwaita Icon Theme, Llama Swap, NFO Viewer, etc.)
  • home/: User-specific Home Manager configurations
  • flake.nix: Main flake with inputs, outputs, and system configurations
  • flake.lock: Dependency lock file for reproducible builds

About

Niri + AGS based desktop environment on top of nixos

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published