nixpkgs/nixos/modules/programs/wayland/waybar.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
591 B
Nix
Raw Normal View History

2019-02-12 12:03:07 +01:00
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.programs.waybar;
in
2019-02-12 12:03:07 +01:00
{
options.programs.waybar = {
enable = mkEnableOption (lib.mdDoc "waybar");
package = mkPackageOptionMD pkgs "waybar" { };
2019-02-12 12:03:07 +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" ];
script = "${cfg.package}/bin/waybar";
2019-02-12 12:03:07 +01:00
};
};
meta.maintainers = [ maintainers.FlorianFranzen ];
}