diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-03-20 23:38:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-20 23:38:04 +0000 |
commit | 0cd7f32a4cd62c068641dfbffb48e428888a65bc (patch) | |
tree | ca31844e9e4bbb90a684eabd4d3342acc29f7619 | |
parent | 33860cb9f3c6e7cc81e04f40d72a18598e5bd328 (diff) | |
parent | 52d0db7e73904d9e06cc5b7ba2fae8b442b69e98 (diff) |
Merge pull request #54627 from FlorianFranzen/waybar
waybar: init at 0.4.0
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/waybar.nix | 20 | ||||
-rw-r--r-- | pkgs/applications/misc/waybar/default.nix | 43 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
4 files changed, 68 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 845b3adaac8a..91645a57b496 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -137,6 +137,7 @@ ./programs/vim.nix ./programs/wavemon.nix ./programs/way-cooler.nix + ./programs/waybar.nix ./programs/wireshark.nix ./programs/xfs_quota.nix ./programs/xonsh.nix diff --git a/nixos/modules/programs/waybar.nix b/nixos/modules/programs/waybar.nix new file mode 100644 index 000000000000..22530e6c7d4d --- /dev/null +++ b/nixos/modules/programs/waybar.nix @@ -0,0 +1,20 @@ +{ lib, pkgs, config, ... }: + +with lib; + +{ + options.programs.waybar = { + enable = mkEnableOption "waybar"; + }; + + config = mkIf config.programs.waybar.enable { + systemd.user.services.waybar = { + description = "Waybar as systemd service"; + wantedBy = [ "graphical-session.target" ]; + partOf = [ "graphical-session.target" ]; + script = "${pkgs.waybar}/bin/waybar"; + }; + }; + + meta.maintainers = [ maintainers.FlorianFranzen ]; +} diff --git a/pkgs/applications/misc/waybar/default.nix b/pkgs/applications/misc/waybar/default.nix new file mode 100644 index 000000000000..dcc77604e6ea --- /dev/null +++ b/pkgs/applications/misc/waybar/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja +, wayland, wlroots, gtkmm3, libinput, libsigcxx, jsoncpp, fmt +, traySupport ? true, libdbusmenu-gtk3 +, pulseSupport ? false, libpulseaudio +, nlSupport ? true, libnl +, swaySupport ? true, sway +}: + stdenv.mkDerivation rec { + name = "waybar-${version}"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "Alexays"; + repo = "Waybar"; + rev = version; + sha256 = "0vkx1b6bgr75wkx89ppxhg4103vl2g0sky22npmfkvbkpgh8dj38"; + }; + + nativeBuildInputs = [ + meson ninja pkgconfig + ]; + + buildInputs = with stdenv.lib; + [ wayland wlroots gtkmm3 libinput libsigcxx jsoncpp fmt ] + ++ optional traySupport libdbusmenu-gtk3 + ++ optional pulseSupport libpulseaudio + ++ optional nlSupport libnl + ++ optional swaySupport sway; + + mesonFlags = [ + "-Ddbusmenu-gtk=${ if traySupport then "enabled" else "disabled" }" + "-Dpulseaudio=${ if pulseSupport then "enabled" else "disabled" }" + "-Dlibnl=${ if nlSupport then "enabled" else "disabled" }" + "-Dout=${placeholder "out"}" + ]; + + meta = with stdenv.lib; { + description = "Highly customizable Wayland bar for Sway and Wlroots based compositors"; + license = licenses.mit; + maintainers = [ maintainers.FlorianFranzen ]; + platforms = platforms.unix; + }; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cffe876c0199..6e6ac37ec8cb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17759,6 +17759,10 @@ in swayidle = callPackage ../applications/window-managers/sway/idle.nix { }; swaylock = callPackage ../applications/window-managers/sway/lock.nix { }; + waybar = callPackage ../applications/misc/waybar { + pulseSupport = config.pulseaudio or false; + }; + velox = callPackage ../applications/window-managers/velox { stConf = config.st.conf or null; stPatches = config.st.patches or null; |