Closed HunterThueson closed 1 year ago
Not exactly sure how this issue was resolved; I think I fixed it by running nixos-rebuild boot --upgrade-all
in a TTY as root
rather than using sudo
in a regular alacritty
window, which is how I have usually done up 'till now. It's also possible that there was some sort of fix from upstream, though, and I don't want to take credit for the fix if it wasn't actually my doing. I don't know. Whatever the cause, the point is that the issue was fixed and it can now be closed. I just hope it doesn't somehow unfix itself (again), because then I really won't know what to do.
aaaaannnnddd my worst fear has been realized: the issue has un-fixed itself.
Seriously, what in the world is going wrong? I haven't even run nixos-rebuild
since I closed the issue. I did edit configuration.nix
and its imported .nix
files a bit -- and the edits I made would definitely not run successfully if I
tried to nixos-rebuild
right this second, but that's just because I haven't
finished yet -- but since I haven't run nixos-rebuild
yet, those changes
shouldn't affect home-manager
, right?
I am so confused. And annoyed. But I mean, hey -- it will be really satisfying when I finally do figure it out, right? At least I have something to look forward to, I guess.
Reopened issue #55.
Now it's working again! I ran nixos-rebuild
just now and rebooted, and even
though the changes I made to configuration.nix
had nothing to do with
home-manager
, it's somehow working again. What the hell?! I should be glad,
but it's definitely frustrating to not know how or why this is happening.
Maybe it has something to do with home-manager
being out of date? I did use
the --upgrade-all
flag while rebuilding, so maybe it just doesn't activate
properly if there are changes upstream?
I have no idea. I won't close this for now in case the problem pops up again, but it's working correctly for the time being, it seems.
I was a bit suspicious of this most recent fix of the issue, so I performed a
full shutdown instead of simply rebooting. Sure enough, the issue is back. I'm
hypothesizing that if I run nixos-rebuild
, it will fix the issue for an
unlimited number of reboots, but the moment I shut all the way down, it will
no longer activate home-manager
properly until the next nixos-rebuild
. I
will have to run some more scientific tests to be sure, but that's a problem
for another day.
Upon logging into user
hunter
for the first time after a system boot/reboot, opening a shell shows the following message at the top (followed by thestarship
prompt:Running
cd .nix-profile; ls
(since.nix-profile
is technically a symbolic link) returns the following:However, after running
home-manager-generation
, the error message goes away, and after runningcd .nix-profile; ls
once more we see the following instead:Prior to commit a76ec98367f64d75924a4cc89297956561f84216 (Date: Wed Dec 7 20:57:55 2022 -0700), any user-specific packages specified in
users/hunter.nix
were also not available on the system. This (plus the presence of anactivate
script in~/.nix-profile/
) leads me to believe thathome-manager
itself is simply not activating upon login.Strangely, this issue only applies to the user
hunter
; userash
works just fine.I'm pretty sure this issue is happening because I (at the behest of some well-meaning soul on the
NixOS
discord) recursively deleted the entire directory at/nix/var/nix/profiles/system-profiles/
. This accomplished my goal at the time, which was to remove old/deprecated GRUB menu entries that had been generated usingnixos-rebuild -p test
, putting them in atest
folder that was (to our knowledge) untouchable bynix-collect-garbage
,nixos-rebuild
, etc. Those generations were successfully removed from the GRUB menu (and were presumably deleted after runningnix-collect-garbage
one more time), but that was when all this trouble withhome-manager-generation
started happening.There is one final point of interest I should mention before submitting this issue.
Here is the output from running
ls --no-icons --color=never -T /nix/var/nix/profiles/per-user/ash
:and here is the output from running
ls --no-icons --color=never -T /nix/var/nix/profiles/per-user/hunter
:See the differences? There are far more
profile-[number]-link
files in.../ash/
than in.../hunter/
. The only one listed forhunter
isprofile-17...
, which was probably generated after I ranhome-manager-generation
just now. Also,hunter
lists two files calledchannels*
that are not present forash
.Do I understand what that means, or whether or not it is significant? Not at this time, no. But it may be relevant, so I'm including it in my report on the off chance I find it useful later.Anyways, that's all I know so far about this issue. I will report back later as I learn more.