mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-06 16:57:03 +00:00
Create a internal/read-only trayTarget option for the xsession, which is also used in wayland's config, if the former is not enabled. Remove all other definitions of `systemd.user.targets.tray`, i. e, the ones from the following modules: hyprland, sway, river and wayfire.
28 lines
883 B
Nix
28 lines
883 B
Nix
{ config, lib, ... }:
|
|
|
|
{
|
|
meta.maintainers = [ lib.maintainers.thiagokokada ];
|
|
|
|
options = {
|
|
wayland = {
|
|
systemd.target = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "graphical-session.target";
|
|
example = "sway-session.target";
|
|
description = ''
|
|
The systemd target that will automatically start the graphical Wayland services.
|
|
This option is a generalization of individual `systemd.target` or `systemdTarget`,
|
|
and affect all Wayland services by default.
|
|
|
|
When setting this value to `"sway-session.target"`,
|
|
make sure to also enable {option}`wayland.windowManager.sway.systemd.enable`,
|
|
otherwise the service may never be started.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf (!config.xsession.enable) {
|
|
systemd.user.targets.tray = config.xsession.trayTarget;
|
|
};
|
|
}
|