I want to add a guest user to my desktop, but want to set up my guest account to use plasma ( I use i3 and my guest is used to a full desktop environment ).
Is there a way I can set this up to be the default on their user account, but keep my default to be just i3?
but i didn’t manage to find a way to overide that for a specific user.
what it did do was to set the system default for the little gear menu on the login screen.
in my case it was one of: [ “gnome” “gnome-xorg” “plasma” “plasmawayland” ]
if you have other DMs installed you can get this list with nix eval .#nixosConfigurations.$NIXOS_INTERNAL_HOSTNAME.config.services.xserver.displayManager.sessionData.sessionNames
so the rebuild switch worked and the symlink was there, and i also tried to cp the file but it seems to get overriden by wherever this is set: services.displayManager.defaultSession
interesting to note, it seems to be patching the file and only XSession is changed:
the override of preStart feels rather ugly, but otherwise the service will patch the users file in /var/lib/AccountsService/users/
and trump the chosen value with what is set via services.displayManager.defaultSession
@jtojnar (github handle from 5 year old commit) seemed to consciously want to override other ways of setting up these user prefs.
Maybe a home-manager config could be possible one fine day.
There is no per-user setting in GDM. There is not even a global one – GDM uses the last session used by the user as recorded by AccountsService, so we run a script that tells AccountsService to change the last session when defaultSession is set.
It should be possible to add per-user options and update the set-session.py script to support that. Pull requests welcome.
Then do not set services.displayManager.defaultSession.
/var/lib/AccountsService is out of scope of home-manager. You can use systemd.tmpfiles.rules NixOS option to create files anywhere on the system.