2024-12-10 20:26:33 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2021-07-12 15:34:26 +08:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.systembus-notify;
|
|
|
|
|
|
|
|
inherit (lib) mkEnableOption mkIf;
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.services.systembus-notify = {
|
2024-04-13 14:54:15 +02:00
|
|
|
enable = mkEnableOption ''
|
2021-07-12 15:34:26 +08:00
|
|
|
System bus notification support
|
|
|
|
|
|
|
|
WARNING: enabling this option (while convenient) should *not* be done on a
|
|
|
|
machine where you do not trust the other users as it allows any other
|
2023-10-18 22:59:26 +02:00
|
|
|
local user to DoS your session by spamming notifications
|
2024-04-13 14:54:15 +02:00
|
|
|
'';
|
2021-07-12 15:34:26 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
systemd = {
|
|
|
|
packages = with pkgs; [ systembus-notify ];
|
|
|
|
|
|
|
|
user.services.systembus-notify.wantedBy = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|