2020-04-24 23:36:52 +00:00
|
|
|
{ lib, pkgs, config, ... }:
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
let
|
|
|
|
cfg = config.programs.waybar;
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
{
|
|
|
|
options.programs.waybar = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkEnableOption "waybar, a highly customizable Wayland bar for Sway and Wlroots based compositors";
|
|
|
|
package = lib.mkPackageOption pkgs "waybar" { };
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2023-03-08 16:32:21 +00:00
|
|
|
environment.systemPackages = [ cfg.package ];
|
2020-04-24 23:36:52 +00:00
|
|
|
systemd.user.services.waybar = {
|
|
|
|
description = "Waybar as systemd service";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
partOf = [ "graphical-session.target" ];
|
2023-03-08 16:32:21 +00:00
|
|
|
script = "${cfg.package}/bin/waybar";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
meta.maintainers = [ lib.maintainers.FlorianFranzen ];
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|