Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: home-manager activation fails due to empty manifest.json #5348

Open
2 tasks done
jheidbrink opened this issue Apr 28, 2024 · 2 comments
Open
2 tasks done

bug: home-manager activation fails due to empty manifest.json #5348

jheidbrink opened this issue Apr 28, 2024 · 2 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@jheidbrink
Copy link

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

I use home-manager by including <home-manager/nixos> in my configuration.nix's imports. The home-manager-jan.service fails with

~: journalctl -u home-manager-jan.service --boot
Apr 28 11:45:55 petrosilia systemd[1]: Starting Home Manager environment for jan...
Apr 28 11:45:55 petrosilia hm-activate-jan[1586]: Starting Home Manager activation
Apr 28 11:45:55 petrosilia hm-activate-jan[1586]: Activating checkFilesChanged
Apr 28 11:45:55 petrosilia hm-activate-jan[1586]: Activating checkLinkTargets
Apr 28 11:45:55 petrosilia hm-activate-jan[1586]: Activating writeBoundary
Apr 28 11:45:55 petrosilia hm-activate-jan[1586]: Activating installPackages
Apr 28 11:45:55 petrosilia hm-activate-jan[1815]: warning: you don't have Internet access; disabling some network-dependent features
Apr 28 11:45:55 petrosilia hm-activate-jan[1815]: error: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
Apr 28 11:45:55 petrosilia hm-activate-jan[1819]: nix profile remove
Apr 28 11:45:55 petrosilia hm-activate-jan[1837]: warning: you don't have Internet access; disabling some network-dependent features
Apr 28 11:45:55 petrosilia hm-activate-jan[1837]: error: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
Apr 28 11:45:56 petrosilia hm-activate-jan[1844]: warning: you don't have Internet access; disabling some network-dependent features
Apr 28 11:45:56 petrosilia hm-activate-jan[1844]: error: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
Apr 28 11:45:56 petrosilia hm-activate-jan[1586]: Oops, Nix failed to install your new Home Manager profile!
Apr 28 11:45:56 petrosilia hm-activate-jan[1586]: Perhaps there is a conflict with a package that was installed using
Apr 28 11:45:56 petrosilia hm-activate-jan[1586]: "nix profile install"? Try running
Apr 28 11:45:56 petrosilia hm-activate-jan[1586]:     nix profile list
Apr 28 11:45:56 petrosilia hm-activate-jan[1586]: and if there is a conflicting package you can remove it with
Apr 28 11:45:56 petrosilia hm-activate-jan[1586]:     nix profile remove {number | store path}
Apr 28 11:45:56 petrosilia hm-activate-jan[1586]: Then try activating your Home Manager configuration again.
Apr 28 11:45:56 petrosilia systemd[1]: home-manager-jan.service: Main process exited, code=exited, status=1/FAILURE
Apr 28 11:45:56 petrosilia systemd[1]: home-manager-jan.service: Failed with result 'exit-code'.
Apr 28 11:45:56 petrosilia systemd[1]: Failed to start Home Manager environment for jan.

I found that this is probably caused by an empty /nix/var/nix/profiles/per-user/jan/profile/manifest.json. the profile folder is a symlink to profile-949-link. If I instead look at profile-948-link I find a manifest.json with actual contents there.

Maintainer CC

No response

System information

~: nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.87, NixOS, 23.11 (Tapir), 23.11.6595.b500489fd3cf`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"home-manager-23.11.tar.gz, nixos-23.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@jheidbrink jheidbrink added bug triage Issues or feature request that have not been triaged yet labels Apr 28, 2024
@jheidbrink
Copy link
Author

I found that I also get this error with nix profile list:

nix profile list
error: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal

@jheidbrink
Copy link
Author

Not sure if this a home-manager issue. Anyway it seems people did encounter empty manifest.json before, and home-manager was at least involved:

NixOS/nixpkgs#18279
https://discourse.nixos.org/t/home-manager-stopped-working-on-my-non-nixos/6023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

4 participants