2020-04-24 23:36:52 +00:00
|
|
|
{ lib, pkgs, config, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
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-04-21 15:54:59 +00:00
|
|
|
enable = mkEnableOption "waybar, a highly customizable Wayland bar for Sway and Wlroots based compositors";
|
2024-01-02 11:29:13 +00:00
|
|
|
package = mkPackageOption pkgs "waybar" { };
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
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
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta.maintainers = [ maintainers.FlorianFranzen ];
|
|
|
|
}
|