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:
parent
d8e2fdc09c
commit
b74b22bb61
1 changed files with 26 additions and 22 deletions
|
|
@ -218,31 +218,35 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.enable = mkEnableOption "Waybar systemd integration";
|
systemd = {
|
||||||
|
enable = mkEnableOption "Waybar systemd integration";
|
||||||
|
|
||||||
systemd.target = mkOption {
|
enableDebug = mkEnableOption "debug logging";
|
||||||
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"`,
|
enableInspect = mkOption {
|
||||||
make sure to also enable {option}`wayland.windowManager.sway.systemd.enable`,
|
type = bool;
|
||||||
otherwise the service may never be started.
|
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 {
|
See <https://developer.gnome.org/documentation/tools/inspector.html>
|
||||||
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;
|
||||||
|
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 {
|
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";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue