notify-osd: init (#2240)

Daemon that displays passive pop-up notifications
This commit is contained in:
Ivan Malison 2021-08-08 18:29:36 -06:00 committed by GitHub
parent 59be1f4983
commit 2c4234cb79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 59 additions and 0 deletions

2
.github/CODEOWNERS vendored
View file

@ -266,6 +266,8 @@
/modules/services/network-manager-applet.nix @rycee
/modules/services/notify-osd.nix @imalison
/modules/services/pantalaimon.nix @jojosch
/tests/modules/services/pantalaimon @jojosch

View file

@ -2149,6 +2149,14 @@ in
A new module is available: 'services.trayer'.
'';
}
{
time = "2021-07-19T01:30:46+00:00";
condition = hostPlatform.isLinux;
message = ''
A new module is available: 'services.notify-osd'.
'';
}
];
};
}

View file

@ -182,6 +182,7 @@ let
./services/muchsync.nix
./services/network-manager-applet.nix
./services/nextcloud-client.nix
./services/notify-osd.nix
./services/owncloud-client.nix
./services/pantalaimon.nix
./services/parcellite.nix

View file

@ -0,0 +1,48 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.notify-osd;
in {
meta.maintainers = [ maintainers.imalison ];
options = {
services.notify-osd = {
enable = mkEnableOption "notify-osd";
package = mkOption {
type = types.package;
default = pkgs.notify-osd;
defaultText = literalExample "pkgs.notify-osd";
description = ''
Package containing the <command>notify-osd</command> program.
'';
};
};
};
config = mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.notify-osd" pkgs
lib.platforms.linux)
];
systemd.user.services.notify-osd = {
Unit = {
Description = "notify-osd";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${cfg.package}/bin/notify-osd";
Restart = "on-abort";
};
};
};
}