diff --git a/AGENTS.md b/AGENTS.md index 2a04a27..8d84652 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -126,3 +126,6 @@ Gitea rebases the synthetic upstream root commit without the `third_party/pi` prefix. Preserve `git-subtree-dir` and `git-subtree-split` trailers on Pi vendor commits. - The default Pi model for NixOS user configuration is set in `configs/nixos/modules/shell/pi/default.nix`, not in vendored Pi source. +- Home Manager uses the NixOS package set in this repository. + Use `pkgs` for Home Manager tool commands unless a NixOS `config.programs..package` + option owns the selected package. diff --git a/src/skills/style/nix/rules/general.md b/src/skills/style/nix/rules/general.md index 85d09f4..54ea624 100644 --- a/src/skills/style/nix/rules/general.md +++ b/src/skills/style/nix/rules/general.md @@ -41,13 +41,13 @@ They also make package ownership explicit. ### Rule -Use `pkgs.` for Home Manager tools when Home Manager uses global NixOS packages. +Use `pkgs.` for Home Manager tools. Use `config.programs..package` when a NixOS module owns the selected package. Do not read `config.home-manager.users..programs..package` for command paths. -Use that Home Manager package option only when Home Manager intentionally selects a different package. +Home Manager uses the NixOS package set in this repository. ### Rationale -Most Home Manager modules in this repository share the NixOS package set. +Home Manager uses the NixOS package set in this repository. Referencing `pkgs.` avoids needless dependency paths through the Home Manager user tree. Configured NixOS package options preserve the selected package when a module owns the tool.