1{ config, lib, pkgs, ... }:
2
3let
4 cfg = config.services.systembus-notify;
5
6 inherit (lib) mkEnableOption mkIf;
7
8in
9{
10 options.services.systembus-notify = {
11 enable = mkEnableOption (lib.mdDoc ''
12 System bus notification support
13
14 WARNING: enabling this option (while convenient) should *not* be done on a
15 machine where you do not trust the other users as it allows any other
16 local user to DoS your session by spamming notifications.
17 '');
18 };
19
20 config = mkIf cfg.enable {
21 systemd = {
22 packages = with pkgs; [ systembus-notify ];
23
24 user.services.systembus-notify.wantedBy = [ "graphical-session.target" ];
25 };
26 };
27}