-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HM module: bind mounts not working with HM xsession #20
Comments
So I just did a quick test and did some reading on systemd. For me changing the Since I don't quite understand why |
The reasoning behind @rycee Do you know if there's a reason |
From what I understand making the unit Here's what systemd.unit(5) has to say:
Also I don't feel like impermanence should depend on a graphical-session at all. |
Oh, right, I got it confused with |
Um, wait, no |
While playing with the Home Manager module of impermanence I ran into an issue with the systemd user services used by impermanence to do the bind mounts where the mounts seemingly do not work in a graphical session.
After further investigation I noticed that the mounts actually work fine but the systemd services immediately get stopped after a graphical login using HM's xsession module.
Home Manager creates two files that are involved in starting an X session:
~/.xsession
and~/.xprofile
.(Depending on the system configuration) the display manager executes
.xsession
which in turn sources.xprofile
..xsession
:.xprofile
:So upon login using a display manager HM actually stops the user services
graphical-session.target
andgraphical-session-pre.target
.According to my research this leads to the following systemd user targets being reached in this order when doing a graphical login:
default.target
graphical-session-pre.target
graphical-session.target
impermanence generates systemd user service descriptions that are:
WantedBy=default.target
PartOf=graphical-session-pre.target
From what I understand this means that those services get executed to reach
default.target
and get stopped whengraphical-session-pre.target
ist stopped.So in combination this leads to the observed behavior of the bind mounts immediately getting unmounted upon graphical login.
In my opinion HM doing the
systemctl --user stop
thing in.xprofile
is questionable.I'm posting the issue with the impermanence project nonetheless because I'm not sure using
PartOf=graphical-session-pre.target
is the correct way to handle the unmounting.Since I don't know much about systemd I'm not even sure what an alternative would be. But I wonder why the mount services are not stopped with
default.target
?The text was updated successfully, but these errors were encountered: