-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
treewide: standardize Wayland graphical services #6239
treewide: standardize Wayland graphical services #6239
Conversation
…ConditionEnvironment
@@ -37,6 +37,19 @@ in { | |||
|
|||
systemd = mkEnableOption "systemd service and socket for wob" | |||
// mkOption { default = true; }; | |||
|
|||
systemdTarget = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
systemd
is sadly already used to enable the service above, so using systemdTarget
instead to avoid breaking changes.
CC @rycee. |
This is good. If I had a say in it I'd create an option like "wayland.systemdTarget" and make all the options default to this one. What do you think? Then we end up with the hardest problem in programming... Naming things. |
Thanks @thiagokokada for taking on this. It has indeed become quite the mess. I'll have a deeper look at this PR as soon as possible. I think @Lillecarl's idea to have a common That said, there is something fundamentally wrong somewhere if we cannot use |
I initially had the same idea, but was against it because it would be more work (e.g.: deprecating old options). But if this is the way we want to do things I can redo this work this way instead.
To be clear, |
BTW, |
Everything should work just fine on graphical-session.target, but considering the target audience (people who run "not in [ kde gnome ] I think having the option available is a good thing.
You can just set "default = config.wayland.systemdTarget" in all options that already exist, you don't need to deprecate them. Then again, they're just one mkForce away if they're deprecated and removed. |
I know, but unless we deprecate the old options the inconsistency will exist and folks will find new and creative ways to abuse the old target (like this one #6241, that I find it would be better done by disabling the |
Ok, I created a |
Description
Graphical services that are meant for Wayland environment are all over the place:
After = [ "graphical-session-pre.target" ]
, that is almost always a mistake (see), others setAfter = [ "graphical-session.target" ]
systemd.target
(orsystemdTarget
) to allow changing the default target, some does notConditionEnvironment = "WAYLAND_DISPLAY"
, some does notThis PR tries to standardize this by:
systemd.target
to services missing it, and defaulting it tographical-session.target
After
,PartOf
andWanted
tocfg.systemd.target
ConditionEnvironment = "WAYLAND_DISPLAY"
for services missing itChecklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
ornix develop --ignore-environment .#all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC