Switching to systemd-homed on Fedora 41
I decided to switch from the normal, decades-old filesystem logic of the home directory, and instead use the relatively new technology of systemd-homed. "But Ben, why would you do that?" you may be wondering, and you would be right to do so. But I like to tinker, jump to the newest technologies, to figure out things that don't have a lot of documentation yet. It was also an in-place way for me to be able to encrypt my home directory, since I didn't want to do a full reinstall.
The process set out by systemd itself is what I used, and its great. There are just a few tweaks needed because of the way Fedora does acts.
The first is just documenting the process in Fedora for when the systemd author's save "Preparations: make sure you run a distribution that has systemd-homed
enabled and properly set up, including the necessary PAM and NSS configuration updates."
What does that mean in Fedora? sudo authselect enable-feature with-systemd- homed local
will set up the necessary PAM/NSS hooks to allow you to login with your systemd-homed.
One of the main prerequisites is the ability to login as root on the console. Fedora disables that by default, but all you need to do is set a password for root.
sudo passwd root
And then you can follow along with their steps. The last edit is such a tiny one, but it took up a lot of time to fix. Edit their "homectl with foobar" command to delete the trailing slash off of the source location for the rsync command:
homectl with foobar -- rsync -aHANUXv --remove-source-files /home/foobar.saved .
If you leave the trailing slash in there, it creates foobar.saved
inside of your of your new home directory; therefore, Fedora pops up with its post-install configuration instead of your previous configuration. So I had to rsync the files back to foobar.saved
and then rsync them back to the correct position. But once I did that, everything was great.
Hope this helps!