home-manager

Home Manager

Home Manager for declarative user environment and dotfile management with Nix

Details

Language / Topic
nixNix
Category
framework
Compatible Frameworks
home-manager

Rules

balanced
- Define user packages under `home.packages` and program-specific options under `programs.<name>.enable = true` — prefer `programs.*` over raw dotfile management when an HM module exists.
- Use `home.file."<path>".source` to declaratively manage dotfiles from the Nix store — use `home.file."<path>".text` for inline content generated from Nix expressions.
- Always set `home.stateVersion` to the Home Manager release when first creating a configuration and never change it afterward — it gates state migration behavior.
- Use `lib.mkIf config.myModule.enable { ... }` to gate all module configuration behind its own enable flag — makes modules composable without unwanted side effects.