24 lines
536 B
Nix
24 lines
536 B
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
waybarPath = "${pkgs.waybar}/bin/waybar";
|
|
in
|
|
{
|
|
# Enable a user systemd service for Waybar
|
|
systemd.user.services.waybar = {
|
|
description = "Waybar for Hyprland";
|
|
after = [ "graphical.target" ];
|
|
|
|
serviceConfig = {
|
|
ExecStart = "${waybarPath}";
|
|
Restart = "always";
|
|
Environment = [
|
|
"WAYLAND_DISPLAY=${config.environment.sessionVariables.WAYLAND_DISPLAY or "wayland-0"}"
|
|
"XDG_CURRENT_DESKTOP=Hyprland"
|
|
];
|
|
};
|
|
|
|
wantedBy = [ "default.target" ];
|
|
};
|
|
}
|