home: Correct bar systemd service

This commit is contained in:
Mikael 2024-08-26 21:58:18 +02:00
parent e448f90b66
commit 7d5746482e
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0

View file

@ -14,6 +14,8 @@ let
in lib.mkIf (osConfig.hardware.graphics.enable or false) {
programs.waybar = {
enable = true;
systemd.enable = true;
package = pkgs.waybar.override {
cavaSupport = false;
hyprlandSupport = false;
@ -280,27 +282,11 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
};
};
systemd.user.services = {
waybar = {
Unit = {
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
BindsTo = [ "tray.target" ];
Before = [ "tray.target" ];
};
Service = {
Type = "exec";
ExecStart = lib.getExe config.programs.waybar.package;
};
};
};
systemd.user.targets = {
tray = {
Unit = {
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
BindsTo = [ "waybar.service" ];
After = [ "waybar.service" ];
};
};
};