Skip to content

Commit

Permalink
nixos/waybar: use upstream service file
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bdf committed Aug 5, 2024
1 parent 31c76b1 commit ba0f895
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 2 additions & 6 deletions nixos/modules/programs/wayland/waybar.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ in

config = lib.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";
};
systemd.packages = [ cfg.package ];
systemd.user.services.waybar.wantedBy = [ "graphical-session.target" ];
};

meta.maintainers = [ lib.maintainers.FlorianFranzen ];
Expand Down
6 changes: 5 additions & 1 deletion pkgs/by-name/wa/waybar/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
sndio,
spdlog,
sway,
systemd,
udev,
upower,
wayland,
Expand Down Expand Up @@ -120,6 +121,7 @@ stdenv.mkDerivation (finalAttrs: {
libsigcxx
libxkbcommon
spdlog
systemd
wayland
]
++ lib.optionals cavaSupport [
Expand Down Expand Up @@ -166,13 +168,15 @@ stdenv.mkDerivation (finalAttrs: {
"pulseaudio" = pulseSupport;
"rfkill" = rfkillSupport;
"sndio" = sndioSupport;
"systemd" = false;
"systemd" = true;
"tests" = runTests;
"upower_glib" = upowerSupport;
"wireplumber" = wireplumberSupport;
})
++ lib.optional experimentalPatches (lib.mesonBool "experimental" true);

PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";

postPatch = ''
substituteInPlace include/util/command.hpp \
--replace-fail /bin/sh ${lib.getExe' bash "sh"}
Expand Down

0 comments on commit ba0f895

Please sign in to comment.