waybar: use config.wayland.systemd.target
Also add `ConditionEnvironment`.
This commit is contained in:
parent
89fe48b1c1
commit
8587c2ff0e
7 changed files with 12 additions and 19 deletions
|
@ -199,7 +199,8 @@ in {
|
||||||
|
|
||||||
systemd.target = mkOption {
|
systemd.target = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = "graphical-session.target";
|
default = config.wayland.systemd.target;
|
||||||
|
defaultText = literalExpression "config.wayland.systemd.target";
|
||||||
example = "sway-session.target";
|
example = "sway-session.target";
|
||||||
description = ''
|
description = ''
|
||||||
The systemd target that will automatically start the Waybar service.
|
The systemd target that will automatically start the Waybar service.
|
||||||
|
@ -309,8 +310,9 @@ in {
|
||||||
Description =
|
Description =
|
||||||
"Highly customizable Wayland bar for Sway and Wlroots based compositors.";
|
"Highly customizable Wayland bar for Sway and Wlroots based compositors.";
|
||||||
Documentation = "https://github.com/Alexays/Waybar/wiki";
|
Documentation = "https://github.com/Alexays/Waybar/wiki";
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = [ cfg.systemd.target ];
|
||||||
After = [ "graphical-session-pre.target" ];
|
After = [ cfg.systemd.target ];
|
||||||
|
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||||
X-Restart-Triggers = optional (settings != [ ])
|
X-Restart-Triggers = optional (settings != [ ])
|
||||||
"${config.xdg.configFile."waybar/config".source}"
|
"${config.xdg.configFile."waybar/config".source}"
|
||||||
++ optional (cfg.style != null)
|
++ optional (cfg.style != null)
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
home.stateVersion = "21.11";
|
home.stateVersion = "21.11";
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -8,7 +8,8 @@ KillMode=mixed
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
After=graphical-session-pre.target
|
After=sway-session.target
|
||||||
|
ConditionEnvironment=WAYLAND_DISPLAY
|
||||||
Description=Highly customizable Wayland bar for Sway and Wlroots based compositors.
|
Description=Highly customizable Wayland bar for Sway and Wlroots based compositors.
|
||||||
Documentation=https://github.com/Alexays/Waybar/wiki
|
Documentation=https://github.com/Alexays/Waybar/wiki
|
||||||
PartOf=graphical-session.target
|
PartOf=sway-session.target
|
||||||
|
|
Loading…
Reference in a new issue