2021-08-09 02:29:36 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.notify-osd;
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta.maintainers = [ maintainers.imalison ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
services.notify-osd = {
|
2023-07-02 01:45:18 +02:00
|
|
|
enable = mkEnableOption "notify-osd";
|
2021-08-09 02:29:36 +02:00
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.notify-osd;
|
2021-10-09 11:14:08 +02:00
|
|
|
defaultText = literalExpression "pkgs.notify-osd";
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2023-07-01 01:30:13 +02:00
|
|
|
Package containing the {command}`notify-osd` program.
|
2021-08-09 02:29:36 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|