mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
26 lines
589 B
Nix
26 lines
589 B
Nix
{ lib, pkgs, config, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.programs.waybar;
|
|
in
|
|
{
|
|
options.programs.waybar = {
|
|
enable = mkEnableOption (lib.mdDoc "waybar");
|
|
package = mkPackageOption pkgs "waybar" { };
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ cfg.package ];
|
|
systemd.user.services.waybar = {
|
|
description = "Waybar as systemd service";
|
|
wantedBy = [ "graphical-session.target" ];
|
|
partOf = [ "graphical-session.target" ];
|
|
script = "${cfg.package}/bin/waybar";
|
|
};
|
|
};
|
|
|
|
meta.maintainers = [ maintainers.FlorianFranzen ];
|
|
}
|