Merge pull request #218921 from wineee/waybar
nixos/waybar: allow change waybar package to use
This commit is contained in:
commit
944436f290
@ -2,17 +2,22 @@
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.waybar;
|
||||
in
|
||||
{
|
||||
options.programs.waybar = {
|
||||
enable = mkEnableOption (lib.mdDoc "waybar");
|
||||
package = mkPackageOptionMD pkgs "waybar" { };
|
||||
};
|
||||
|
||||
config = mkIf config.programs.waybar.enable {
|
||||
config = 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 = "${pkgs.waybar}/bin/waybar";
|
||||
script = "${cfg.package}/bin/waybar";
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user