Skip to content

Commit

Permalink
waybar: the systemd unit is coming from the package now
Browse files Browse the repository at this point in the history
  • Loading branch information
r-vdp committed Sep 10, 2024
1 parent 57077bc commit a03d5e6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions nixos/modules/programs/wayland/waybar.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:

let
cfg = config.programs.waybar;
Expand All @@ -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" ];
};
};

Expand Down

0 comments on commit a03d5e6

Please sign in to comment.