mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
waybar: make the systemd target that pulls in waybar configurable (#399673)
This commit is contained in:
@@ -16,13 +16,20 @@ in
|
||||
// lib.mkOption {
|
||||
apply = pkg: pkg.override { systemdSupport = true; };
|
||||
};
|
||||
systemd.target = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The systemd target that will automatically start the Waybar service.
|
||||
'';
|
||||
default = "graphical-session.target";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
systemd = {
|
||||
packages = [ cfg.package ];
|
||||
user.services.waybar.wantedBy = [ "graphical-session.target" ];
|
||||
user.services.waybar.wantedBy = [ cfg.systemd.target ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user