Skip to content
/ nixos Public

❄️ Modular Nix configuration using dendritic pattern with flake-parts

Notifications You must be signed in to change notification settings

fbosch/nixos

Repository files navigation

❄️ NixOS Nix-Darwin NixOS

Dendritic Pattern Flake Parts Import Tree Home Manager SOPS

Personal NixOS configuration using a dendritic module layout with flake-parts.

Fresh installation? See docs/INSTALLATION.md.

Common Tasks

Note: This configuration uses nh (Nix Helper) for simplified system management.

Build & Deploy

nh os switch          # Build and switch
nh os test            # Test without switching
nh os rollback        # Rollback to previous build
nh os switch --update # Update and rebuild

Development

nix run .#lint        # statix + deadnix checks
nix run .#fmt         # nixpkgs-fmt formatting

Dotfiles

My dotfiles are managed via Home Manager + GNU Stow. https://github.com/fbosch/dotfiles

Layout

assets/            screenshots and art
configs/           shared config files (gpg, etc)
docs/              guides and agent docs
lib/               pure utility functions
  icon-overrides.nix    icon theme customization
machines/          machine-specific NixOS configs
  desktop/         desktop machine hardware config
  msi-cubi/        MSI Cubi hardware config
  virtualbox-vm/   VirtualBox VM config
modules/
  flake-parts/     meta, overlays, hosts loader, lib wiring
  hosts/           one file per machine → nixosConfigurations.<name>
  presets/         desktop, server presets
  applications/    GUI apps (browsers, gaming, file management)
  desktop/         desktop environment (hyprland, gtk, audio)
  development/     dev tools (git, nodejs, python, ai)
  hardware/        hardware-specific (fingerprint, storage, fancontrol)
  services/        system services (plex, home-assistant, attic)
  shell/           shell tools (fish, starship, direnv, eza)
  system/          system config (ananicy, scheduled-suspend)
  virtualization/  docker, libvirt
  *.nix            core modules (users, fonts, security, nas, sops)
pkgs/by-name/      local packages
scripts/           helper scripts
secrets/           sops files
flowchart LR
  flake[flake.nix]
  machines[machines/*]

  subgraph flakeParts[modules/flake-parts/]
    meta[meta.nix → flake.meta]
    flakeModules[flake-parts.nix → flake.modules]
    libNix[lib.nix → flake.lib.*]
    hostsNix[hosts.nix]
  end

  subgraph flakeLib[flake.lib]
    resolve[resolve - NixOS modules]
    resolveHm[resolveHm - Home Manager]
    resolveDarwin[resolveDarwin - Darwin]
    iconOverrides[iconOverrides]
  end

  subgraph pureLib[lib/]
    iconOverridesNix[icon-overrides.nix]
  end

  subgraph moduleTree[modules/]
    hosts[hosts/*]
    presetsModules[presets/*]
    moduleset[feature modules]
  end

  flake --> flakeParts
  libNix --> flakeLib
  iconOverridesNix -.imported by.-> iconOverrides

  flakeModules --> moduleTree
  moduleTree --> presetsModules

  hosts --> resolve
  hosts --> resolveHm
  hosts --> resolveDarwin
  hosts --> machines
  
  presetsModules --> resolve
  presetsModules --> resolveHm

  resolve -.resolves to.-> moduleset
  resolveHm -.resolves to.-> moduleset
  resolveDarwin -.resolves to.-> moduleset

  hostsNix --> nixosConfigs[nixosConfigurations]
  hostsNix --> darwinConfigs[darwinConfigurations]
Loading

Presets

Presets are reusable module bundles that provide a baseline configuration:

Available:

  • presets/desktop - Full desktop environment with Hyprland, GUI apps, development tools
  • presets/server - Minimal server configuration

Credits

About

❄️ Modular Nix configuration using dendritic pattern with flake-parts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •