r/NixOS•
GingerBart

Where does $HOME get set by default in NixOS?

Hello! I have a NixOS server running 25.11 (not flake-based).

Yesterday when I logged in I started getting permissions errors when I tried to open my text editor, and noticed that $HOME is set to / instead of my home directory. I'm sure it's something that I did (though, my configuration.nix is managed by git and doesn't show any changes).

My question is--what/where is the default setting for how $HOME gets set in NixOS? I have other 25.11 NixOS systems (VMs and another bare-metal system) where my $HOME is set properly, so I'd basically just like to reset this one setting back to the default.

I know I can add this in a dotfile, but I'd like to just reset it to the default and not have another file to manage.

Thanks!

Posted Dec 10, 2025, 3:02 AM UTC

10
Loading comments…