I'd like to hear your thoughts on systemd-homed...
Welcome, Guest.
“Theory and practice sometimes clash. And when that happens, theory loses. Every single time.” ― Linus Torvalds

Author Topic: I'd like to hear your thoughts on systemd-homed...  (Read 953 times)

Offline Will

  • Spatry's Tardis Operator
  • Contributor
  • *******
  • Posts: 498
  • Chronic Distro Hopper
I'd like to hear your thoughts on systemd-homed...
« on: October 18, 2019, 09:14:29 AM »
Article posted here

Small extract from the article displaying what it will do:

Quote
So instead of each component having its own configuration for all users, systemd-homed is going to collect all the configuration data of each component based on the user itself, and store it in a user-specific record in form of a JSON file. The file will include all the obvious information such as username, group membership, and password hashes, but also any user-dependent system configurations and resource management information, and essentially really just anything relevant. Being JSON, it can virtually contain whatever you want to put there, meaning it is easily extendable whenever new features and capabilities are required. No need to wonder anymore which of those three dozen files you need to touch if you want to change something.

In addition to user and user-based system management, the home directory itself will be linked to it as a LUKS encrypted container — and this is where the interesting part comes, even if you don’t see a need for a unified configuration place: the encryption is directly coupled to the user login itself, meaning not only is the disk automatically decrypted once the user logs in, it is equally automatic encrypted again as soon as the user logs out, locks the screen, or suspends the device. In other words, your data is inaccessible and secure whenever you’re not logged in, while the operating system can continue to operate independently from that.

The article has more information that should be read, but I don't want this post to end up too long. Personally, I'm not really for using this, as I didn't expect systemd to still be developing that office suite we wanted when it first came into our distributions.

I'd like to hear your thoughts on this.
Ryzen 7 2700x, 32GB(3600MHz), 500GB 850 EVO, Sapphire Nitro+ RX 580 + EVGA Geforce GTX 1080 | Gentoo

Offline CwF

  • Elite Member
  • *****
  • Posts: 421
Re: I'd like to hear your thoughts on systemd-homed...
« Reply #1 on: October 18, 2019, 10:57:37 AM »
I'm watching closely.
 I've posted on moving an installation from computer to computer, the concepts of a universal image, the blurry usage as a device=file=directory= as mentioned here LUKS container, so this is right up my alley.
 The ability I want addressed is hardware allocation according to user instead of machine. It's confusing maybe to imagine, but lots of configuration is blurred between the user config and the machine itself, or simply put, within /home or outside /home. Xorg stuff for example, exist in multiple locations including /home. There are many thing like this, ssh mentioned, that (needlessly) tie the user and machine together. DE's for example may have hardware monitors that are ultimately tied to configurations outside home.

So far I use 'users' to enable my images to work 'oob' on different hardware. So I take an image, booted in a vm is logged on as user and expect it to have a properly configured network, video, sound, etc. The same image written to a disk and placed in a real machine (or by usb), and then expect it to also self-configure correctly using a different user. The current issue is there is little to no user to/from system communication in order to conditionally configure.

 Explaining what I have working would be longer than that article but the concept is pretty simple. Any and all systemd confid on the machine should be able to accept 'hints' from some user config within /home.

 For example /etc/systemd/network can have hint files to configure interfaces, mine have a dozen 'link' files and works to consistently name interfaces for which the users config matches. So no changing names is required once in the user interface. I'd like some form of /home/user/.systemd/network to also contain 'links', or in this case 'hint' files to rename according to user. This is above and beyond typical "need", but a simple extension from the idea.

 Xorg is a little more difficult. I have the network naming above working without any boot interruption. But xorg so far has no facility to conditionally use particular hardware in a particular way. Side note here, this is why I use no proprietary drivers. If you specify busid for example in an xorg config, and the hardware is absent, you're left at a prompt. If there was a hint file with the busid within /home, then you boot the proper user = but xorg starts up before much is known from the /home, so we have a situation similar to the ssh chicken/egg example. This pipe dream needs rewrites of any DM to be more like grub = limited to boot initialized hardware and not the ultimate choice. Again, this is a rare scenario.

So I'm working on it from a different angle but the mechanisms are the same. While homed will allow a user to plug into any system and operate as expected, I'm on the next step of booting the entire image on any system and using a corresponding user, as expected.

To make a long story longer; for me this universal image method allows me to quickly assess hardware issues. Instead of testing in parallel on two systems, I can use the SAME image on the two systems, so errors are specific to hardware and not some unforeseen difference in the OS. If this makes sense...So something crashes on computer A, I move the image to computer B and retest. Same crash suggest a software issue, for which I now have two sets of data to decipher. Or, no crash on B, so the culprit is the hardware configuration on A.
 Here's the insult, portable XP has had this ability for a very very long time.

Offline Will

  • Spatry's Tardis Operator
  • Contributor
  • *******
  • Posts: 498
  • Chronic Distro Hopper
Re: I'd like to hear your thoughts on systemd-homed...
« Reply #2 on: October 18, 2019, 06:34:09 PM »
Thanks for the interesting read. For your use case, it seems like it could be a very good feature if done correctly.
Ryzen 7 2700x, 32GB(3600MHz), 500GB 850 EVO, Sapphire Nitro+ RX 580 + EVGA Geforce GTX 1080 | Gentoo