The hjem module, introduced in #196, doesn't work if you don't have home-manager installed.
This is happening because install.nix is hardcoded to have the gcroots directory as $XDG_STATE_HOME/home-manager/gcroots (source). On systems without home-manager, this path won't exist, which will cause the service to repeatedly fail due to the on-failure restart policy, effectively putting the service into a failure loop, running the Flatpak CLI and failing by the end.
I don't think a similar directory to that exists in hjem, given hjem merely just copies the files to the target place and manages the systemd services. I don't know much about GC Roots, but maybe a solution could be instead manually creating the root with something similar to nix-store --add-root ".local/state/nix-flatpak-state.json" --indirect -r /nix/store/path-to-state-file? Unsure.
Thanks!
The hjem module, introduced in #196, doesn't work if you don't have home-manager installed.
This is happening because
install.nixis hardcoded to have the gcroots directory as$XDG_STATE_HOME/home-manager/gcroots(source). On systems without home-manager, this path won't exist, which will cause the service to repeatedly fail due to theon-failurerestart policy, effectively putting the service into a failure loop, running the Flatpak CLI and failing by the end.I don't think a similar directory to that exists in hjem, given hjem merely just copies the files to the target place and manages the systemd services. I don't know much about GC Roots, but maybe a solution could be instead manually creating the root with something similar to
nix-store --add-root ".local/state/nix-flatpak-state.json" --indirect -r /nix/store/path-to-state-file? Unsure.Thanks!