Skip to content

fbosch/nixos

Repository files navigation

❄️ NixOS Configuration

Dendritic-style flake configuration using import-tree and flake-parts for automatic module discovery.

Architecture

flake.nix                    # Entry point - delegates to import-tree
|-- modules/
    |-- flake-parts/         # Infrastructure (host loader, overlays, meta)
    |-- hosts/               # Per-machine definitions -> nixosConfigurations
    |-- applications/        # Browser, productivity, gaming apps
    |-- desktop/             # Hyprland, GNOME, audio, theming
    |-- development/         # Languages, editors, AI tools
    |-- shell/               # Fish, bash, CLI utilities
    |-- system/              # Core system config
    |-- users/fbb/           # User-specific NixOS + Home Manager
    |-- *.nix                # Single-purpose modules
|-- pkgs/by-name/            # Custom packages

Module System

Each file exports under flake.modules.nixos.* or flake.modules.homeManager.*.

Host definitions list module names; the loader in modules/flake-parts/hosts.nix assembles configurations and wires Home Manager automatically.

Development

Linting

Run linting checks on all Nix files:

nix run '.#lint'   # Check code quality
nix run '.#fmt'    # Auto-format code

Tools used:

  • statix: Catches anti-patterns and common mistakes
  • deadnix: Detects unused code
  • nixpkgs-fmt: Formats Nix files

Pre-commit Hooks

Automatic linting on every commit. Setup (one-time):

nix develop

This installs git hooks that run the linter before each commit.

Dotfiles Integration

The dotfiles.nix module clones fbosch/dotfiles and applies it via GNU Stow:

This allows for more flexibility when configuring and using shared configs in non-nix environments.

# modules/dotfiles.nix
home.activation.stowDotFiles = ...
  stow --restow -t "$HOME" .

Resources

Dendritic Nix Pattern

Inspiration

About

❄️

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages