Does the configuration not have access to the home directory?

A few days ago I refactored my configuration file for XMonad, and soon noticed that my status bar had stopped starting on first login. By some intuition I changed the path to be the same file (well, the symlink) that lies in /etc/nixos and it worked! Why does that work?

Here’s the diff:

-mySB = withEasySB (statusBarProp "xmobar ~/nixos-config/nixos/custom/yoga/xmobarrc" myXmobarPP) hideSB
+mySB = withEasySB (statusBarProp "xmobar /etc/nixos/nixos/custom/yoga/xmobarrc" myXmobarPP) hideSB