From 7d5746482ee28ffcb1040823ae661d48884dd276 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Mon, 26 Aug 2024 21:58:18 +0200 Subject: [PATCH] home: Correct bar systemd service --- home/config/nil/bar.nix | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/home/config/nil/bar.nix b/home/config/nil/bar.nix index b0e117e..9b15761 100644 --- a/home/config/nil/bar.nix +++ b/home/config/nil/bar.nix @@ -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" ]; }; }; };