1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

waybar: add debug option

This commit is contained in:
Austin Horstman 2025-04-11 13:50:24 -05:00
parent d8e2fdc09c
commit b74b22bb61

View file

@ -218,31 +218,35 @@ in
'';
};
systemd.enable = mkEnableOption "Waybar systemd integration";
systemd = {
enable = mkEnableOption "Waybar systemd integration";
systemd.target = mkOption {
type = str;
default = config.wayland.systemd.target;
defaultText = literalExpression "config.wayland.systemd.target";
example = "sway-session.target";
description = ''
The systemd target that will automatically start the Waybar service.
enableDebug = mkEnableOption "debug logging";
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.
'';
};
enableInspect = mkOption {
type = bool;
default = false;
example = true;
description = ''
Inspect objects and find their CSS classes, experiment with live CSS styles, and lookup the current value of CSS properties.
systemd.enableInspect = mkOption {
type = bool;
default = false;
example = true;
description = ''
Inspect objects and find their CSS classes, experiment with live CSS styles, and lookup the current value of CSS properties.
See <https://developer.gnome.org/documentation/tools/inspector.html>
'';
};
See <https://developer.gnome.org/documentation/tools/inspector.html>
'';
target = mkOption {
type = str;
default = config.wayland.systemd.target;
defaultText = literalExpression "config.wayland.systemd.target";
example = "sway-session.target";
description = ''
The systemd target that will automatically start the Waybar service.
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.
'';
};
};
style = mkOption {
@ -357,7 +361,7 @@ in
Service = {
Environment = optional cfg.systemd.enableInspect "GTK_DEBUG=interactive";
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
ExecStart = "${cfg.package}/bin/waybar";
ExecStart = "${cfg.package}/bin/waybar${lib.optionalString cfg.systemd.enableDebug " -l debug"}";
KillMode = "mixed";
Restart = "on-failure";
};