Lan Tian's NixOS Configuration

July 8, 2026 ยท View on GitHub

This repository holds the configuration files for all my NixOS systems.

Features

Host Types

My hosts are categorized into three types:

  • client: A host running NixOS. Usually a desktop/laptop running a desktop environment.
  • minimal: A minimal NixOS host, used for special purposes.
  • server: A host running NixOS without GUI. Usually a VM running on a cloud provider.

Folder Structure

  • dns: My custom Nix-to-DNSControl code that generates a DNSControl config.js file, controlling DNS records for my domains.

    • Subdirectories
      • common: Common records shared across domains.
      • core: Core component that converts a Nix attribute set into DNSControl config.js format.
      • domains: Nix definitions controlling individual (groups of) zones.
  • helpers: Definitions for short cuts used by code in this repo.

  • home: My Home Manager configurations.

    • Subdirectories
      • common-apps: Apps used by all nodes.
      • client-apps: Apps used by client nodes.
  • hosts: Host-specific NixOS system definitions. Each subdirectory refers to a host. The list of hosts is automatically obtained in flake.nix. Configs here usually control networking parameters, and host-specific tunings.

  • nixos: Common NixOS system definitions.

    • Used by all nodes

      • common-apps: Apps used by all nodes.
      • minimal-apps: Apps used by all nodes.
      • minimal-components: System options used by all nodes.
        • Components differ from "Apps" in that a component is a fundamental part in the system (often by tuning kernel core parameters), while an app provides service on the userspace level.
      • minimal-modules: Self-contained NixOS modules that are theoretically upstreamable to nixpkgs. They work independently and are disabled by default, only adding options without enabling services unless explicitly configured. Applied to all host types.
    • Used by client nodes

      • client-apps: Apps specific to client nodes.
      • client-components: Components specific to client nodes.
    • Used by server nodes

      • server-apps: Apps used by server nodes.
      • server-components: Components used by server nodes.
    • Used by Proxmox VE nodes

      • pve-components: Components specific to Proxmox VE nodes.
    • Supplemental files

      • hardware: Common hardware configuration snippets, including LVM and QEMU VMs.
      • optional-apps: Apps that are used by some nodes. Manual imports required in host-specific definitions.
      • optional-cron-jobs: Cron jobs that are used by some nodes. Manual imports required in host-specific definitions.