Home Manager Blues

My home manager stopped functioning, as demonstrated by the rebuild log.

août 04 16:10:18 glass systemd[1]: home-manager-gaditone.service: Main process exited, code=exited, status=1/FAILURE
août 04 16:10:18 glass systemd[1]: home-manager-gaditone.service: Failed with result 'exit-code'.
août 04 16:10:19 glass systemd[1]: Failed to start Home Manager environment for gaditone.

I complied with the error message, (RTFeM), adding this to my flake:

home-manager.backupFileExtension = “rebuild”;

home-manager.nixosModules.home-manager 
    {
      home-manager.useGlobalPkgs = true;
      home-manager.useUserPackages = true;
      home-manager.users.gaditone.imports = [ ./home_manager/home.nix nix-index-database.hmModules.nix-index ];
      home-manager.sharedModules = [ nixvim.homeManagerModules.nixvim ];
      home-manager.backupFileExtension = "rebuild";
      home-manager.extraSpecialArgs = {inherit inputs;};
    }
  ];

And, lo and behold, all is now well. I am just curious if there is a good learning resource regarding systemd & Nixos. I am particularly clueless in this matter…

1 Like

Are you looking for general resources, or the cause of the home-manager error? It was due to a file collision under ~/. The backupFileExtension option is what home-manager appends to the name of the file being replaced, now being set declaratively.

1 Like

Thanks Tmplt…I suppose in my imagination I’d like a huge 1000 page plus Nixos tome, with a couple of pages devoted to this sort of thing. It’s embarrassing, but sometimes I feel hopelessly lost in the Nixos undergrowth.

You’d be able to see the error message telling you about the backup thing with:

journalctl -xe --unit home-manager-gaditone.service

I think the output being cut off before any useful info is shown is a somewhat recent bug.

Not really. The closest we have is the NixOS manual, which is both too high-level in parts and does not have enough manual-style contents elsewhere. Systemd itself has rather decent man pages, and lots of tutorials online, but that would not have helped you here.

Don’t worry though, the feeling that there just isn’t good learning material is a common sentiment. For now, ask here when you are stuck, and you’ll get there over time.

1 Like