diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b897cc516..c3344f119 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -390,6 +390,8 @@ /modules/services/volnoti.nix @IvanMalison +/modules/services/systembus-notify.nix @asymmetric + /modules/targets/darwin @midchildan /tests/modules/targets-darwin @midchildan diff --git a/modules/misc/news.nix b/modules/misc/news.nix index 19957f9cf..d910f9547 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -2320,6 +2320,14 @@ in A new module is available: 'services.opensnitch-ui'. ''; } + + { + time = "2021-12-21T22:17:30+00:00"; + condition = hostPlatform.isLinux; + message = '' + A new module is available: 'services.systembus-notify'. + ''; + } ]; }; } diff --git a/modules/modules.nix b/modules/modules.nix index 49a13c3ca..258c329c2 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -220,6 +220,7 @@ let ./services/status-notifier-watcher.nix ./services/sxhkd.nix ./services/syncthing.nix + ./services/systembus-notify.nix ./services/taffybar.nix ./services/tahoe-lafs.nix ./services/taskwarrior-sync.nix diff --git a/modules/services/systembus-notify.nix b/modules/services/systembus-notify.nix new file mode 100644 index 000000000..1b8f1be83 --- /dev/null +++ b/modules/services/systembus-notify.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + meta.maintainers = [ maintainers.asymmetric ]; + + options = { + services.systembus-notify = { + enable = + mkEnableOption "systembus-notify - system bus notification daemon"; + }; + }; + + config = mkIf config.services.systembus-notify.enable { + assertions = [ + (hm.assertions.assertPlatform "services.systembus-notify" pkgs + platforms.linux) + ]; + + systemd.user.services.systembus-notify = { + Unit.Description = "systembus-notify daemon"; + Install.WantedBy = [ "graphical-session.target" ]; + Service.ExecStart = "${pkgs.systembus-notify}/bin/systembus-notify"; + }; + }; +}