mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
waybar: include the systemd user unit (#340874)
This commit is contained in:
commit
e677e7056c
@ -1,4 +1,9 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.programs.waybar;
|
||||
@ -11,11 +16,9 @@ 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 ];
|
||||
user.services.waybar.wantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -179,13 +179,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"}
|
||||
|
Loading…
Reference in New Issue
Block a user