mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 01:19:32 +08:00
wayland: create tray.target if xsession is not enabled (#6332)
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.
This commit is contained in:
committed by
GitHub
parent
f99c704fe3
commit
4337992712
@@ -312,12 +312,5 @@ in {
|
||||
[ "xdg-desktop-autostart.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.targets.tray = {
|
||||
Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -553,13 +553,6 @@ in {
|
||||
optional cfg.systemd.xdgAutostart "xdg-desktop-autostart.target";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.targets.tray = {
|
||||
Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -201,12 +201,5 @@ in {
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.targets.tray = {
|
||||
Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -189,12 +189,5 @@
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.targets.tray = {
|
||||
Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.thiagokokada ];
|
||||
@@ -21,4 +21,8 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (!config.xsession.enable) {
|
||||
systemd.user.targets.tray = config.xsession.trayTarget;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,6 +13,20 @@ in {
|
||||
xsession = {
|
||||
enable = mkEnableOption "X Session";
|
||||
|
||||
trayTarget = mkOption {
|
||||
readOnly = true;
|
||||
internal = true;
|
||||
visible = false;
|
||||
description = "Common tray.target for both xsession and wayland";
|
||||
type = types.attrs;
|
||||
default = {
|
||||
Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
scriptPath = mkOption {
|
||||
type = types.str;
|
||||
default = ".xsession";
|
||||
@@ -163,12 +177,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
tray = {
|
||||
Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
};
|
||||
tray = cfg.trayTarget;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user