diff --git a/nixos/modules/programs/wayland/waybar.nix b/nixos/modules/programs/wayland/waybar.nix index ab811994be073..35c5cc86f3b4d 100644 --- a/nixos/modules/programs/wayland/waybar.nix +++ b/nixos/modules/programs/wayland/waybar.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let cfg = config.programs.waybar; @@ -11,11 +16,9 @@ in config = lib.mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; - systemd.user.services.waybar = { - description = "Waybar as systemd service"; - wantedBy = [ "graphical-session.target" ]; - partOf = [ "graphical-session.target" ]; - script = "${cfg.package}/bin/waybar"; + systemd = { + packages = [ cfg.package ]; + user.services.waybar.wantedBy = [ "graphical-session.target" ]; }; };