2019-02-12 11:03:07 +00:00
|
|
|
{ lib, pkgs, config, ... }:
|
|
|
|
|
2023-03-01 03:00:01 +00:00
|
|
|
let
|
|
|
|
cfg = config.programs.waybar;
|
|
|
|
in
|
2019-02-12 11:03:07 +00:00
|
|
|
{
|
|
|
|
options.programs.waybar = {
|
2024-04-17 12:37:58 +01:00
|
|
|
enable = lib.mkEnableOption "waybar, a highly customizable Wayland bar for Sway and Wlroots based compositors";
|
|
|
|
package = lib.mkPackageOption pkgs "waybar" { };
|
2019-02-12 11:03:07 +00:00
|
|
|
};
|
|
|
|
|
2024-04-17 12:37:58 +01:00
|
|
|
config = lib.mkIf cfg.enable {
|
2023-03-01 03:00:01 +00:00
|
|
|
environment.systemPackages = [ cfg.package ];
|
2019-02-12 11:03:07 +00:00
|
|
|
systemd.user.services.waybar = {
|
|
|
|
description = "Waybar as systemd service";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
partOf = [ "graphical-session.target" ];
|
2023-03-01 03:00:01 +00:00
|
|
|
script = "${cfg.package}/bin/waybar";
|
2019-02-12 11:03:07 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-17 12:37:58 +01:00
|
|
|
meta.maintainers = [ lib.maintainers.FlorianFranzen ];
|
2019-02-12 11:03:07 +00:00
|
|
|
}
|