Skip to content

About

Simple and documented config templates to help you get started with NixOS + home-manager + flakes. All the boilerplate you need!

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

59 Commits

Folders and files

Repository files navigation

nixos-config

Modular, flake-based NixOS configuration.

Layout

nixos-config/
├── flake.nix          # entry point: nixpkgs + home-manager flake inputs
├── flake.lock         # pinned inputs (committed)
├── hosts/
│   └── <host>/        # host composition
├── modules/
│   ├── nixos/         # system modules (base, boot, networking, ...)
│   │   └── services/  # optional services (audio, flatpak, snapshots, ...)
│   └── home-manager/  # Home Manager modules (shell, git, ...)
│       └── programs/
├── home/
│   └── <user>.nix     # per-user Home Manager config + personal packages
├── pkgs/              # custom package derivations (placeholder)
├── overlays/          # overlays, wired via modules/nixos/base.nix
└── lib/               # shared helpers (placeholder)

Host composition lives in hosts/<host>/default.nix: imports are explicit, and optional features are toggled either by (un)commenting an import (small features) or via an enable option under the my.* namespace (reusable features, e.g. my.desktop.enable = true;).

Workflow

git pull --ff-only
sudo nixos-rebuild test --flake .#<host>    # try without setting the boot generation
sudo nixos-rebuild switch --flake .#<host>  # apply

Inputs are bumped automatically by system.autoUpgrade. To update them manually (e.g., for local testing before committing):

nix flake update          # all inputs — review flake.lock diff before rebuilding
nix flake update nixpkgs  # single input

Notes

  • Base system runs on a stable nixpkgs; the desktop stack and user packages track nixpkgs-unstable via the overlay in overlays/default.nix.
  • system.autoUpgrade is enabled: every machine pulls the latest commit on main daily and applies it, bumping all inputs to the latest of their branches (--override-flake --refresh) — fully autonomous/rolling. A failed build is safe; a broken-but-building change gets applied — roll back via a previous generation (gc keeps 7d). Tune in modules/nixos/base.nix.
  • hardware-configuration.nix is machine-local (/etc/nixos/, generated by nixos-generate-config), imported per host, and gitignored — not in this repo.
  • Validate with nixos-rebuild test or nix eval --impure; pure nix flake check can't read that machine-local import.
  • Setup details: docs/README.md.

About

Simple and documented config templates to help you get started with NixOS + home-manager + flakes. All the boilerplate you need!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages