Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.48 KB

File metadata and controls

31 lines (23 loc) · 1.48 KB

NixOS Configuration — Agent Guide

Architecture

  • Entrypoint: configuration.nix imports all modules — no flakes, classic import <nixpkgs>.
  • Module layout under modules/: system, services, programs, users, packages, fonts.
  • hardware-configuration.nix is auto-generated by nixos-generate-config and gitignored — never edit directly.

Commands

Action Command
Apply changes sudo nixos-rebuild switch
Test without applying sudo nixos-rebuild test
Upgrade channel sudo nix-channel --update && sudo nixos-rebuild switch

Critical Details

  • modules/programs/neovim.nix uses builtins.readFile with absolute paths (/home/sofiavldd/.config/nvim/...). These paths must exist at build time — the config is embedded into the store, not symlinked.
  • stateVersion is "25.11" in configuration.nix. Do not bump without understanding NixOS state version implications.
  • Unfree packages are allowed (nixpkgs.config.allowUnfree = true).
  • The nixos symlink at repo root points to /.host-etc/nixos — do not treat it as a regular directory.
  • Hostname is nixos, single user sofiavldd (zsh, wheel, networkmanager groups).
  • Only module that adds packages to the system is modules/packages.nixusers/sofiavldd.nix only adds kdePackages.kate.

Build artifacts (gitignored)

  • result, result-* (nix build outputs)
  • .direnv (direnv cache)
  • **/.nixos-test-history (test runner state)
  • hardware-configuration.nix