1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-09 03:56:04 +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,9 +218,23 @@ in
''; '';
}; };
systemd.enable = mkEnableOption "Waybar systemd integration"; systemd = {
enable = mkEnableOption "Waybar systemd integration";
systemd.target = mkOption { enableDebug = mkEnableOption "debug logging";
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>
'';
};
target = mkOption {
type = str; type = str;
default = config.wayland.systemd.target; default = config.wayland.systemd.target;
defaultText = literalExpression "config.wayland.systemd.target"; defaultText = literalExpression "config.wayland.systemd.target";
@ -233,16 +247,6 @@ in
otherwise the service may never be started. otherwise the service may never be started.
''; '';
}; };
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>
'';
}; };
style = mkOption { style = mkOption {
@ -357,7 +361,7 @@ in
Service = { Service = {
Environment = optional cfg.systemd.enableInspect "GTK_DEBUG=interactive"; Environment = optional cfg.systemd.enableInspect "GTK_DEBUG=interactive";
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID"; 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"; KillMode = "mixed";
Restart = "on-failure"; Restart = "on-failure";
}; };