Systemd-homed on atomic desktops?

systemd-homed.service is a service included with systemd which promises a better way of handling /var/home user directories…

The user-facing command to use it is homectl

It supports LUKS-encrypted home directories (individual encryption per-user) which can’t be circumvented by just running as root.

It supports traditional directories too… if individual encryption isn’t for you…

It stores all the user-metadata in ~/.identity rather than /etc/{passwd,shadow,group,gshadow}, in the JSON format.

The home directory (or LUKS image file) is portable across different systems, but unfortunately this is just in theory for now; Requiring a few more hacks etc.. for actually moving/copying a homedir to another system.

Can I use it? IK that some SELinux issues persisted… I can rpm-ostree usroverlay and fix the issues manually, but still, is the issue still there?

Is anyone interested in this systemd-homed concept?

I have a home directory I use on 2 laptops and one desktop, which work great. Things to take note on:

  • You have to copy the public key where you created the home user to the system you want to migrate to for login. To successfully change home records on any system, you need both private and public keys. I store both on my encrypted home directory for additional portability.

  • UID’s change from system to system.

  • Podman creates it’s files dependant on UID. So containers,etc. won’t migrate as expected. There are workarounds.

  • User flatpaks work as they should.

  • Login avatars don’t work yet, but is being worked on.

  • After creating your home user, you should relabel the home directory to assure normal operations.

Selinux issues should be resolved for normal uses. If you find any please report them. In general I think it’s a great concept and option to have.

The one drawback to true portability…

Can’t I manually assign the UID? Like via --uid flag to homectl?
As for podman, can’t I just chown things? No chmod so mode is intact…
But yes IDK how to deal with subuid/subgid…

Expected;

Some things are better handled by systemd-userdbd state directories etc… rather than random places under $HOME… but who listens?

There’s already a solution for that, if anyone is willing to follow: User Record Blob Directories

Huh! Some help plz..

I didn’t understand; IDK SELinux

Of course…

BTW, my /var/home will a bcache i.e. HDD cached by SSD…
I will use ext4 for it; LUKS-encrypted systemd-homed volumes will use btrfs.

Do you any other suggestions other than ext4?

Systems Display Managers still need to implement the changes for it to work.

New home directories created by homectl will not correctly label the home directory.

  • After creating you new home and logging in you should enter:
    restorecon -vR ${HOME}

This command should relabel your home directory so that it’s currently the same as creating a new home directory with commandline program like adduser or desktop equivalent.

That would depend on your uses.

The issues…
I don’t have such a 2-system setup anyways…

That’s what I meant.
Half are lazy, other half are in the “systemd bad” idea.

Thanks,
that’s all I need…

Could you let me know of what you use on your system? For the backing /home and for the $HOME in the LUKS image?