Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Maintinance Guidelines

Documentation: https://tj-coding.github.io/nixos-config/

New here? Read Bag of Materials for what exists, and the playbooks for how to change it.

Directory Structure

πŸ“‚ nixos-config/
β”œβ”€ πŸ“‚ hosts/      Contains configuration of physical machines
β”œβ”€ πŸ“‚ templates/  Groups of modules and functions reused by different machines
β”œβ”€ πŸ“‚ modules/    Groups of moudles for use by different templates
β”œβ”€ πŸ“‚ functions/  Smallest component, who serves a specific function
β”œβ”€ πŸ“‚ apps/       Custom Nix Packages and Docker Files who serves a function

Choosing Folder

FolderPut it here when…Typical contents
hosts/It is specific to a physical machineHardware configuration, host-specific settings
templates/It combines reusable configuration for a class of machinesDesktop template, server template, development template
modules/It provides one reusable NixOS featureSSH, Docker, graphics, users
functions/It is a small reusable building blockNix functions, helpers, generators
apps/It represents a custom application or packageCustom Nix packages, Docker Compose applications

Dependency Direction

hosts
  ↓
templates
  ↓
modules
  ↓
functions