mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
notify-osd: init (#2240)
Daemon that displays passive pop-up notifications
This commit is contained in:
parent
59be1f4983
commit
2c4234cb79
4 changed files with 59 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -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'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
48
modules/services/notify-osd.nix
Normal file
48
modules/services/notify-osd.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue