Yeah, the home-manager docs are structured in the most confusing way possible.
~/.config/home-manager/home.nix is the file used for standalone home-manager configurations. If you use home-manager on NixOS you should never create it.
Instead, the home-manager module entrypoint goes directly into the home-manager.users.<username> option. It however contains the exact same contents as the home.nix file would with a standalone setup.
The docs never really explain the difference between a home-manager or NixOS setup, and interleave the setup for the two different systems, and then only have a section explaining how to use the standalone configuration, never properly distinguishing the two. It’s not surprising that you would be confused.
If you want to, you can change your configuration to:
# /etc/nixos/configuration.nix
{ config, pkgs, lib, osConfig ...}: {
# <snip>
home-manager.users.parkerh = import ./home.nix;
# <snap>
}
# /etc/nixos/home.nix
{ pkgs, ... }: {
home.packages = [ pkgs.atool pkgs.httpie ];
programs.bash.enable = true;
home.stateVersion = "25.05";
}
That way you still have a file called home.nix, which might be a bit less confusing than an inline module.
Also, while we’re at it, don’t use builtins.fetchTarball without a hash. This breaks reproducibility and makes it so nix will just magically download a new home-manager every two hours, and spend the time doing that too, which slows everything down.
Anyone recommending new users use builtins.fetchTarball that way should be publicly shamed; Personally I would recommend either using channels (despite their flaws, all the docs are written for flakes…) or npins. Those two options lack this footgun entirely, though channels have a few other footguns.
Sigh, of course you’ve stumbled into two incredibly well-known footguns right off the bat. Why do we keep footguns lying around like this? I’m so sorry.