A comprehensive, modular NixOS configuration managing multiple hosts with a unified my.* namespace. Features declarative system configurations, extensive home-manager modules, custom packages, and containerized environments.
⚠️ AI-Generated Documentation DisclaimerThis README was written by Claude because I was too lazy to document my own config. Most features were adapted from the excellent projects listed in #inspirations below. Everything here is subject to change on a whim as I experiment and break things. Your mileage may vary.
Experience this configuration in a containerized environment:
bash <(curl -fsSL 'https://github.com/Joaqim/dotfiles/raw/refs/heads/main/containers/sandbox-with-ghcr.bash') latestNote: Container is built for x86-64-linux systems.
# Test changes (dry-run)
task test # Test both NixOS and home-manager
task test-nixos # Test NixOS configuration only
task test-home-manager # Test home-manager only
# Apply changes
task nixos # Apply NixOS configuration (requires /etc/NIXOS)
task home-manager # Apply home-manager for current user@host
task apply # Apply both (use with caution)
# Maintenance
task update # Update flake.lock and run selfup/nvfetcher
task pre-commit-all # Run pre-commit hooks and auto-formatting
task check # Run nix flake check
# Validation
nix flake check -L # Check flake for errorsAll custom options use a unified my.* namespace for consistency and clarity:
NixOS Modules (modules/nixos/):
my.profiles.*- High-level feature bundles (desktop environments, services, hardware)my.services.*- System services (Jellyfin, Minecraft, Alexandria, Ollama, etc.)my.programs.*- System-wide program configurationsmy.hardware.*- Hardware-specific settingsmy.system.*- Core system configurationmy.user.{name, fullName, email}- Primary user metadata
Home-Manager Modules (modules/home/):
my.home.*- User-level programs and configurations (48+ modules)- Auto-imported from all subdirectories
dotfiles/
├── flake/ # Flake composition and outputs
├── hosts/
│ ├── nixos/ # System configurations (desktop, deck, qb, raket, etc.)
│ └── homes/ # User configurations (user@host pattern)
├── modules/
│ ├── nixos/ # System-level modules
│ │ ├── profiles/ # Feature bundles (11 profiles)
│ │ ├── services/ # Service modules (27 services)
│ │ ├── programs/ # Program configurations
│ │ ├── hardware/ # Hardware support
│ │ └── system/ # Core system settings
│ └── home/ # User-level modules (48 modules, auto-imported)
├── pkgs/ # Custom packages (9 packages)
├── overlays/ # Nixpkgs overlays (auto-imported)
├── apps/ # Flake apps (helper scripts)
├── lib/ # Extended Nix library functions
└── secrets/ # Encrypted secrets (sops-nix)
- desktop - Main workstation with Plasma desktop, Minecraft server, full gaming setup
- deck - Steam Deck configuration with Jovian-NixOS integration
- qb - Minimal system configuration
- raket - Additional host configuration
- container - Base NixOS for containerized testing
- generic - Generic configuration template
jq@desktop- Primary desktop user environmentjq@qb- Minimal home configurationdeck@deck- Steam Deck user setupwilton@raket- Alternative user configurationuser@container- Containerized home environmentgithub-actions@generic- CI/CD testing environment
- KDE Plasma (
my.profiles.plasma) - Full-featured desktop with customizations - Hyprland (
my.profiles.hyprland) - Wayland compositor configuration
- Steam Deck (
my.profiles.steam-deck) - Jovian-NixOS integration for Steam Deck hardware - Minecraft Servers - Multiple server configurations with nix-minecraft
- Vanilla server (
my.profiles.minecraft-server) - Modded server (
my.profiles.minecraft-server-lucky-world-invasion)
- Vanilla server (
- Gaming Suite (
my.home.gaming) - Gaming tools and optimizations
- Neovim (
my.home.nvf) - nvf framework with extensive plugin support - Pai (
my.programs.pai) - Personal AI Agent - VSCode (
my.home.vscode) - Visual Studio Code configuration - Command Line (
my.home.command-line) - Comprehensive CLI toolkit:- Modern alternatives:
bat,eza,fd,ripgrep,bottom - Shell enhancements:
starship,atuin,zoxide,fzf,direnv - Terminal multiplexers:
zellij - Alternative shells:
nushell
- Modern alternatives:
- Alexandria (
my.services.alexandria) - Semantic code search for AI agents - Jellyfin (
my.services.jellyfin) - Media server - Ollama (
my.services.ollama) - Local LLM inference - Open WebUI (
my.services.open-webui) - Web interface for LLMs - Qdrant (
my.services.qdrant) - Vector database for semantic search - Atuin Server (
my.services.atuin-server) - Shell history sync server - Caddy/Nginx - Reverse proxy and web server
- Tailscale - VPN mesh networking
- Syncthing - File synchronization
- QBittorrent - Torrent client with cross-seed support
- MPV (
my.home.mpv) - Feature-rich video player with custom scripts:mpv-skipsilence- Skip silent partsmpv-org-history- Small plugin to store entries as org-compatible text
- Firefox (
my.home.firefox) - Customized browser configuration - OBS Studio (
my.home.obs-studio) - Streaming and recording - yt-dlp (
my.home.yt-dlp) - YouTube and media downloader - Calibre (
my.home.calibre) - E-book management - Zathura (
my.home.zathura) - Minimalist PDF viewer
- fcitx5 (
my.profiles.fcitx5) - Advanced input method framework - XKB (
my.profiles.xkb) - Custom keyboard layouts (US/SE with Dvorak Programmer option) - Language (
my.profiles.language) - Multi-locale support (en_US, sv_SE, en_SE)
mpv-history-launcher- Launch entries stored in text viampv-org-historympv-skipsilence- MPV plugin to skip silent portionsmpv-org-history- Org-mode entries saved to filechronotube- YouTube video management tooltwitchindicator- Twitch stream indicatorgodot4-godotjs- Godot 4 with JavaScript supportminecraft-modpack- Custom Minecraft modpack- And more...
# In hosts/nixos/<hostname>/profiles.nix
my.profiles = {
plasma.enable = true;
bluetooth.enable = true;
fcitx5.enable = true;
};# In hosts/homes/<user>@<host>/default.nix
my.home = {
firefox.enable = true;
mpv.enable = true;
gaming.enable = true;
command-line.enable = true;
};# Available as pkgs.my.<name>
home.packages = with pkgs.my; [
mpv-history-launcher
chronotube
];Set HM_HOST_SLUG environment variable (in .env) to build home-manager for any host:
export HM_HOST_SLUG=desktop
task test-home-manager # Test jq@desktop from any machineUses sops-nix for encrypted secrets:
- Configuration in
.sops.yaml - Secrets stored in
secrets/directory - Age-based encryption with YubiKey support
For merge conflict handling, see: sops merge conflicts
CI/CD builds containerized home environments for testing and distribution:
- Generic user environment in
user@container - GitHub Actions runner environment
- Automated builds via
.github/workflows/container.yml
Credit to kachick/dotfiles for the containerized home images approach.
nixpkgs- NixOS unstablehome-manager- User environment managementsops-nix- Secrets managementnvf- Neovim configuration frameworkjovian- Steam Deck support (Jovian-NixOS)nix-minecraft- Minecraft server managementalexandria- Semantic code search MCP serverjqpkgs- Personal package repositorydisko- Declarative disk partitioning- Plus various custom service flakes (ccc, jellyfin-plugins, etc.)
- Make changes to modules or host configurations
- Run
task testto verify builds - Review changes with
nix flake check -L - Pre-commit hooks run automatically (or
task pre-commit-all) - Apply with
task nixosand/ortask home-manager
- NixOS Wiki - Platformio
- Nixcademy - Debugging Overlays
- NixOS/nixpkgs - Python Overrides
- Useful Nix Hacks
- kachick/dotfiles - Containerized home environments
- Misterio77/nix-config - Modular architecture
- TLATER/dotfiles - Sops secrets management
- wimpysworld/nix-config - Comprehensive examples
- Faupi/nixos-configs - Hardware configurations
- ambroisie/nix-config - Clean structure
This configuration is provided as-is for reference and inspiration. Feel free to adapt it for your own use.