2019-02-12 12:03:07 +01:00
|
|
|
{ lib, pkgs, config, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2023-03-01 04:00:01 +01:00
|
|
|
let
|
|
|
|
cfg = config.programs.waybar;
|
|
|
|
in
|
2019-02-12 12:03:07 +01:00
|
|
|
{
|
|
|
|
options.programs.waybar = {
|
|
|
|
enable = mkEnableOption (lib.mdDoc "waybar");
|
2023-03-01 04:00:01 +01:00
|
|
|
package = mkPackageOptionMD pkgs "waybar" { };
|
2019-02-12 12:03:07 +01:00
|
|
|
};
|
|
|
|
|
2023-03-01 04:00:01 +01:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
2019-02-12 12:03:07 +01:00
|
|
|
systemd.user.services.waybar = {
|
|
|
|
description = "Waybar as systemd service";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
partOf = [ "graphical-session.target" ];
|
2023-03-01 04:00:01 +01:00
|
|
|
script = "${cfg.package}/bin/waybar";
|
2019-02-12 12:03:07 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta.maintainers = [ maintainers.FlorianFranzen ];
|
|
|
|
}
|